Skip to content

Instantly share code, notes, and snippets.

@DamianEdwards
Last active June 14, 2017 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DamianEdwards/f1c31a44a22d39e0cbb3740339e45e18 to your computer and use it in GitHub Desktop.
Save DamianEdwards/f1c31a44a22d39e0cbb3740339e45e18 to your computer and use it in GitHub Desktop.
NDC Oslo 2017 - What's new in ASP.NET Core 2.0
  1. File new Razor Pages project
  2. Open Program.cs and talk about WebHost.CreateDefaultBuilder
  3. Show configuration & logging WebHostBuilder APIs
  4. Open Startup.cs
  5. Show IConfiguration is now injected 'cos it's in DI
  6. Show that all the configuration logger setup is gone 'cos it's defaulted by WebHOst.CreateDefaultBuilder
  7. Add authentication for Twitter & Google
  8. Show that all the APIs are now available by default because of the new Microsoft.AspNetCore.All meta-package
  9. Open the CSPROJ and show how simple it is with just the single package
  10. Talk about the new runtime store that ensures all the packages aren't deployed with the application
  11. Publish the application and note the output size, then compare it to the publisht output size of a previously prepared & published 1.1 application
  12. Go the publish output of the 1.1 application prepared earlier whice includes startup time measuring code and run the app, noting the total time printed
  13. Go back to the 2.0 application and add the code in Program to measure the time to start the app, complete a request to the home page and shutdown again
  14. Publish the application again and run it and note the reduced startup time compared to the 1.1 application
  15. Go back to Startup.cs and add the code to configure Cookie & Twitter auth in ConfigureServices
  16. Add the authentication middleware and explain how it's different to 1.1
  17. Add the configuration secrets for Twitter and Google to User Secrets
  18. Add a logout endpoint using route-to-middleware
  19. Add a Razor Page "Login.cshtml" and add buttons for the authentication schemes
  20. Demo logging in/out
  21. Create and register an IHostedService that logs the number of requests received in the last N secondns
  22. Create an no-op IHostingStartup and debug through it to demonstrate its discovery and execution
  23. Transition to Visual Studio
  24. Explain that IHostingStartup facilitates the in VS and Azure Application Insights and diagnostics light-up experience
  25. Demonstrate Application Insights data during VS debugging
  26. Open the Azure Portal and show Application Insights working in a 2.0.0 application with no code, and correlated request tracking across two application instances
    • Conference Planner
  27. Launch the application and show the ASP.NET Core logs appearing in the VS output window
  28. Create an ITagHelperComponent that injects a heading at the top of each page
  29. Demo Razor Pages
  30. Open Index.cshtml and show the @page directive
  31. Navigate to the Page Model via the @model directive
  32. Create a Customer class & AppDbContext, configure the context to use in-memory database
  • .NET Standard 2.0
  • Startup Time - DEMO
  • Microsoft.AspNetCore.All meta-package - DEMO
  • Runtime Store
  • Program/Startup.cs changes - DEMO
    • Configuration changes
      • IConfiguration in DI container
    • Logging changes
      • Configuration filtering - DEMO
      • ILoggerProviderin DI container
    • DefaultHostBuilder - DEMO
  • Kestrel
    • Pluggable transports
    • Pluggable HTTP parser
    • Edge readiness (timeouts)
    • Pipelines
    • Systemd socket activiation
    • Faster
  • Security (Authn/z) rewrite - DEMO
  • IMiddleware
  • Razor rewrite
    • Extensible directives
    • New tooling infrastructure
    • C# 7 support
  • IHostingStartup - DEMO
  • IHostedService - DEMO
  • Full IIS support in VS - DEMO
  • ASP.NET Core logs in VS - DEMO
  • WebListener renamed to HttpSysServer
  • MVC
    • TempData cookie provider is now default
    • ITagHelperComponent for injection of "automatic" Tag Helpers from DI container - DEMO
    • <head> & <body> Tag Helpers - DEMO
    • TempData backed properties - DEMO
    • Razor Pages - DEMO
  • SPA Services templates for Angular & React in Visual Studio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment