Download presentation
Presentation is loading. Please wait.
Published byMitchell Stevenson Modified over 6 years ago
1
Hello World Admir Tuzović Chief Technology Officer @ App Impact
5/26/2018 1:50 AM Hello World Admir Tuzović Chief Technology App Impact © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
5/26/2018 1:50 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
5/26/2018 1:50 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
4
ASP.NET Core 1.1 & Visual Studio 2017 Hello World
5/26/2018 1:50 AM ASP.NET Core 1.1 & Visual Studio 2017 Hello World Admir Tuzović App Impact © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
About me Chief Technology Officer Author Former Tech Evangelist
5/26/2018 1:50 AM About me Chief Technology Officer Author Former Tech Evangelist © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
Agenda Project structure .NET Standard Hosting options Middleware
5/26/2018 1:50 AM Agenda Project structure .NET Standard Hosting options Middleware Dependency Injection MVC vs MVC Core Tooling JS support © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
7
.NET Core Release Timeline
5/26/2018 1:50 AM .NET Core Release Timeline : Release Candidate 1 : Release Candidate 2 (DNX 2 CLI) : 1.0 : 1.0.1 : 1.0.2 : 1.1 : Death to project.json © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
8
5/26/2018 1:50 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9
5/26/2018 1:50 AM Hosting Options Kestrel – lightweight, cross-platform, super great web server !!! ...that anyone can hack or exploit. Primary role: provide seperate process for ASP.NET Core to run in. Production scenarios require reverse proxy: IIS Apache Nginx © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
10
Demo Migrating from VS 2015 to VS 2017 Targeting multiple frameworks
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
11
Request pipeline Middleware A Middleware B Middleware C Middleware D
Middleware E Request Response © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
12
MVC in Request Pipeline
5/26/2018 1:50 AM MVC in Request Pipeline Should be the last (terminating) middleware Writes to the response stream (irreversible) Has its own internal pipeline © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
ASP.NET Request Pipeline
5/26/2018 1:50 AM ASP.NET Request Pipeline Request Response Module 5 Module 4 Module 3 Module 2 Module 1 © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
14
Request pipeline Request Exception Handling Static Files Logging
5/26/2018 1:50 AM Request pipeline Exception Handling Static Files Logging Security MVC Request Response © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
15
Middleware from IHttpModule perspective
5/26/2018 1:50 AM Middleware from IHttpModule perspective Request Response MVC Security Logging Static Files Exception Logging © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
16
Demo Middleware Filter 5/26/2018 1:50 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
17
ASP.NET MVC vs ASP.NET Web API
5/26/2018 1:50 AM ASP.NET MVC vs ASP.NET Web API Web API ASP.NET MVC ASP.NET Core MVC Core ASP.NET Core MVC ASP.NET Core MVC Core Razor … much more © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
18
Demo Frontend Backend separation 5/26/2018 1:50 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
19
Decoupling Common External Power Supply aka power jack
5/26/2018 1:50 AM Decoupling Common External Power Supply aka power jack © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
20
Dependency injection ConfigureServices in Startup.cs
5/26/2018 1:50 AM Dependency injection ConfigureServices in Startup.cs Three scoping levels: Singleton (1 instance for entire application) Transient (new instance for every resolution) Scoped (new instance for every new HTTP request) Integrates well with 3rd party libraries like AutoFac © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
21
Demo Integration with AutoFac 5/26/2018 1:50 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
Exception handling Startup.cs Middleware A Middleware B Middleware C
MVC MW configuration Request 1 DI configuration Request 2 Request 3 Program.cs Request 4 Host configuration © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
23
Task Runner + BundleMinifier
5/26/2018 1:50 AM Task Runner + BundleMinifier 1st announcement: We support Grunt in VS!!! 2nd announcement: We support Grunt Gulp in VS!!! No announcement: bundleconfig.json gulpfile.js Hi, I am Mads Kristensen, and I have this awesome library for bundling and minification!!! Hi, I am Starcraft siege tank and I can do 80 damage when in siege mode. Gulp sends his regards. © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
24
Gulp vs BundleMinifier
5/26/2018 1:50 AM Gulp vs BundleMinifier Bundleminifer: Minify and Concat JS and CSS Gulp: Cook, Clean, Delete, Wash, Sing, Dance, Scratch, Play, Minify, Rename, Copy, Fix broken pipe, Sort files, Benchmark, Concat, Bless, Sketch, Kill your enemies ... © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
25
Future projects (heavily opinionated)
5/26/2018 1:50 AM Future projects (heavily opinionated) Visual Studio 2017? Yes, 2015 is not even listed anymore .NET Core? If possible, YES ASP.NET Core with MVC Core? OMG, 100% YES!!! ASP.NET Core MVC with Razor? Not worth it, stick with MVC Core + client-side technologies Entity Framework Core? Only if you are into S&M © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
26
5/26/2018 1:50 AM Gracias! © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.