views:

757

answers:

11

What should developers moving from ASP.NET Webforms watch out for when they move to ASP.NET MVC?

+10  A: 

Read Steven Sanderson's book (from cover-to-cover).

Jim G.
+1 - Very good book
Martin
This is the one I recommend.
RichardOD
Excellent book indeed.
Carles
+5  A: 

http://www.asp.net/learn/mvc-videos/

Check out the "How Do I?" Videos and the MVC Storefront. That is how I learned MVC.

Martin
+3  A: 

I trust you've already gone through Nerd Dinner.

if you have a large website that needs converting then you may want to take a look at how to run both WebForms and MVC together and then convert your website bit by bit.

griegs
@griegs any links for that...
Pandiya Chendur
http://aspnetmvcbook.s3.amazonaws.com/aspnetmvc-nerdinner_v1.pdf
Bumble Bee
http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx
griegs
+1  A: 

follow this tutorial

Bumble Bee
+16  A: 

Sara Chipps did an excellent series called 'ASP.NET MVC Translated for a Web Forms Programmer'. Here are all 5 posts in the series:

  1. Explaining the M, V and C – Introduction explaining Models, Views and Controllers
  2. Creating your first MVC Application – Explaining the default components that get created with a new MVC project
  3. Working with the Controller – Introducing ActionResult and related concepts
  4. POST and GET – Introducing strongly-typed Views and posting to Actions
  5. What the Frig is a View Model?

Once you've gone through that it's probably a good idea to take a look at some tutorials. There are 2 in this area that I would recommend.

The first is NerdDinner by Scott Guthrie (affectionately called ScottGu, or just 'The Gu'). This is an excellent series starting with the very basics and going through all the details of a proper MVC application – CRUD, ViewModels, Partial views, Ajax and Unit Testing.

The second is the MVC Storefront Series by Rob Conery. This is another excellent series guiding the reader through the details of creating an e-commerce application using MVC, Linq-to-Sql and TDD. When I started with MVC this was the only series I looked at and it served me very well.

Jaco Pretorius
A: 

Try not to carry the unwanted baggage from Winforms.Developing webapps is a moderately different game.

+1  A: 

I found this link just fitted for the question : http://girldeveloper.com/waxing-dev/asp-net-mvc-translated-for-the-web-forms-programmer-1-in-a-series/

ali62b
+1  A: 

I think the transition will depend a lot on if you've done web programming outside of ASP.NET (Webforms) before. If you've done something like PHP or classic ASP before, then ASP.NET MVC won't be a big shock - you just may need to pick up that rendering the html is done as a second step after processing, rather then mixed in. If you've never done web development outside of Webforms you could have a serious hurdle to overcome, since Webforms hides the stateless request/response nature of the web with a simulation of event based programming. If you're in the second category just try and approach ASP.NET MVC as something totally new, it will be far closer to console programming then desktop programming.

David
+2  A: 

This video tutorial by Rob Conery (Who helped build and write the MVC Framework) on tekpub is pretty good. I just watched the first video last night and thought it was well done. Rob is easy to listen to and knows his stuff.

http://tekpub.com/preview/aspmvc

Adam Carr
A: 

I think the first thing to do is forget everything you know about ASP.NET. Most of what you used in WebForms won't work, or won't work as expected.

Approach it as a whole new ball of wax, then once you know a bit you can see where the common threads are. But there's much fewer than you think.

Shlomo