Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learn MVC in a new project, or stick with WebForms?

I'm a front-end guy who's picked up ASP.NET WebForms through working on various projects at my agency.

I have a project with a developer in mind, and I want to use/learn MVC for it - but he thinks it not worth using MVC at all. His opinion is that the benefits of MVC are perceived, and that performance won't be an issue, and it better to just push forward with WebForms.

The project is a web app that will give people project planning tools, creation of a personal contact database, and their own basic website.

My personal feelings are that I hate all the bloat that comes with WebForms sites - the ViewState, the one , the enormous JS files, the lack of control of markup (e.g. validation controls).

Obviously, ASP.NET WebForms is linked to resources, but MVC is about URL structures and interpreting them.

After discussion and research I'm thinking now that because of the supposedly large transition/learning curve of MVC, it really is better to just stay with WebForms.

I watched Ryan Singer work with RoR MVC in person, and I was stunned at how rapid everything was to develop.

Should I just accept that it's more pragmatic and productive to keep with WebForms now, and not use MVC, or should I find a way of convincing my co-worker that MVC is the right thing to do?

like image 983
Phil Ricketts Avatar asked Dec 13 '10 11:12

Phil Ricketts


People also ask

Should I use MVC or Webforms?

Asp.Net Web Form has built-in data controls and best for rapid development with powerful data access. Asp.Net MVC is lightweight, provide full control over markup and support many features that allow fast & agile development. Hence it is best for developing an interactive web application with the latest web standards.

How many days it will take to learn MVC?

As for me, it takes about 2-3 weeks to tack on another language, and about a month after that for me to feel fully competent in it; results will vary depending on your motivation and the language/framework itself (Python was really fast).

Is MVC faster than web forms?

Show activity on this post. My completely unscientific opinion: Yes; ASP.NET MVC is faster than web forms. ASP.NET MVC gives screen pops on the order of 1 to 2 seconds. Web forms is more like 3 to 5 seconds.


1 Answers

I would strongly recommend the ASP.NET MVC front - maybe it takes some time to get into it! But it's certainly been that. If, for example, back to change anything in retrospect, it is much more flexible and easier.

I would use this with LINQ, for example if you are using a database.

ASP.NET MVC may seem very difficult at first, but once you get into it you can make projects far more quickly. It is certainly my opinion.

Another good thing is that we have built good support for Test Driven Development.


Edit (added explanation):

One reason is that MVC is built up is 3 parts Model, View and Controller. This means you can share the logic from the markup in a good way. I will not go into details of how MVC is built here, since this is a chapter of its own! (http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller)

And as I mentioned above then you have very good support for TDD, which I personally do that I could use this only for this reason. URL Routing in ASP.NET MVC is also quite fanatical, which I have missed good support in ASP.NET. ScottGu has written a really good blog about just this: http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx

like image 116
eriksv88 Avatar answered Sep 18 '22 21:09

eriksv88