asp.net core should i stay or should i go? · 2016. 5. 16. · secondary goals of asp.net core...
TRANSCRIPT
ASP.NET Core
Should I stay or should I go?
Dino Esposito
JetBrains
@despos
facebook.com/naa4e
Let me answer the core
question first …
ASP.NET Core
for ASP.NET developers
for Macfor Linux
http://get.asp.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
TODAY
and tomorrow
?
coming soon
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
SOURCE: https://github.com/aspnet/benchmarks/blob/dev/results/Results.xlsx
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
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
The ASP.NET Core Runtime
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
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
.NET Abstraction Layer Needed
ASP.NET Core
.NET Abstraction
Full
.NET FX
Multiple
.NET Core
Windows Other
Expanding the picture …
ASP.NET 4.6
Web
FormsMVC 5x
IIS
system.web
Server Host
Kestrel
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
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
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?
> 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?
The great news is that you can
happily ignore those weird
command line tools and just keep
on using Visual Studio
Love Visual Studio?
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
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
Client
SvcHost
w3wp
http.sys
ASP.NET Core
Module
web
commandKestrel
• Middleware
• Your Code
Request
Request
Response
Response
DEMO
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)
Code your way
You are
here
ASP.NET as usual New ASP.NET Core
• 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
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?
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