Upload
brij-mishra
View
2.814
Download
2
Tags:
Embed Size (px)
Citation preview
Getting started with ASP.NET 5Brij Bhushan Mishra
@code_wala
About me
• Brij Bhushan Mishra
• Microsoft MVP – ASP.NET/IIS (4 times)
• Blogger/ Author /Speaker
• http://codewala.net
• @code_wala
Key things
• Cloud.. Cloud.. Cloud..
• Agile.. Agile.. (Scrum Kanban.. etc)
• Testing.. Testing.. Testing..
• Open Source..
• JavaScript..
Current scenario
• Its working on my machine?
• Wish we were able use ASP.NET..
• So much loading time.. Dunno what’s going behind
• Less control on framework libraries module
• Forced to use IIS
• Can we host my application on Mac
• Production pointing to Dev
All these problems will be History!!
ASP.NET 5 redesigned
FULL .NET CLR (4.6)
200 MB
Core CLR (Cloud Optimized)
11 MB
Cross Platform CLR
What you get..
• Full .NET CLR (Provides backward compatibility)
• Core CLR • Has bare minimum components
• Include whatever you need via NUGET
• Can be deployed independently
• Each components can be updated individually
• Cross Platform CLR
Features
• Use different versions of .NET side-by-side
• Simplify dependency management
• Cloud Ready
• Host Anywhere
• Dependency Injection Ready
• Improved Request Pipeline
• Configuration Management
Coding and debugging with Visual Studio
Change the code
C# Compiler invoked
Load code in memory
Execute the dll
dll loaded in memory from File system
Emits the dll in file system
Coding and debugging with Visual Studio
Change the code
Load code in memory
Code is Executed in
memory
Roslyn compiles code in memory
Time reduced from 7-8 second to 1-2 second
Demo
The world today
Web pages MVC Web API
Razor
HTML Helpers HTML Helpers
Controllers
Actions
Filters
Model Binding
Dependency Resolver
Controllers
Actions
Filters
Model Binding
Dependency Resolver
Now..
MVC Web API Web Pages+ +
=ASP.NET MVC 6!!
Getting Started with ASP.NET MVC 6
• Add MVC package : Microsoft.ASP.NET MVC6
• In Startup.cs• In ConfigureServices(IServiceCollection services) method
• Services.AddMvc()
• Services.Configure<MvcOptions>(opions => {…})
• In Configure() method• app.UseMvc(routes => => {…})
Demo
Web forms is not dead – ASP.NET Web forms 4.6
• HTTP 2
• Async model binding
• Roslyn CodeDOM compilers