Pro ASP.NET MVC 2 Framework (Expert's Voice in .NET)

Category: Programming
Author: Steven Sanderson
4.6
All Stack Overflow 26
This Month Stack Overflow 9

Comments

by anonymous   2019-07-21

If you use Entity Framework 4, you can generate POCO object automatically from the database. ( http://blogs.msdn.com/b/adonet/archive/2010/01/25/walkthrough-poco-template-for-the-entity-framework.aspx)

Then you can implement a generic IRepository and its generic SqlRepository, this will allow you to have a repository for all your objects. This is explained here : http://msdn.microsoft.com/en-us/ff714955.aspx

This is a clean way to achieve what you want: you only declare your object once in your database, generate them automatically, and can easily access them with your repository (in addition you can do IoC and unit test :) )

I recommend you to read the second edition of this book which is pure gold and updated with the new features introduced in MVC 2 http://www.amazon.com/ASP-NET-Framework-Second-Experts-Voice/dp/1430228865/ref=sr_1_1?s=books&ie=UTF8&qid=1289851862&sr=1-1

And you should also read about the new features introduced in MVC3 which is now in RC (there is a new view engine really useful) http://weblogs.asp.net/scottgu/archive/2010/11/09/announcing-the-asp-net-mvc-3-release-candidate.aspx

by anonymous   2019-07-21

The short answer is - don't use ASP.NET server controls in ASP.NET MVC. ViewState is not supported in MVC and using 'codebehind' files completely against the methodology of MVC - you don't 'handle events' you submit values to a controller which then handles the logic and returns a view.

As you don't seem clear on what MVC is, I would suggest that before embarking on an MVC project you first read Comparing Web Forms And ASP.NET MVC by Dino Esposito (MSDN). This should give you an overview on the differences between web forms and MVC. If you then wish to use MVC I would strongly suggest you visit http://www.asp.net/mvc/ and watch and read the tutorials to get a flavour for it. It's not something you can just dive into as it is a very different framework to standard web forms and requires a whole new mindset. Once you've done that, get a good book, such as Steve Sanderson's Pro ASP.NET MVC Framework (V2 is released in May, so wait for that).

by anonymous   2019-07-21

The best 2 books are:

Pro ASP.NET MVC 2: http://www.amazon.com/ASP-NET-Framework-Second-Experts-Voice/dp/1430228865/ref=pd_sim_b_1

jQuery in Action: http://www.amazon.com/jQuery-Action-Bear-Bibeault/dp/1933988355

There is the MVC 3 version of Pro ASP.NET MVC: http://www.amazon.com/Pro-ASP-NET-MVC-Framework-Third/dp/1430234040/ref=dp_ob_title_bk

There is a basic MVC 3 tutorial on the ASP.NET site: http://www.asp.net/mvc/tutorials/creating-a-mvc-3-application-with-razor-and-unobtrusive-javascript

Also a great video tutorial here, http://www.pluralsight-training.net/microsoft/courses/TableOfContents?courseName=aspdotnet-mvc3-intro, there is a whole 47m chapter dedicated to AJAX and Javascript (including jQuery).

by anonymous   2019-07-21

Peopl seem to have cover the basics of your question but a good resource to get you started would be :

Channel 9 Full Stack Series

This is a walk through of some of the new MVC 3 features including EF nuGet(Pack) and even soem win phone 7 stuff.

Also Scott Hanselmans talk at PDC is pretty good but again is based on MVC 3

Scott's talk PDC 10

I'd recommend looking into 3 it has some nice features and is RC Release Candidate now, So wont be to long before it's full release. Would be a shame to get your app up and running just when you need to update to get all the new goodies ;)

Also agree with Hector Steve Sandersons book on MVC is a great read covers everything you need (and is V2)

by anonymous   2019-07-21

Sanderson's book http://www.amazon.com/ASP-NET-Framework-Second-Experts-Voice/dp/1430228865/ref=sr_1_1?ie=UTF8&qid=1286544141&sr=8-1 is really good. I have used both editions of the book for MVC1 and MVC2 and it has been great.

He does a really good job starting off basic and getting more complicated. There is also a big case study that you slowly build up as you go through the book.

by anonymous   2019-07-21

Regarding question number 5, the best thing you can do is get yourself a copy of Steven Sanderson's Pro ASP.NET MVC 2 Framework.

http://www.amazon.com/ASP-NET-Framework-Second-Experts-Voice/dp/1430228865

by anonymous   2017-08-20

You can read this great book for beginers in ASP.NET MVC IoC and TDD Steven Sanders