ASP.NET 5: How to Get Your Cheese Back

ASP.NET 5: How to Get Your Cheese Back

Progressive .NET Tutorials 2015, London


Tugberk Ugurlu

July 03, 2015


  1. ASP.NET 5: How to Get Your Cheese Back Tugberk Ugurlu

    Redgate Software @tourismgeek #ProgNet15

  3. YOU #ProgNet15

  4. You Had #ProgNet15

  5. Now, You Have #ProgNet15

  6. #sadpanda #ProgNet15

  7. VALUE #ProgNet15

  8. #ProgNet15

  9. #ProgNet15

  10. Problem • ASP.NET 5 is a complete rewrite • It

    has new concepts like DNX, DNU, DNVM #ProgNet15
  11. Problem • Figuring out to invest time to adopt #ProgNet15

  12. Expectations • Not a 101 talk on ASP.NET 5. •

    There are some slides • It will not give you all the answers but will give an idea. • It wıll probably not gonna be much fun as Mark’s talk #ProgNet15
  13. Agenda • Going through most important changes • With samples,

    advantages and the value #ProgNet15
  14. New Project Structure • Folder-based source • project.json, no more

    csproj. • Unified dependency management • webroot folder, seperation of the assets and app directories #ProgNet15
  15. New Project Structure: Advantages • No more merge conflicts on

    csproj • Your sanity is preserved™ • Easy to work with client side assets • webroot makes it slightly faster for you to handle requests #ProgNet15
  16. DEMO Show me the code! #ProgNet15

  17. Command-line First Development • All the operations (build, pack, publish,

    etc.) can be done through command line • One important step on being code editor agnostic • Will go into these in the next session #ProgNet15
  18. Modular, Composable HTTP Pipeline • Nothing is on the pipeline

    unless you want it to • You are in-charge of building your pipeline. #ProgNet15
  19. Modular, Composable HTTP Pipeline: Advantages • You don't pay the

    price for the stuff you don't use • You can have the same behavior between servers. #ProgNet15
  20. DEMO Show me the code! #ProgNet15

  21. Dependency Injection All the Way Down • Everywhere is testable,

    even Program.Main :) • Easy to get a hold of runtime dependencies • Built in DI container, can be replaced with your favorite #ProgNet15
  22. DEMO Show me the code! #ProgNet15

  23. Embrace Existing Ecosystems for Client Side Assets • bower: up-to-date

    dependencies. • No need to commit them into your source control system. • client side build • Bundling, minification, compile, etc. • being able to use nodejs tools like gulp, grunt which have up-to-date of everything. • No extra learning curve • Easily deploy to CDN #ProgNet15
  24. DEMO Show me the code! #ProgNet15

  25. New Configuration Model • Chained, ordered set of configuration providers

    • XML • JSON • INI • Environment Variables • In-memory • Customizable, you can have any format you like • No more config transforms #ProgNet15
  26. DEMO Show me the code! #ProgNet15

  27. Unified MVC and Web API • No more confusion (e.g.

    which AuthorizeAttribute is which) • MVC can be now self-hosted, no ties to System.Web #ProgNet15
  28. DEMO Show me the code! #ProgNet15

  29. Code Editor Agnostic • Top-notch Visual Studio Tooling Support with

    VS 2015 • OmniSharp to back other code editors • Atom • Sublime • VS Code • Emacs • Yeoman generators #ProgNet15
  30. Multiple framework targets • No more link source file compilation

    magic to get multi platform compile work • CoreCLR #ProgNet15
  31. Cross Platform! • Windows, Linux, OS X • Build and

    run cross-platform ASP.NET apps in supported platforms • Kestrel: new web server on top of libuv for Linux and OS X #ProgNet15
  32. MORE DEMO Show me the code! #ProgNet15

  33. Summary • Cross Platform (Windows, OS X, Linux, etc.) •

    Multiple Target Frameworks and CoreCLR • New Project Structure • Command-line first Development Environment • Modular, Composable HTTP Pipeline • Dependency Injection All the Way Down • Embrace Existing Ecosystems for Client Side Assets • New Configuration Model • Unified MVC and Web API • Code Editor Agnostic (VS, VS Code, Atom, Sublime, etc.) #ProgNet15
  34. There are more… • Open source! • In-memory compilation •

    No ties to MSBuild whatsoever, choose your own build tool • Brand new Data Protection APIs • • Tag Helpers (approach them with caution) • Entity Framework 7 • ASP.NET Identity 3 • And more... #ProgNet15
  35. Resources • ASP.NET GitHub Org: • ASP.NET Home Repository: • ASP.NET 5 Docs: • Introduction to ASP.NET 5: • DNX Overview: • Introducing ASP.NET 5: • Deep Dive into ASP.NET 5: • Deep Dive into Microsoft ASP.NET 5: • What's New with ASP.NET 5: • ASP.NET 5 Community Standups: • My ASP.NET 5 Posts: and #ProgNet15