Why we develop with Microsoft ASP.NET MVC
Today there are a number of platforms on which to develop new software. It can be overwhelming to decide which is best for the job. At Unstoppable Software, we keep an open mind to using different programming languages, frameworks, and tools to provide the best experience on any given project. However, it is not practical to spend weeks researching and prototyping each technology stack before beginning implementation on a project. With that in mind, our default selection for Web applications is to use Microsoft ASP.NET MVC.
Every technology decision has benefits and drawbacks. We believe ASP.NET MVC is a great choice for most Web projects.
Why is ASP.NET MVC Better than other Web Languages?
ASP.NET MVC was created and is supported by the software giant, Microsoft. This is in contrast to many of the open-source programming environments that are popular these days, like Ruby on Rails. Microsoft allocates unmatched resources to producing a high-quality, fully-tested, secure, and productive programming language and development environment.
In addition to being supported by a huge, for-profit corporation, ASP.NET MVC has inspired a great community. Developers create plug-ins and components that can easily be incorporated into ASP.NET MVC projects to improve productivity. There are also many forums where people answer questions and trade recommended practices. The community tends to have enterprise-centric perspectives, which can be beneficial compared to the PHP community which tends to focus on the consumer Web.
There are also specific technical attributes about ASP.NET MVC that make it better than other platforms:
Performance – ASP.NET MVC is a compiled language. This means that the source code is translated to machine code before it is deployed to the web server. In contrast, languages like PHP and Ruby on Rails are interpreted. They are compiled into executable code at the time they are needed. Since interpreted code is compiled “just-in-time” like this, it is usually a bit slower.
Security – ASP.NET MVC defaults to appropriate choices for increased security over other options, like PHP.
- The Razor View Engine that is used automatically HTML encodes values.
- Cross-Site Request Forgery (CSRF) threats are mitigated by using a simple ValidateAntiForgeryToken attribute.
Deployment – uploading completed Web applications to Microsoft Azure (Cloud) is simple, saves time, and scales well
Productivity – Microsoft has created an Integrated Development Environment (IDE), called Visual Studio, that is extremely powerful for rapid application development as well as troubleshooting and maintaining existing applications.
Why is ASP.NET MVC Better than Microsoft Web Forms?
Since ASP.NET Web Forms was released in 2002, a lot has changed around the Internet. Web standards have strengthened. Client-side programming has risen. Expectations for the look of user interfaces have increased dramatically. Similarly, developers have now grown up visiting and creating websites, so they inherently understand what it means to develop for the Web. ASP.NET MVC leverages this maturity into more understandable and scalable code, whereas Web Forms’ aim was to abstract away all of the messy elements to make Web programming appear more like Windows programming.
At Unstoppable Software, we believe developing on the Microsoft stack is the best choice for most projects, but why has ASP.NET MVC become the preferred option over Web Forms?
Separation of Concerns – ASP.NET MVC better separates different areas of code so they can be interchangeable. MVC stands for Model-View-Controller, which is a description of the structure of a good Web application, with three separate components. This allows for better integration with popular open-source libraries like Bootstrap, jQuery, Angular, or React. It makes it much easier for web designers to customize the look and feel of a Web application. It also makes it easier to automate unit testing for Web applications.
Productivity – now that ASP.NET MVC has been around since 2009, it has matured into a highly productive platform. The tools are there: It took a while, but it is now faster to develop with MVC than with WebForms. ASP.NET MVC uses a powerful concept called scaffolding to perform code generation based on other structural code. With this capability, a functional MVC application that reads and writes data to a database can be created in under an hour. More importantly, when it is time to exit the prototyping phase, MVC enables easy customization of the user interface and the source code. Even the scaffolding code generation can be customized and reused.
Versatility – ASP.NET MVC is built on Microsoft .NET, which is a very versatile platform. With .NET Core it can be hosted on your choice of server platform: Windows, Linux, Mac. ASP.NET MVC is not limited to simple Web technologies. It can also interact more deeply with Windows machines when necessary using .NET interop to talk to COM libraries.
Leverages the Web – ASP.NET MVC embraces Web protocols in ways that Web Forms didn’t. From that it gains a few advantages:
- The Internet is stateless. Every website click contains only the necessary information for that action. Web Forms tried to hide this by including workarounds to maintain state. ASP.NET MVC does not hold on to any illusions of state. Due to this choice, it scales much better in load balancing server environments.
- ASP.NET MVC applications use clean URLs that improve Search Engine Optimization (SEO) and all restful service calls.
ASP.NET Web Forms is still a highly popular platform for Web development. However, ASP.NET MVC is gaining in popularity, especially for the biggest sites on the Web, as we believe it should be. While there are definitely certain cases where it makes sense to stray from this technology, it is definitely a solid and reliable starting place for any Web project.
Improving Developer Productivity