asp.net core should i stay or should i go? · 2016. 5. 16. · secondary goals of asp.net core...
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/1.jpg)
ASP.NET Core
Should I stay or should I go?
Dino Esposito
JetBrains
@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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/2.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/3.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/4.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/6.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/7.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/8.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/9.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/10.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/11.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/13.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/14.jpg)
.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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/15.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/16.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/17.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/18.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/19.jpg)
> 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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/20.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/21.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/22.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/23.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/24.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/25.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/26.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/27.jpg)
• 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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/28.jpg)
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](https://reader035.vdocuments.us/reader035/viewer/2022071104/5fde053308986314ab7d232a/html5/thumbnails/29.jpg)
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