asp.net core should i stay or should i go? · 2016. 5. 16. · secondary goals of asp.net core...

30
ASP.NET Core Should I stay or should I go? Dino Esposito JetBrains dino.esposito@jetbrains.com @despos facebook.com/naa4e

Upload: others

Post on 27-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

ASP.NET Core

Should I stay or should I go?

Dino Esposito

JetBrains

[email protected]

@despos

facebook.com/naa4e

Page 2: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Let me answer the core

question first …

Page 3: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

ASP.NET Core

for ASP.NET developers

for Macfor Linux

Page 4: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

http://get.asp.net

Page 5: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

State of the art

ASP.NET 4.6 is the more mature platform. It's battle-tested

and released and available today.

http://www.hanselman.com/blog/ASPNET5IsDeadIntroducingASPNETCore10AndNETCore10.aspx

One announced new ASP.NET platform

ASP.NET Core 1.0 is a 1.0 release that includes Web

API and MVC but doesn't yet have SignalR or Web

Pages. It doesn't yet support VB or F#. It will have these

subsystems some day but not today.

http://www.hanselman.com/blog/ASPNET5IsDeadIntroducingASPNETCore10AndNETCore10.aspx

One mature ASP.NET platform

Page 6: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

TODAY

and tomorrow

?

coming soon

Page 7: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Lean and composable framework for building web

and cloud applications

Fully open source, available on Github

Can use it on Windows, Mac, Linux

ASP.NET 5 is no longer based on System.Web.dll

Agile project system in Visual Studio

Complete command-line interface too

Ships entirely as NuGet packages

Quotes from asp.net

Page 8: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

SOURCE: https://github.com/aspnet/benchmarks/blob/dev/results/Results.xlsx

Page 9: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

ASP.NET

Core is a

completeredesign of

ASP.NET as

we know it

today.

ASP.NET 5 is a significant redesign of ASP.NET2014

ASP.NET 5 is a significant redesign of ASP.NET involving a

significant redesign of .NETmid

2015

ASP.NET 5 is a complete redesign of ASP.NET with an

impact on .NET too

late

2015

Enter ASP.NET Core and .NET Coreearly

2016

Work in progress. No ETA.now

Page 10: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Web Solutions Today

Cloud-ready and cloud-optimizedEasy to configure based on the environment

Using the smallest possible amount of resources that is required to run the

business

Open to any sort of frameworks and tools

DEVELOPMENT

ENVIRONMENTCODE

RUNTIME

Page 11: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

The ASP.NET Core Runtime

Page 12: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Primary Goals of ASP.NET Core

Be lean and mean

Consume less memory and server resources

Be faster to serve requests and easier to deploy

Be cross-platform

Can develop applications under any OS

Host applications outside IIS

Attract (more and new) developers

Offer dependency injection

Offer (geeky) command line tools

Let them do ASP.NET coding using Linux on a Mac

Page 13: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Secondary Goals of ASP.NET Core

Still be attractive to legacy ASP.NET developers using

ASP.NET MVC 5x, EF6x and .NET FX 4x

Don’t make Web Forms developers feel abandoned and guide

them out of the stone age and rescue most of the still thriving

ASP community

Page 14: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

.NET Abstraction Layer Needed

ASP.NET Core

.NET Abstraction

Full

.NET FX

Multiple

.NET Core

Windows Other

Page 15: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Expanding the picture …

ASP.NET 4.6

Web

FormsMVC 5x

IIS

system.web

Server Host

Kestrel

Page 16: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Development and execution environment

Across multiple platforms (win + mac + linux)

Across multiple .NET flavors (full + core + mono)

Inside the Execution Environment

Native host to load the configured CLR

Application host to resolve app dependencies via Nuget

and compile/run managed code

.NET Execution Environment aka .NET Abstraction Layer

Page 17: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

View of the .NET Execution Environment

.NET Execution Environment

Runtime Servicesfor Windows systems

Runtime Servicesfor non-Windows systems

IISad hoc module

.NET CLR host

.NET CLR

CoreCLR host

CoreCLR

examines project files and resolves dependencies

Application host

Your code

Page 18: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Set of command line tools

dnx, dnu, dnvm

Command line tools for what?

To be able to do from the command line what we always

did through Visual Studio

DNX? Sounds familiar?

Page 19: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

> mkdir myapp

> cd myapp

> dotnet new

> dotnet restore

> dotnet run

Command line tools in .NET Core (not just ASP.NET)

Command line tools are being renamed and

redesigned as the result of feedbackCLI now stands for Command Line Interface

Also used to mean “Common Language Infrastructure”

creates hello-world

restores packages in the project file

compiles and runs

DNX? Sounds familiar?

Page 20: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

The great news is that you can

happily ignore those weird

command line tools and just keep

on using Visual Studio

Love Visual Studio?

Page 21: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

When you deal with a new

ASP.NET Core application a few

things look different …

…as if someone moved your

cheese overnight.

ASP.NET Core in Visual Studio

Page 22: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

ASP.NET is no longer emanation of IIS

Remember the integrated pipeline?Forget it!

IIS is just “one” host environment

Registration depends on the architecture of host

Page 23: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Client

SvcHost

w3wp

http.sys

ASP.NET Core

Module

web

commandKestrel

• Middleware

• Your Code

Request

Request

Response

Response

Page 24: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

DEMO

Page 25: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Cheese that’s been moved

• Request.Url

• ConfigurationManager.XXX

• HttpResponseBase etc

• No global.asax object

• Forms authentication

• Dealing with embedded

resources

• Handling actions on project

files (Embedded resource,

Exclude)

Page 26: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Code your way

You are

here

ASP.NET as usual New ASP.NET Core

Page 27: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

• Not here today and not here tomorrow

• When here, however, it’ll be v1.0

• In history, no MS products reliable before v2.0

• Do you see benefits beyond the hype and institutional

excitement of public announcements?

• Moving is not free

ASP.NET Core

Page 28: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

ASP.NET didn’t get architectural changes for 15y

New x-plat ASP.NET serves new MS web strategy

Plan moving to ASP.NET Core especially if you’re

experiencing Issues with IIS and system.web

Issues with the app on the cloud

Performance issues in the core runtime

… or see a business opportunity in x-plat hosting

Why ASP.NET Core?

Page 29: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

Fine-tuning and great documentation

Support for all languages

SignalR fully integrated

Also Entity Framework aligned Though EF7 and ASP.NET Core are not related

Looking aheadThat’s inevitably the future

Page 30: ASP.NET Core Should I stay or should I go? · 2016. 5. 16. · Secondary Goals of ASP.NET Core Still be attractive to legacy ASP.NET developers using ASP.NET MVC 5x, EF6x and .NET

FOLLOW

That’s All Folks!

facebook.com/naa4e

software2cents.wordpress.com

[email protected]

@despos