Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I just started learning the ASP.NET MVC framework and it's very different in architecture from regular ASP.NET development. Transitioning from windows forms to WPF was nice, and seemed a way forward in technology. But, while learning ASP.NET MVC, I don't feel the same, I am unable to convince myself that MVC is better than WebForms. It just seems that they made some tweaks to the already available web framework and adopted the MVC architecture from some other language.

Is ASP.NET MVC the step ahead in development? Should I learn and develop my future projects based on this platform and architecture? To me, it just seems like Microsoft is throwing a new architecture just along with WPF or copying Ruby on Rails. WPF seems promising and great while ASP.NET MVC just makes you crumb-some [sic]. They have removed the controls, thrown a new control system and data-packaging, and it's all together an extreme change to WebForms.

I realize that with MVC you have great freedom in the testing aspect, but I don't believe that this makes a lot of difference in small website or projects. If you ignore the value of testing, What are your takes on this?

share|improve this question
    
What does v/s mean in the title of this question? From context, it seems to mean versus, which is usually abbreviated vs. I've never seen the abbreviation v/s before. Is that standard usage somewhere, or did you make it up? Or does it stand for something else entirely? –  TRiG Apr 10 '12 at 14:02
    
You really should change the title of this question. ASP.NET MVC is ASP.NET. There is also ASP.NET Web Forms. That, too, is ASP.NET. ASP.NET is the overall web strategy on the .NET Framework platform that encompasses both ASP.NET MVC and ASP.NET Web Forms. This is demonstrated in the latest version of Visual Studio 2013; you can create an ASP.NET web application, and use checkboxes for which features you want, ASP.NET MVC or ASP.NET Web Forms or ASP.NET Web API or whatever else. –  stimpy77 Dec 6 '13 at 19:01

2 Answers 2

up vote 6 down vote accepted

My personal opinion is that ASP.NET MVC is the step ahead.

ASP.NET Web Forms had some advantages mainly with the fact that you were programming as in Windows Forms with an event base approach. If you programmed in Windows Forms, sure you were practically at home. You also wrote as less HTML/CSS/Javascript as possible. However, you also have several drawbacks because even if the code is behind it is still directly coupled to your display logic, ... and ViewState/PostBack ? Enough said (It was necessary but what a mess...)

I could write a very long comparison between the two here but I give you this link, it draws a much more detailed comparison than I could give here, it's great: http://coderjournal.com/2008/12/introducing-aspnet-mvc-part-2-aspnet-mvc-vs-webforms/

I'll just add that since ASP.NET MVC is decoupled from the display logic, you may use different rendering engines (Razor is great IMHO), check out Wikipedia's information on this.

share|improve this answer
    
How do we explain viewstate, sorry to ask this but can you give me an example to understand this term as i don't know much about it. –  Pankaj Upadhyay Aug 14 '11 at 12:08
1  
Microsoft's introduction to the "ViewState": ""Microsoft® ASP.NET view state, in a nutshell, is the technique used by an ASP.NET Web page to persist changes to the state of a Web Form across postbacks"". Now, my own words: HTTP is stateless and by using this hidden "ViewState" field, Microsoft created the illusion for the developer that it is stateful, which means that data entered by the user is kept across postbacks, without you worrying. There is a nice explanation on how "ViewState" and the whole page lifecycle in ASP.NET works at msdn.microsoft.com/en-us/library/ms972976.aspx. –  Jalayn Aug 14 '11 at 17:00
    
dats a great link. I found that an hour or so ago, but thanks for listing it here. –  Pankaj Upadhyay Aug 14 '11 at 17:21

I would definitely choose ASP.NET MVC over "classic" ASP.NET if I had the opportunity.

Sure, a lot of what's in ASP.NET MVC is similar to what you'll find in Ruby on Rails (or most MVC web frameworks these days) but that's not a bad thing -- the URL routing and separation of controllers from views is actually a really nice way to work, once you get the hang of it.

And by keeping the framework in tune with how the WWW actually works, rather than trying to cram a square peg into a round hole and force a "stateful" model onto a stateless protocol (like "classic" ASP.NET did), it drops all the horrible and leaky abstractions that ASP.NET had.

Should you learn ASP.NET MVC instead of WPF? I don't know, is that even a valid choice? You certainly can't use WPF in all the places ASP.NET MVC would work (and vice versa) so I don't think you should learn one "instead of" the other...

share|improve this answer
    
i was talking between the asp.net and asp.net mvc. WPF was mentioned in context with windows form. –  Pankaj Upadhyay Aug 14 '11 at 11:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.