Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ASP.NET 5: How to Get Your Cheese Back

ASP.NET 5: How to Get Your Cheese Back

That Conference 2015 (Wisconsin Dells, WI)


Tugberk Ugurlu

August 12, 2015


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

    Redgate Software @tourismgeek http://tugberkugurlu.com
  2. None
  3. None
  4. None
  5. None
  6. None
  7. @redgate @RedGateCareers red-gate.com/careers

  8. TWO PARTS OF THE STORY #ThatConference

  9. YOU #ThatConference

  10. You Had #ThatConference

  11. Now, You Have #ThatConference

  12. #sadpanda #ThatConference

  13. But, wait! #ThatConference

  14. VALUE #ThatConference

  15. #ThatConference

  16. #ThatConference

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

    has new concepts like DNX, DNU, DNVM • Figuring out to invest time to adopt #ThatConference
  18. 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. #ThatConference
  19. Agenda • Going through most important changes • With samples,

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

    csproj. • Unified dependency management • webroot folder, seperation of the assets and app directories #ThatConference
  21. 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 #ThatConference
  22. DEMO Show me the code! #ThatConference

  23. Command-line First Development • Three new command line tools: •

    dnvm: .NET Version Manager • dnx: .NET Execution Environment • dnu: DNX Utility • All the operations (build, pack, publish, etc.) can be done through command line • One important step on being code editor agnostic #ThatConference
  24. DEMO Show me the code! #ThatConference

  25. Modular, Composable HTTP Pipeline • Nothing is on the pipeline

    unless you want it to • You are in-charge of building your pipeline. #ThatConference
  26. 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. #ThatConference
  27. DEMO Show me the code! #ThatConference

  28. 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 #ThatConference
  29. DEMO Show me the code! #ThatConference

  30. 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 #ThatConference
  31. DEMO Show me the code! #ThatConference

  32. 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 #ThatConference
  33. DEMO Show me the code! #ThatConference

  34. 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 • On top of new HTTP stack which has a very low footprint #ThatConference
  35. DEMO Show me the code! #ThatConference

  36. 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 #ThatConference
  37. Multiple framework targets • No more link source file compilation

    magic to get multi platform compile work • CoreCLR #ThatConference
  38. 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 • Docker #ThatConference
  39. MORE DEMO Show me the code! #ThatConference

  40. What about tools and libraries? • Existing libraries are OK

    under full .NET Framework DNX versions • Some libraries started porting to .NET Core: • Autofac • Serilog • Elasticsearch • Community puts effort to port some: • MongoDB: https://github.com/mongodb/mongo-csharp-driver/pull/210 #ThatConference
  41. What about tools and libraries? • Tools also started supporting

    DNX based apps #ThatConference
  42. Redgate ANTS Performance Profiler #ThatConference More info: http://bit.ly/1JU0IXR

  43. Redgate ANTS Memory Profiler #ThatConference More info: http://bit.ly/1JU0IXR

  44. Glimpse: https://github.com/Glimpse/Glimpse.Prototype #ThatConference

  45. 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.) #ThatConference
  46. There are more… • Open source! • In-memory compilation •

    No ties to MSBuild whatsoever, choose your own build tool • Brand new Data Protection APIs • http://docs.asp.net/en/latest/security/data-protection/index.html • Secret Manager • Tag Helpers (approach them with caution!) • Entity Framework 7 • ASP.NET Identity 3 • And more... #ThatConference
  47. Resources • ASP.NET GitHub Org: https://github.com/aspnet • ASP.NET Home Repository:

    https://github.com/aspnet/Home • ASP.NET 5 Docs: http://docs.asp.net • Progressive .NET Tutorials 2015 and Recording Videos of My ASP.NET 5 Talks: http://bit.ly/1L64i2o • Introduction to ASP.NET 5: http://docs.asp.net/en/latest/conceptual-overview/aspnet.html • DNX Overview: http://docs.asp.net/en/latest/dnx/overview.html • Introducing ASP.NET 5: https://channel9.msdn.com/Events/Build/2015/2-687 • Deep Dive into ASP.NET 5: https://channel9.msdn.com/Events/Build/2015/2-726 • Deep Dive into Microsoft ASP.NET 5: https://channel9.msdn.com/Events/Ignite/2015/BRK4703 • What's New with ASP.NET 5: https://channel9.msdn.com/Series/Whats-New-with-ASPNET-5 • ASP.NET 5 Community Standups: http://bit.ly/1KKYI37 • My ASP.NET 5 Posts: http://www.tugberkugurlu.com/tags/asp-net-5 and http://www.tugberkugurlu.com/tags/asp- net-vnext #ThatConference