Reputation: 8690
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?
Upvotes: 7
Views: 1078
Reputation: 1127
There're 100 reasons to choose MVC, or Web Forms. But given that you're a front-end developer, the learning curve for you is not as much as back-end developers, who usually have very little idea on coding HTML.
Your existing skills like JS, CSS and Html will be seamlessly ported to MVC.
Upvotes: 0
Reputation: 3528
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
Upvotes: 6
Reputation: 23551
It is probably worth learning MVC just for the sake of education. It gives benefits to the front end dev for sure but there are downsides for the backend guys. However for a small project with normal amount of client-side work it is probably the same so you can use the project to learn a new technology. BTW I too prefer Web Forms as it is a higher level of abstraction.
Usually you should choose ASP.NET MVC when you have AJAX heavy frontend with a lot of animations and visual effects where the control over the markup is important. You should choose Web Forms if you have a lot of data input and widget style independent controls that you reuse a lot because you can encapsulate the behaviour a lot better.
Upvotes: 0
Reputation: 37533
MVC is a large learning curve because it's very different from web forms. If you are doing this project with someone else who doesn't want to learn MVC, then you may as well stick with web forms. You can't teach someone who doesn't want to learn, so you'll basically be spinning your wheels fruitlessly, and you already have a background in web forms so you'll at least be comfortable and familiar with the environment enough to make progress.
If you're doing this on your own or with a team that is willing to learn MVC, then I would recommend going that route less for the performance and tool availability than for learning something new and moving towards a framework that is largely built on the concept of test-driven development.
Asp.Net MVC is a very different framework, and it has definite advantages, but you'll also be dealing with the disadvantage of inexperience, so you'll need to have a project you can take your time with because you'll undoubtedly have to restart certain things a few times before you get things how you want them to be. You'll start, learn something new that makes you go back to square one, learn something new that makes you go back to square one, lather, rinse, repeat.
Upvotes: 4