Getting Started with ASP.NET 5
-
Upload
brij-mishra -
Category
Technology
-
view
2.814 -
download
2
Transcript of Getting Started with ASP.NET 5
![Page 1: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/1.jpg)
Getting started with ASP.NET 5Brij Bhushan Mishra
@code_wala
![Page 2: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/2.jpg)
About me
• Brij Bhushan Mishra
• Microsoft MVP – ASP.NET/IIS (4 times)
• Blogger/ Author /Speaker
• http://codewala.net
• @code_wala
![Page 3: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/3.jpg)
Key things
• Cloud.. Cloud.. Cloud..
• Agile.. Agile.. (Scrum Kanban.. etc)
• Testing.. Testing.. Testing..
• Open Source..
• JavaScript..
![Page 4: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/4.jpg)
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
![Page 5: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/5.jpg)
All these problems will be History!!
![Page 6: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/6.jpg)
ASP.NET 5 redesigned
FULL .NET CLR (4.6)
200 MB
Core CLR (Cloud Optimized)
11 MB
Cross Platform CLR
![Page 7: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/7.jpg)
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
![Page 8: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/8.jpg)
Features
• Use different versions of .NET side-by-side
• Simplify dependency management
• Cloud Ready
• Host Anywhere
• Dependency Injection Ready
• Improved Request Pipeline
• Configuration Management
![Page 9: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/9.jpg)
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
![Page 10: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/10.jpg)
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
![Page 11: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/11.jpg)
Demo
![Page 12: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/12.jpg)
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
![Page 13: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/13.jpg)
Now..
MVC Web API Web Pages+ +
=ASP.NET MVC 6!!
![Page 14: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/14.jpg)
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 => => {…})
![Page 15: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/15.jpg)
Demo
![Page 16: Getting Started with ASP.NET 5](https://reader030.fdocuments.us/reader030/viewer/2022032421/55a7848d1a28abd77a8b460e/html5/thumbnails/16.jpg)
Web forms is not dead – ASP.NET Web forms 4.6
• HTTP 2
• Async model binding
• Roslyn CodeDOM compilers