ASP.NET Core Should I stay or should I go?
Dino Esposito JetBrains [email protected] @despos facebook.com/naa4e Let me answer the core question first … ASP.NET Core for Mac for Linux for ASP.NET developers http://get.asp.net State of the art
One mature ASP.NET platform
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 TODAY ? and tomorrow coming soon Quotes from asp.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 SOURCE: https://github.com/aspnet/benchmarks/blob/dev/results/Results.xlsx 2014 ASP.NET 5 is a significant redesign of ASP.NET ASP.NET Core is a mid ASP.NET 5 is a significant redesign of ASP.NET involving a 2015 significant redesign of .NET complete late ASP.NET 5 is a complete redesign of ASP.NET with an 2015 redesign of impact on .NET too ASP.NET as early Enter ASP.NET Core and .NET Core 2016 we know it today. now Work in progress. No ETA. Web Solutions Today
Cloud-ready and cloud-optimized Easy 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
RUNTIME DEVELOPMENT ENVIRONMENT CODE 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 Multiple .NET FX .NET Core
Windows Other Expanding the picture …
ASP.NET 4.6
Web MVC 5x Forms
system.web
Server Host IIS Kestrel .NET Execution Environment aka .NET Abstraction Layer
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 View of the .NET Execution Environment
Your code
examines project files and resolves dependencies Application host
.NET CLR CoreCLR
.NET CLR host CoreCLR host
IIS Runtime Services Runtime Services ad hoc module for Windows systems for non-Windows systems
.NET Execution Environment DNX? Sounds familiar?
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?
Command line tools are being renamed and redesigned as the result of feedback CLI now stands for Command Line Interface Also used to mean “Common Language Infrastructure”
Command line tools in .NET Core (not just ASP.NET) > mkdir myapp > cd myapp > dotnet new creates hello-world > dotnet restore restores packages in the project file > dotnet run compiles and runs Love Visual Studio? The great news is that you can happily ignore those weird command line tools and just keep on using Visual Studio ASP.NET Core in 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 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 Request Client
Request
SvcHost http.sys
w3wp
ASP.NET Core Response Module
web • Middleware Kestrel command • Your Code
Response DEMO Cheese that’s been moved
• Request.Url • Forms authentication • ConfigurationManager.XXX • Dealing with embedded • HttpResponseBase etc resources • No global.asax object • Handling actions on project files (Embedded resource, Exclude) Code your way
ASP.NET as usual New ASP.NET Core
You are here 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 Why 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 Looking ahead That’s inevitably the future
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 That’s All Folks!
FOLLOW @despos facebook.com/naa4e [email protected] software2cents.wordpress.com