views:

79

answers:

5

I have been asked to choose between Web Forms and MVC for a minor internal company project. I do not know MVC. How much of MVC do i have to know to be able to make a decision?

Note: 1. I have read up on MVC to an extent that i know the high level design choices that I will have to make, however as a developer, I do not feel comfortable unless i code in it...

One other question would be, how do i go about spec'ing it without knowing what mvc is capable of (for example, i have been told that the datagrid control cannot be used the way it is used in web forms). I am sure that there is a way to go about spec'ing it out - stackoverflow was built by Jeff as he was learning MVC :)

Edit: I have been working with ASP.NET since 2002.

+2  A: 

The keyword is "minor". Do you want to turn a minor project into a long learning experience, or get it done and move on to something else?

Or is this a good opportunity to get a feel for the platform where the stakes are lower?

Sorry to answer your question with two more :)

harpo
+3  A: 

If it's a minor project, then I can see almost no downside to exploring MVC, and a lot of upside.

When I started learning MVC, I used it for a test project to host a silverlight app I was working on, as well as a minor REST-like service.

I found I was being productive in literally hours.

John Weldon
A: 

Hello,

MVC is, from a mental perspective, a decent enough change from the way web forms works, and can be challenging. Recently, on a new project of mine, web forms was chosen because of the learning curve; although I studied it and picked it up quickly, the upper eschelons thought otherwise. Especially with a tight deadline, it can be rough... the MVP pattern is another alternative if you choose web forms.

I love MVC, I would use it again, but I personally did find myself slowed down a bit at first as I changed from the perspective of designing pages to designing functions, and working with the framework to make everything work. I did find I had some performance gains because I could do certain things quicker, or use an AJAX more easily to be more efficient with.

I'd recommend reading Steve Sanderson's book if you are looking for a resource; it's excellent, and he updated it for MVC 2.0 I think.

HTH.

Brian
A: 

I used ASP.NET for several years, and when I had a chance I switched to MVC for a new project even though I did not know MVC at all at that time.

This is because I did not like ASP.NET. And because I do like clean design and other good stuff like DRY.

If you like ASP.NET and like to code in terms of dragging user controls to canvas (i.e. quick and dirty), there's no reason to choose MVC.

If you choose MVC, you would probably choose jQuery over UpdatePanel, or (Fluent)NHibernate over Linq-to-SQL/EntityFramework... etc. For me, this is more like tools-wizards-oriented development over code-oriented.

P.S. I do not say that ASP.NET means "quick and dirty and no design".

queen3
A: 

With MVC, you'll need to have a good handle on the browser side: html, css, javascript and/or a javascript library like JQuery. Depending on the UI design, you might find yourself looking at various UI widgets, adding to the learing curve.

Like queen3, I too love good architecture and MVC shines when you're building an application that has a significantly large and complicated domain and that will need to be extended and maintained into the future. To make the most of MVC, you may also want to pursue unit testing and Test Driven Design, TDD. TDD doesn't only mean you're doing unit tests but also designing your code to support unit testing; paying attention to concepts like loose coupling and high cohesion.

For a "minor" intranet site, I'd stick with webforms, unless you have the luxury and buy-in from management to use this opportunity for learning MVC. I too recommend Sanderson's excellent book.

BillB