.net MVC 3

Soldato
Joined
27 Mar 2003
Posts
2,710
So I have been looking at this recently and it seems really interesting.

I have been using .net web forms for a few years and stumbled across this on the asp.net site when looking through the forums.

So just wondering if anyone can recommend any books or decent online material that gets a little more indepth into this technology i have a couple of project ideas that I want to try out rather than use web forms.

Thanks in advance for any suggestions.
 
There's an awesome MVC tutorial created by Scott Guthrie which takes you through the process of creating a site called Nerd Dinner. It's for MVC2, but the underlying principles are the same.

The biggest difference in MVC3 is the Razor view engine with it's much better @ syntax. There's a guide on all of that here.

Once you start with MVC you won't want to touch another WebForms site again :)
 
I really need to get involved with MVC, it all looks really smart and geared towards making the life of the developer less stressful. WebForms on the other hand drives me absolutely insane :p
 
MVC3

Go to http://www.asp.net/mvc then look at the PluralSight section on the left. Lots of good free material there too.

I love MVC 3 and the Razor view engine is worth getting into as well. I don't think I will use asp.net web forms etc any more.


Feel free to give me a shout if you get stuck on anything.

Mark
 
Thanks for that. I'm trying to convince work to send me on an mvc course at the moment as one of my training needs as I think the power that I have seen in the few samples on the asp.net site seem to be a lot more logical and code benefit our business hugely.

Plus correct me if I am wrong here but it looks like MVC also makes you think a little bit more about your initial design and implementation which I think will be a big benefit to me.

I don't know if anyone else is like me but I have too many ideas while trying to implement solutions so get sidetracked into delivering things which I think may be cool but not always required.

I see this more as part of my development and furthering my love for programming.

If it also means I can give up web forms and move 100% away to this new tech it will be a happy day for me.
 
Yes, MVC is 'convention' based so it means it has a way of doing stuff that you need to embrace. This is good and sounds like it will be a big benefit to you. The very fact of it being Model View Controller means you will put stuff in the right place and your app will better written as a result.

I have got a colleague at work to start using it and once the penny started to drop he really liked it.

Will you be using a database because using Entity Frameworks is also a good thing too.

This is my website where i do all my learning, this used to be web forms but now is MVC3 http://www.quotationmark.co.uk/PremierLeague
 
I ran through MVC 3 Music Store initially which was pretty good, couple of oddities in the code at the time but there were fixes in the comments (it's probably been fixed now anyway).

Went from that to being thrown into writing an ASP.NET MVC 3 + WCF with EntityFramework project, fun times :p.
 
Yes, MVC is 'convention' based so it means it has a way of doing stuff that you need to embrace. This is good and sounds like it will be a big benefit to you. The very fact of it being Model View Controller means you will put stuff in the right place and your app will better written as a result.

I have got a colleague at work to start using it and once the penny started to drop he really liked it.

Will you be using a database because using Entity Frameworks is also a good thing too.

This is my website where i do all my learning, this used to be web forms but now is MVC3 http://www.quotationmark.co.uk/PremierLeague

Yeah I will be using SQL 2005 as the database and Entity Framework has been mentioned to me so I will probably check that out while am looking at MVC
 
The one by Steven Sanderson (Pro MVC) is very good, I'd recommend that. I believe the 3rd edition was just released (for MVC 3).

Since picking up MVC there is not a hope in hell I'm going back to webforms.
 
Go for it and never look back, it can be a bit of a painful learning curve especially if you used webforms before. There is far less black-magic going on in MVC (though it is MS so still expect much voodoo!) so make sure you know the in's and out's of HTTP before trying it out.

ViewState was the worst thing to ever come out of ASP.NET, ugh the projects I inherited.
 
Anyone using MVC simply must use MvcContrib. It does away with a lot of the convention based stuff (like using Strings for every controller/action/redirect.. :rolleyes: )

It also has a bundle of test utilities that make testing a complete breeze.
 
I think when it comes to ASP.NET using any form of controls is usually more hassle than it's worth, stick to straight HTML with jQuery (or similar) plugins / AJAX if needed, ASP.NET controls end up in far too much hacky / messy client code.
 
I agree when it comes to things like datepickers, or sliders etc. however the MvcContrib controls replace the standard form controls - @Html.TextBox() etc - with versions which give you much more control over the parameters used in the markup of the controls.
 
Ah I see, nice I'll have a look into that, I've heard of the framework before but not used it, I'll be sure to check it out in my next project!
 
MvcContrib has been "adopted" by the MVC team, and the end effect is that the stuff in MvcContrib will eventually be in MVC future versions. :)

The MvcContrib controls are pleasant to use. Usually for the tedious things like simple model editors and grids/tables. :)
 
I use MVC3/Razor. It is so much better than web forms. Everything just seems to slot together so much more nicely. A big recommendation from me :)
 
Another +1 from me!
I've used Web Forms professionally for 8+ years now.
Built my first MVC3 site, that went live last week. So much easier than Web Forms, although I had to work out how to do simple tasks that I knew how to do in Web Forms!

I do love how easy Entity framework is too!
 
Back
Top Bottom