views:

140

answers:

5

Hi, Please note: this is NOT an MVC vs web forms general debate question. I'm looking to find what is the best choice for my situation and could use some guidence. I understand that MVC is not a replacement for web forms and they both have their advantages/disadvantages.

I'm starting to design and will soon start development for a few different websites, one is larger in complexity and is a basic social networking site... the other is a slimmed down simpler version which doesn't require too much functionality. Will be doing the smaller one first.

In both cases I will need to have things like: 'prove i'm human' control (e.g. CAPTCHA), MP3 Player w/ library, 'share this with facebook/muyspace/etc...' control, ability to upload flash/mp3/images/etc.. and in the bigger site I will need integration with google maps API among other things like forum software.

I am a .NET developer with 7 years on/off using ASP.NET web forms.. although keyword on/off, as I've done mostly server development over the last 5 years with lightweight client apps. I'd say I'm 'OK' with ASP.NET web forms.

I've never done anything with ASP.NET MVC before, but I did go over several tutorials @ asp.net, and I like what I see. I really like how they built testability right into the framework, this will make longterm maintaince much easier because I'll be able to unit test the front end UI logic. There's also other advantages, especially for public sites like no more Page having to have an URL mapped to it and easily create custom url names. It does have a bit of a steep learning curve that I'm trying to climb; so far I think it's a better development platform in general..

But bottom line: looking at my requirements, and experience, which is the better choice? I did find CAPTCHA for MVC, and the 'share with everything' control which just uses vanilla HTML. I only found an MP3 player as a server control for web forms and didn't find anything for MVC...

Considering I'm going to use a lot of 3rd party tools, would it be a mistake for me to go the MVC route? As much as I want to learn it because of how cool I think it is (lol), I'm going to need to use a bunch of 3rd party controls, and don't have time to develop them myself; I need to use as many already inveted wheels as I can. What is your opinion on this?

Thanks for any advice, & happy turkey day my fellow geeks =P

+1  A: 

Perhaps this answer will be useful: http://stackoverflow.com/questions/390693/does-anyone-beside-me-just-not-get-asp-net-mvc/390783#390783

And regarding server side controls: if you can get your hands on the source code and they don't rely on viewstate too much, you can just rewrite them to use classic GET/POST approach. But generally server side controls are not usable in ASP.Net MVC, so if your project is all about user interface, then you'd be better of using web forms approach. ASP.Net MVC is for CRUD applications and applications where logic is much more complex than UI.

HeavyWave
Thanks for the note; but I'm a bit confused... what do you mean by '... and applications where logic is much more comple than UI'?Shouldn't all ASP.NET / web apps in general be mostly UI logic? Any heavy proccessing should be done on a Windows Service that your web app talks to - to free up the web server, among other things... and from my experience, very heavily UI driven apps are better left for WinForms anyway... but in my case I need a public facing internet site...
dferraro
BTW, great link. However it is a year old - so I wonder how much has changed since then and how peoples opinions have evolved....
dferraro
Complex logic is not necessarily heavy computation. What I meant is that MVC is better for applications where separation of logic and presentation is an absolute must, as with WinForms you naturally couple them here and there.
HeavyWave
+1  A: 

My two cents worth is use MVC for sure. But I can say that because I have deployed several MVC sites now and I went through the learning pain.

I actually had to write 4 pet sites before I understood good mvc architecture, jQuery etc etc. So if you are thinking about just diving in and writing the site, then I'd caution you to slow down and take your time.

I think you need to do NerdDinner, if you haven't already and go from there.

Also the other big tip I can give is when you are developing, research (everything). If you want to organise your partial views in folders, or share them, just to name one thing, then research it.

You'll find a wealth of knowledge and the frame work is awesome. But you really can get it horribly wrong very quickly.

If you are pushed for time, and you don't have the luxury of a re-write when you write your big site, then I'd say leave MVC for a time when you do have those luxuries.

If your timeline isn't too hectic and you have time to research then great get into it.

I know this is a wishy-washy answer but....

griegs
+2  A: 

It's difficult to give a recommendation based on your requirements - based on what you indicated I think both Webforms and MVC will do what you want.

There are 2 key points which you make here.

  1. Your experience with Webforms. Even though I am a huge fan of MVC there is quite a learning curve before you get it absolutely right. Your experience with Webforms will go a long way in speeding up your development. Having said that, the framework is definitely simpler in concept and the amount of information available for someone keen to get into MVC is massive. Nerddinner is definitely a fantastic place to get started - after running through that series you will definitely have the proper knowledge in place. (I also did a blog about resources for learning MVC - http://www.jacopretorius.net/2009/11/so-you-want-to-learn-mvc.html - yes, I'm shamelessly posting my own link here :D )
  2. The testability of MVC. This is the one feature of MVC that will make me choose MVC over Webforms every day of the week. In terms of long-term maintainability MVC will simply blow Webforms out of the water. Especially for the larger website you need to develop.

I agree that MVC is the better development platform, but at the end of the day you're not trying to deliver a better development platform, you're trying to deliver business value. Just keep in mind that this doesn't mean you should just hack together the business solution as quickly as possible - you will need to maintain this solution for years to come so maintainability should be right at the top of your list.

One final word of advice - make sure you do both websites in the same framework - your experience on the first website will go a long way towards speeding up development in the second one.

Jaco Pretorius
Thanks for the advice, and the awesome link - will read through it.Something to note- these are all personal projects that I'm tackling. My 'real life' job is a LOB application developer, and we use nothing but ASP.NET web forms with occasional WinForms at work.I want to create some social networking type sites - I figure if I do them in MVC, then even if the sites fail, at least I learned a new technology that I can now bring back to work and train the team on - which is a huge advantage and great leadership opportunity - especially knowing my boss is looking for someone to do this
dferraro
Thats a good reason. Even if you see at some point that ASP.NET MVC is not good for the job you then have a better understanding of what kind of projects go well with ASP.NET MVC.
Malcolm Frexner
+1  A: 

If you think MVC is better platform so you may want to proof it : so don't hesitate and start both projects in MVC and don't fear. I think you would get so many help and support in MVC these days and every problem you face is something new you learn and one another thing any problem you can't solve others would can so don't be shy and answer unsolvable problems here...

ali62b
+1  A: 

Considering I'm going to use a lot of 3rd party tools

If you mean WebControlls by that then you might be better of using webforms. There are not a lot of 3rd party controlls for mvc out there.

Malcolm Frexner
I did find that Google Maps API can be implemented in MVC pretty easily.I also found that Telerik now has MVC controls. I love Telerik. So perhap this is less of an issue then I expect
dferraro