Switching From WebForms to ASP.NET MVC: Is it Worth it?

Posted Posted by Ahmad Barirani in Web Development     Comments No comments
Oct
13

There are a lot of good stuff about the new ASP.NET MVC framework, but a question remains for developers who have invested heavily in developing applications and skills on WebForms: is it worth switching to ASP.NET MVC? For those who are interested in technical differences between both platforms, you can refer to the this article. What I will concentrate on here is productivity gain. At least for me, there was a real gain, although I had to deal with the little hassles of this new framework.And lets not forget, there are much more rich controls available for WebForms than ASP.NET MVC.

Well, to tell you the truth, relearning ASP.NET MVC wasn’t hard at all. It took me a couple of minutes to figure out how to create a Controller (right-click on project’s ‘Controller’ folder and click on ‘Create Controller…’ menu option) and to associate a View to an Action (simply call View() function and right-click on it and then select ‘Add View…’ menu option).

What I enjoyed more than anything was LINQ integration with Views. That’s partly because I really hated dealing with Data Controls like the Repeater or ListView. I mean they are great for plugging DataSources to them, but when it comes to customizing, they are nightmare. With LINQ and their IEnumerable objects, you have real power in your hands when it comes to have fast custom things on the View. What I really enjoy is code like the following:

<% foreach(SomeClass obj in Model) { %>
 
<% = Html.Encode(Model.SomeAttribute) %>
 
<% } %>

My feeling is that this kind of stuff gives great freedom to the developer which can lead to real time-saving also.

Aslo, ASP.NET MVC is much closer to HTML, so some of those send back/post back issues are not there anymore. I guess this is something else ASP.NET MVC developers don’t have to deal with.

Post comment

About Singular Technologies

Location: Montreal, Canada

Services: Internet strategy and marketing. Data mining. Information retrieval. Web analytics.