views:

531

answers:

4

I am new to ASP.NET Development and can't decide between developing with Webforms or MVC 2. Nevermind the pros and cons of each. I've seen mixed opinions of each. But which method would be the best for someone who has no prior experience in ASP.NET or C#?

If your answer is: learn both, then which should I learn first? MVC 2 or Webforms?

+2  A: 

Tough question.

What's your background in web development? Are you familiar with the MVC pattern?

Are you learning it for a job?

ASP.NET Web Forms are easier for beginners, as it hides much of the underlying implementation details of the ASP.NET engine.

ASP.NET MVC requires a deeper understanding of concepts such as routing and HTTP methods.

But yes - you should learn both.

As MVC is a new platform for developing ASP.NET Web Applications, i would learn Web Forms first. That way you will appreciate the benefits of MVC more when you contrast it to Web Forms.

RPM1984
HTML and CSS. My background is mostly in Java. I've learned a few things about MVC while learning Ruby on Rails. I have a very basic understanding of what is Model-View-Control is all about. I am planning to learn ASP.NET for the future job yes and .NET will be my main area of interest.
Silence of 2012
I came from the same situation. However when i began my career in .NET there was no such thing as ASP.NET MVC.You should begin reading books on the core concepts of ASP.NET before you even decide on WebForms/MVC. Because many of the concepts are shared between WebForms/MVC - so before you decide which one is better, you need to understand the foundations.Remember,.NET > ASP.NETASP.NET > MVCASP.NET > Web Forms
RPM1984
i have to disagree that asp.net webforms and mvc share a lot of the same concepts. in mvc, there's no such thing as a user control or page lifecycle or postback events. webforms don't have viewdata, areas, controllers, etc. these are very different approaches to building for the web.
Chris Conway
+1  A: 

if you want to get your hands dirty and really understand how the web works, go MVC

if you want to drag and drop your way to a functional but overhead loaded website, use webforms.

really, this question is pretty difficult to answer not knowing your background. if you're comfortable with html, css, javascript it may not be too difficult to pick up MVC. if you're new to the web entirely, it can be daunting to learn that many technologies all at once and webforms abstracts a lot of that kind of stuff for you.

Chris Conway
I am a computer science major student. I've taken 2 Java courses and 1 Assembly (Intel x86) course so far. I do have basic HTML and CSS skills. Javascript not so much. With all that in mind do you think I should go with MVC in the long run?
Silence of 2012
honestly, webforms are easier to pick up and run with than mvc. it's a more encouraging learning experience being able to rapidly build a website and webforms will allow you to do that. mvc gives you much greater control and less overhead, but it's more challenging to put it all together once you move beyond the basics, in my opinion.
Chris Conway
+4  A: 

Hi Sahat,

I was in a similar situation to you a year ago. I'm a Computer Science student, well finished my course around a month ago. First two years of my course I worked with Java, PHP, Oracle, MySQL. This actually landed me an industrial placement at Oracle where I used their ADF which was Java based.

Anyway all of this made me start thinking about what I wanted to use for my final year project and with no experience of Microsoft technologies began to venture down that path. I wasn't aware of ASP.NET MVC and spent time learning ASP.NET WebForms. I liked the easy style of development, drag and drop is a very quick way of developing small sites. However I also disliked the lack of control I had and the simplicity, I didn't feel overly challenged.

During my final year I started to research Model View Controller and how it suits web applications. From this I came across ASP.NET MVC and in my opinion its far better than ASP.NET WebForms. There seems to be an emerging trend in MVC frameworks for web applications and this seems to be the hot technology to build web applications in.

Now finished I can say that teaching myself ASP.NET MVC was one of the best things I did. I don't know if you're British based, but only two Universities in Britain teach .NET. This made getting a graduate job much easier and I stood out from .NET candidates because I was from a Java course, the same as yourself.

The transition from Java to .NET is not particularly difficult all the theory and concepts are the same. Also ASP.NET MVC is becoming quite popular among businesses which specialise in the Microsoft technology stack. As it is quite a new technology learning now whilst young will be an advantage. I've ended up in a job where the company are rewritting their application from ASP.NET WebForms to MVC and only myself and the senior developer have ever used MVC leading to quite a large role in the project.

If you're interested my final year research can be found here and I have a chapter on ASP.NET WebForms and MVC

My source code is also on my site but its mainly MVC 1.0 not 2.0

Jonathan Stowell
Thanks you definitely convinced me to go with ASP.NET MVC :)
Silence of 2012
I am new to both WebForms and MVC (including MVC 1, 2, and upcoming 3). I spent 90% of time learning WebForms and had a quick look at MVC 2 example project provided by Visual Studio 2010, and I know MVC is definite choice for my future development.
Sheen
A: 

Hello

I had a few questions, and a very layman background in MVC2, and looking for some general answers. What I am finding, and maybe I am wrong, but if I have a view that is composed of multiple partial views, these partial views are limited in the communication between each other, during postbacks, etc. And that changing the data in one partial view does not refresh or update the other partial views. It also seems that MVC2 is very reliant on jquery or javascript. Am I wrong on this? Any reading recommendations would also be appreciated.

Thank you.

Mike
Sheen