The Benefits of MVC Architecture in Web Applications

In developing web applications using Microsoft ASP (Active Server Pages) .NET technologies, you have the option of using MVC (Model View Controller) architecture or as an alternative, Web Forms. MVC architecture was introduced to seperate layers of the web application so they are independent of how the other layers are implemented, which provides a better environment for testing and seperating code. The Model, View and Controller can be seperated from each other and tested separately, written and swapped independently. This is beneficial (compared to Web Forms) as it allows developers to write better tests using mock input, and test sections of the code with loose coupling. They call this decoupling, where the code is not tied to many other sections of the application.

MVC also provides better scalability when the web application becomes quite substantial in size, and reduces the complexity of the code (less Spaghetti code and easier to follow). However there is a greater learning curve using MVC than Web Forms, and more emphasis on scripting and coding rather than having a visual editor design approach similar to Windows Forms. If the Web Application is going to be substantial in size it is recommended that you use ASP.NET MVC for better testing and coding styles.

Leave a Reply

Your email address will not be published. Required fields are marked *