ASP.NET MVC vs ASP.NET Core, what will be the future?
Since its introduction in 2002, Microsoft’s ASP.NET framework has become one of the most common programming frameworks in use today. Historically, ASP.NET was split between a few different sub-frameworks including ASP.NET Web API, ASP.NET Web Pages, and their most commonly adopted framework: ASP.NET MVC. In anticipation of the launch of ASP.NET Core, which unifies the older sub-frameworks into a single programming model, Microsoft has halted development of ASP.NET MVC, leaving many developers left to wonder whether to keep utilizing ASP.NET MVC, or migrate their applications to ASP.NET Core.
ASP.NET MVC, an introduction
ASP.NET is a pattern-based development framework used to create dynamic websites and web-based applications. As a framework, it is incredibly versatile, testable, and powerful, offering a robust feature set and some truly powerful tools. Thanks to a wide range of view engine support, ASP.NET MVC apps are incredibly easy to deploy on connected Windows based devices. Its arc is based on three layers: Model, View, Controller.
Model is the central component of the application. Existing independent of the user-interface, the model acts as the dynamic data structure, directly managing the data, rules, and logic of the application.
Broadly speaking, view refers to any representation of the data. In the context of web application, view is the visual component of the user interface, which can be changed based on Model data and user input.
The controller accepts user input and uses it to modify the model or the view, assuming the inputs are validated.
ASP.NET Core was designed to unify the most important ASP.NET components under a “learn and compose” framework. Unlike the previous ASP.NET components which were released under a variety of different licenses, ASP.NET Core is a fully open source framework. By eschewing reliance on the Windows exclusive .NET Framework libraries, ASP.NET Core is designed from the ground up to be platform agnostic. This allows ASP.NET Core apps to be deployed on MacOS or Linux based servers or devices.
So which one is right for you?
When to choose ASP.NET MVC
- You’re working on an already developed app and want to expand functionality
- Your team already has experience with ASP.NET MVC
- Your application will only be deployed on Windows based devices and servers
- You prefer to work on a mature and thoroughly documented framework
When to choose ASP.NET Core
- You prefer to work with a framework that is fully open source
- You want your application to be deployable on any OS
- You’re comfortable with working on the bleeding edge of development
- You want an application framework with a long development roadmap ahead of it
My perspective as an ASP.NET MVC developer
ASP.NET MVC allowed developers like me to abandon our reliance on Webforms for developing our web applications. Using my existing knowledge of .NET Framework and Visual Studio, it vastly improved the way I coded web applications using the Microsoft software stack. Even my earliest websites devoted to the ASP.NET MVC community were coded using ASP.NET MVC!
ASP.NET MVC brought Microsoft’s development stack in line with the trend towards server-side applications, which became the web app revolution we all enjoy today. It was a necessary step to take, and has matured into a robust framework that will be useful for years to come.
ASP.NET Core: what comes next
Just like ASP.NET MVC before it, the aim of ASP.NET Core is to once again bring Microsoft’s web development stack in line with emerging trends and create a framework that can grow at the same pace as technology. Thanks to its age and reliance on things like OS specific frameworks and closed source components, ASP.NET MVC had serious limitations that would become more difficult to overcome with time.
This is not to say that ASP.NET MVC is dead in the water. Thanks to an active developer community and extensive documentation, MVC will still be a strong choice for developers who don’t have to worry about deploying on non-Windows devices, and ultimately may be a sound choice for developers who would rather wait for ASP.NET Core to mature before migrating.
ASP.NET Core, and the underlying .NET Core framework that powers it is incredibly powerful, incredibly scalable, and will only improve with time and subsequent development. Its fully open-source nature means developers have flexibility and the opportunities for expansion are unparalleled by anything that relies on closed source components. The OS agnostic nature of .NET Core also means that ASP.NET Core applications can be deployed on more devices and servers than ever before, including routers and IoT devices that are usually run on Linux.
Regardless of which version of ASP.NET you choose to develop your application, know that for the time being the future looks bright thanks to continued corporate and community support.