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

ASP.NET MVC 5 vs ASP.net Web API 2 vs ASP.NET Core MVC 1

ASP.NET MVC 5 vs ASP.net Web API 2 vs ASP.NET Core MVC 1

Internal Lightning Talk @ Redgate, Cambridge, UK

Tugberk Ugurlu

November 01, 2016
Tweet

More Decks by Tugberk Ugurlu

Other Decks in Programming

Transcript

  1. ASP.NET MVC 5 vs. ASP.NET Web API 2 vs. ASP.NET

    Core MVC 1 Tugberk Ugurlu @tourismgeek
  2. ASP.NET MVC 5 “A framework for writing server-side rendered Web

    applications based on Model-View-Controller pattern.
  3. ASP.NET MVC 5 V1 was on 2009 Latest version is

    5.2.3 which shipped on 9th of February Tied to IIS in terms of hosting Does not work on CoreCLR
  4. ASP.NET MVC 5: It’s good when you  Need server-side

    rendering capabilities  Doesn’t have a need for hosting outside of IIS
  5. ASP.NET Web API 2 V1 was on 2012 Latest version

    is 2.2 (5.2.3) which shipped on 9th of February Can be hosted outside of IIS (HttpListener, any server compatible with OWIN, etc.) Can work on Mono (if you accept the fact that you will hit weird bugs) Has a very natural HTTP programming model
  6. ASP.NET Web API: It’s good when you  Need a

    framework to put together some HTTP APIs  Doesn’t have a need for hosting outside of Windows or OK to deal with mono
  7. ASP.NET MVC Core 1 “A unified framework which both has

    MVC and Web API programming models on top of ASP.NET Core.
  8. ASP.NET MVC Core 1 V1 was on 2016, June (latest

    version is 1.0.1) Actively developed and maintained Can be hosted outside of IIS Can run on CoreCLR On top of ASP.NET Core programming model Runs on Kestrel web server, based on Libuv
  9. ASP.NET MVC Core 1: Little things • Logging: https://github.com/aspnet/Logging •

    Configuration: https://github.com/aspnet/Configuration • Options: https://github.com/aspnet/Options • New Data Protection APIs: https://docs.asp.net/en/latest/security/data-protection/index.html
  10. ASP.NET MVC Core 1: Some causion “Don’t expose Kestrel web

    server directly to public, stick it behind a proper web server like IIS, NGINX as reverse proxy
  11. ASP.NET MVC Core 1: It’s good when you  Need

    a server-side framework to write any sort of web applications  Need to be able to host outside of Windows  Want to take advantage of new ASP.NET Core programming model  OK to occasionally pull your hair out
  12. Compression Summary ASP.NET MVC Core 1 ASP.NET Web API 2

    ASP.NET MVC 5 Active development ✓ ✗ ✗ Good for server-side rendering ✓ ✗ ✓ Good for HTTP APIs ✓ ✓ ✗ Can be hosted outside of IIS ✓ ✓ ✗ Can run on CoreCLR ✓ ✗ ✗
  13. Conclusions • Microsoft sucks on naming and versioning things •

    Use ASP.NET MVC Core if you are OK to run on CoreCLR • Stick with others if you cannot run on CoreCLR
  14. Resources • ASP.NET Core MVC Repository: https://github.com/aspnet/Mvc • ASP.NET Web

    API and MVC Repository: https://aspnetwebstack.codeplex.com/ • ASP.NET Core Docs: https://docs.asp.net • Some ASP.NET Core Samples: https://github.com/tugberkugurlu/AspNetCoreSamples