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

3a53a5136f530c121a196914aecf3936?s=128

Tugberk Ugurlu

November 01, 2016
Tweet

Transcript

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

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

    applications based on Model-View-Controller pattern.
  4. ASP.NET MVC 5 CTP was on 2007 http://www.wrox.com/WileyCDA/WroxTitle/Professional-ASP-NET-MVC-3.productCd-1118076583.html

  5. 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
  6. ASP.NET MVC 5: It’s good when you  Need server-side

    rendering capabilities  Doesn’t have a need for hosting outside of IIS
  7. ASP.NET Web API 2 “A framework which is optimized for

    creating HTTP APIs.
  8. 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
  9. 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
  10. ASP.NET MVC Core 1 “A unified framework which both has

    MVC and Web API programming models on top of ASP.NET Core.
  11. 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
  12. None
  13. 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
  14. 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
  15. 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
  16. 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 ✓ ✗ ✗
  17. 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
  18. 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