This article introduces ASP.NET MVC and answers some frequently asked questions about ASP.NET WebForms vs ASP.NET MVC.
What is MVC?
MVC or the Model-View-Controller is an architectural pattern used in software engineering for separating the components of a Web application. The MVC pattern helps decouple the business logic from the presentation layer which in turn gives you the flexibility to make changes to a layer, without affecting the other. This also leads to effective testing and maintainability.
The implementation of this pattern is divided into three parts:
- Model – Represents the domain specific data
- View – UI Components responsible to display the Model data
- Controller – Handles User Interactions/Events, manipulates and updates the model to reflect a change in the state of an application.
What is ASP.NET MVC?
ASP.NET MVC is a web development framework that embraces the MVC architecture. It is a part of the ASP.NET framework and provides an alternative way to develop ASP.NET Web applications.
Microsoft started working on the ASP.NET MVC framework in October 2007 and after a series of Previews and Beta Releases, ASP.NET MVC 1.0 was released on 17th March 2009. As of this writing, ASP.NET MVC 2 Preview 1 has been released
I find ASP.NET WebForms easier. When and Why should I Care about ASP.NET MVC?
Again, ASP.NET MVC is not introduced to replace WebForms. WebForms has been amazing in its own arena, but depending on your experiences with it and how far have you have exploited it’s usage in your applications, there are difference of opinions as far as its advantages and disadvantages are concerned.
Here are some points that will help you understand and embrace ASP.NET MVC.
ASP.NET MVC is for you if you –
- care to build applications that are maintainable, testable and are ‘abreast’ with the other development methodologies, a couple of years from now.
- emphasize on reducing complexity by enforcing ‘separation of concerns’ and introducing loose coupling. Tasks are separated and handled by separate components.
- are tired of dealing with postback and viewstate issues
- choose testability (Test Driven Development) over rapid application development(rad) where in rad, a single class is responsible for displaying output and responding to events. This behavior couples the layers tightly, making it difficult to test.
- have a large team of developers and want to promote parallel development where there are separate teams working on the view, controller and model.
- want to provide your application with multiple user interface. Since there is no or little dependency between different components, you can adopt a pluggable UI model in your application keeping the same business components.
- are worried that your smart-client look-a-like, tightly coupled and stateful abstracted webform model is difficult to test and breaks frequently while maintaining application.
- want a simple, seamless and maintainable AJAX experience like other platforms provide
- want meaningful, RESTful URL’s
- need to work on multiple platforms later. A shift from ASP.NET MVC to Ruby on Rails and other similar platforms is easier. It’s also a good option to consider for your career.
My advice to all you developers out there would be to go ahead and pick up this new technology, develop a sample MVC project and you will soon realize that you are following architectural best practices, are closer to the way web works and are using AJAX and JQuery efficiently to deliver jaw dropping UI experiences. A lot of our development time has gone in measuring the height and width in your apps – it’s now time to take a dive into the depth of it and see how things are done the right way – the web oriented way. After all, we will be trying a framework based on a pattern that has been used for over 30 years now! So the ‘it will work’ tests have been done for us.
Where can I download ASP.NET MVC from? Is it Free?
Yes, ASP.NET MVC is absolutely free. You can download ASP.NET MVC 1.0 from here
No comments:
Post a Comment