After more than 10 years of web development using the ASP.NET framework, an important shift in the .NET web development platform has begun. In this talk we will see how the existing ASP.NET web technologies emerge together on a new lean and composable .NET vNext stack for building tomorrow's web and cloud based applications.
7. One ASP.NET?
• MVC doesn’t share components with ASP.NET WebAPI
• Controllers, Actions, Filters, Model binding, DI
• MVC doesn’t share HTML helpers with ASP.NET WebPages
• MVC doesn’t provide self-host support
• Depends on System.Web
• Web API depends on System.Web when hosted in IIS
8. Life is moving on
2020
2015
2010
2005
2000
1995
1990
1985
ASP
ASP.NET
WebForms
ASP.NET
MVC
ASP.NET
WebPages
ASP.NET
WebAPI
SignalR OWIN ?
Series1 1996 2002 2009 2011 2012 2013 2014 2015
Series2 0 6 7 2 1 1 1 1
8
7
6
5
4
3
2
1
0
13. .NET vNext – The new KRuntime
• New CLR hosting
• Cloud Optimized framework (optimized for cloud and server
workloads)
• High throughput
• Small footprint, side-by-side
• Cross-platform enabled (Windows, Mac, Linux)
• NuGet package dependencies built in
• Nothing in GAC
14. Roslyn compiler
• Compiler as a service
• API for code analysis and refactoring
• Managed compiler
• Compile code dynamically
• Edit code, refresh browser, and see changes
C# Code
.NET
Compiler
IL
(Assembly)
C# Code
Roslyn
Compiler
IL
(In Memory)
VS
15. Dependency Injection
• Built into the framework, one implementation
• Use any DI framework or the default implementation
(IServiceProvider implementation)
16. Hosting is agnostic
• Cross-platform (Windows, Linux, Mac): Kestrel web server
• Self-hosting, custom process
• No IIS dependency (not required anymore)
• Helios on top of IIS
17. The big picture OF .NET vNext
Client apps
(Windows Store, WPF,
Multi-purpose
Windows Forms, Console apps)
Web and services
(ASP.NET vNext: Web Forms, MVC, Web
Pages, Web API, SignalR, WCF)
Device optimized
Runtime,
Compilers, Libraries
(Native compilation, Small footprint,
side-by-side, Cross-device enabled)
Cloud optimized
(High throughput, Small footprint,
side-by-side, Cross-platform enabled)
Specialized
19. Tooling Experience
• Visual Studio – still provides the greatest experience ;)
• They want things to work without Visual Studio
• Command Line
• Grunt tasks
• Command line scaffolding
• Sublime
21. How about Open source?
• Everything is open source!
• Roslyn compiler
• ASP.NET vNext components
• Clone: github.com/aspnet
22. ASP.NET MVC 6 - what’s new
• Breaking changes
• New project system
• New configuration system
• Using a common set of abstractions for HTTP, routing, action selection filters,
model binding
23. ASP.NET MVC 6 - what’s new
• POCO controllers
• New HTTP pipeline
• Routing improvements
• New directive:
• @inject MyHtml Html;
24. ASP.NET MVC 6 - what’s new
• Improved helpers (work in progress)
@Html.TextBoxFor(model=>Name, { @class=“warning” });
<input class=“warning” for=“Name” />
25. ASP.NET MVC 6 - what’s new
• Incremental rendering
• @await FlushAsync();
26. ASP.NET MVC 6 - what’s new
• View Components and Child Views
27. Ongoing projects? What can WE do?
• Recommendations
• Avoid HttpContext – completely redesigned
• Use interfaces, DI, clean code
• No Visual Basic support
• No WebForms engine support
• .NET Portability Analyzer extension for Visual Studio
28. Demo
• .NET vNext vs. .NET 4.5.x performance
• Roslyn compiler (edit, refresh, see changes)
29. ASP.NET vNext - Summary
Feature .NET vNext
.NET vNext
(Cloud
Optimized)
Cloud Ready * *
Modular Design * *
Dependency Injection * *
Consistent Tracing / Debugging * *
Faster Development (No Build Step) * *
Open Source * *
Full Side by Side (framework deployed inside application) *
Fast startup, Low memory / High throughput (best of class) *
32. The future is here, enjoy!
A shift in the .NET web development platform, ASP.NET vNext
Gabriel Enea
@dotnet18
25 Oct 2014
IMAGES SOURCE: HTTPS://UNSPLASH.COM/