ASP.NET Core - PowerPoint PPT Presentation

liam
asp net core n.
Skip this Video
Loading SlideShow in 5 Seconds..
ASP.NET Core PowerPoint Presentation
Download Presentation
ASP.NET Core

play fullscreen
1 / 30
Download Presentation
ASP.NET Core
4193 Views
Download Presentation

ASP.NET Core

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. ASP.NET Core Understanding the landscape @Dave_Paquette Microsoft MVP (Developer Technologies) contactme@davepaquette.com https://www.davepaquette.com

  2. ASP.NET – A Brief History

  3. File New Project in 2005

  4. File – New Project in 2013

  5. File – New Project 2019

  6. Dotnet new in 2019

  7. Programing models • MVC • Razor Pages • Blazor • Endpoint Routing • Middleware • gRPC • Worker Service • WebApi • SignalR

  8. What makes an asp.net core app? • .NET Core Console App • A web host and a request pipeline

  9. Hello world – Endpoint Routing > dotnet new web • The simplest pipeline for processing HTTP requests • Similar to Nancy (.NET) and ExpressJS (Node)

  10. MVC > dotnet new mvc • Requests are routed to methods (actions) on a Controller class • Controllers load data (models) and potentially return data or a view • The Razor view engine can be used to generate HTML on the server and return that to the client

  11. Razor pages > dotnet new webapp • Built on top of MVC • A simpler programming model for most use cases • Page consists of a CSHTML (Razor) page and a PageModel class

  12. Asp.NET Backend / Javascript frontend > dotnet new angular > dotnet new react > dotnet new reactredux > dotnet new webapi • MVC (without the V) for the backend API • JavaScript framework for the front end

  13. blazor > dotnet new blazorserver • Component based UI framework using on Razor and C# • Web Assembly (Mono .NET Runtime)

  14. Blazor Server Side Client Side

  15. Blazor demos • https://try.dot.net / https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/intro-to-csharp/hello-world • https://github.com/AdrienTorris/awesome-blazor

  16. grpc > dotnet new grpc • Google RPC (Remote Procedure Call) • Contract based service-to-service communication • High performance but not human readable transport

  17. Worker service > dotnet new worker • Any service that runs on a schedule or in a background

  18. Real-Time with Signalr • Real time communication • Server sends messages to the clients

  19. Combining programing models > dotnet new web • Start with the “empty” project and add the pieces you need • E.g. Worker + SignalR

  20. Deployment and hosting • Windows or Linux • Kestrel or IIS (In process or out of process) • Docker • Cloud

  21. Kestrel

  22. Windows Hosting • IIS • Install the .NET Core Hosting Bundle • In Process vs Out of Process • Windows Service

  23. Linux hosting • Run Kestrel as an edge server • Use a common web server like nginx or Apache

  24. Cloud hosting • Use a Virtual Machine • Full PaaS – App Service • Containers

  25. Why Linux? Cons No experience on staff Not as approachable for Windows folks Pros • Cheaper • More portable • More DevOps tools • More experience on staff • Smaller containers • Raspberry Pi • Less overhead

  26. Why Windows? Cons Large container sizes More overhead Pros • More experience on staff • Access to Windows only libraries • Better (more mature) diagnostics and profiling

  27. Choice is good

  28. Thanks! www.davepaquette.com westerndevs.com aspnetmonsters.com Blog(s) Twitter @Dave_Paquette Email contactme@davepaquette.com