Learn About ASP.NET MVC Via NerdDinner

I don’t know about you, but a great way to learn a new technology is to start using it. But to even start using it, it helps to be able to look at a real-world running application built on that technology. Combine that with source code and a walkthrough, and I think you have a winning combination.

That’s where NerdDinner comes in.

NerdDinner.com is the brainchild (and a big child at that) of Scott Hanselman. The concept is simple, let’s get nerds together over dinner so great ideas can flourish. The site is a great way to organize nerd dinners all over the place. The site is live and built using ASP.NET MVC, so go check it out.

But don’t stop there. Now that you’ve seen the site, go check out the source code on CodePlex. What better way to understand how the pieces fit together than to browse the source code for NerdDinner.

And I hope you don’t stop there either. There’s often a tendency to impart too much authority and expertise to an author. But as I’ve learned from writing this book among others, being an author doesn’t require any special expertise, gift, or ability. It just requires a love for self-inflicted pain. My personal pain threshold has been surpassed, so if you hear me talking about writing another, smack me…please.

In the spirit of Nerd Dinners, let’s get the ideas rolling! Create issues and let us know what you like and don’t like and what you think works and doesn’t work. We’re all in this together learning and refining our craft.

book-coverLooking at the site and source will show you what NerdDinner.com is, but to learn how it was built, I highly recommend checking out ScottGu’s blog post which presents a brisk end-to-end walkthrough of building NerdDinner.com.

His post is a preview of Chapter 1 of our book, Professional ASP.NET MVC 1.0. This chapter gets you started, while the rest of the book (still in production) dives deeper into each of the areas and concepts of the framework. And by the way, the eBook (aka Chapter 1) is licensed under a Creative Commons Attribution No Derivatives license, so feel free to redistribute.

So if you’ve been wondering why my blogging frequency declined this past year, now you know. Getting a release ready for RTM is a lot of work. Writing a book on that release at the same time is pure insanity.

Fortunately, I was in very good company with my esteemed co-authors, Rob “I Feel your pain” Conery, Scott “Five-head” Hanselman, and Scott “The GU” Guthrie, all of whom are completely insane! You heard it here first.

Technorati Tags: ,,

What others have said

Requesting Gravatar... Andrei Rinea Mar 10, 2009 4:08 PM
# re: Learn About ASP.NET MVC Via NerdDinner
I've tried coauthoring one with a friend and failed because of the pain you talk about. I feel your pain too.

Ofcourse I mainly congratulate you Phil !
Requesting Gravatar... Sarvesh Mar 10, 2009 4:20 PM
# re: Learn About ASP.NET MVC Via NerdDinner
I read the sample chapter. One of the biggest issues that I had with ASP.net is deployment. It is still such a pain to move your development to production. You got create setup projects for database, your web application (for this one you need to separate projects in case you don't want to deploy your code). It would have been niceer to show the deployment process but I am not certain if that has improved with the MVC framework.
Requesting Gravatar... Adam Vandenberg Mar 10, 2009 5:20 PM
# re: Learn About ASP.NET MVC Via NerdDinner
Bug: Typing in a zip code and pressing ENTER doesn't submit the search form.
Requesting Gravatar... Elijah Manor Mar 10, 2009 9:49 PM
# re: Learn About ASP.NET MVC Via NerdDinner
That is great! I look forward to reading it and browsing through the code!

I love how you all and Steven Walthers are making some of your books available to the public before they are released... for free too!

http://zi.ma/webdev
http://twitter.com/elijahmanor
Requesting Gravatar... Liam McLennan Mar 10, 2009 10:22 PM
# re: Learn About ASP.NET MVC Via NerdDinner
Nice app. Since you asked: Thoughts on Nerddinner
Requesting Gravatar... Shady Sayed Mar 11, 2009 4:44 AM
# re: Learn About ASP.NET MVC Via NerdDinner
Really great work you have done there. when you finish the book you will feel great, and all the pain you talked about will go away, and all that remains is the feeling that you have accomplished something that you are proud of. it is like childbirth for women, no matter how hard it is the first time, they don't mind going through it again :)
Requesting Gravatar... Dan F Mar 11, 2009 4:59 AM
# re: Learn About ASP.NET MVC Via NerdDinner
fear teh awesomeness! In all seriousity, what a completely bitchin idea. It's one of those "why didn't I think of it" things that makes you smack your head and go "yowsers".

Anybody here from Montreal or Sacramento, and would like to have a few beers with a mad aussie in the next few weeks? I'm in Montreal for a week starting from Saturday (beware the jetlag!) and Sacramento CA for the following week. Yeah... I should get all official and host a dinner, but I don't know the local area well enough to participate in such madness :-)
Requesting Gravatar... Dan Sylvester Mar 11, 2009 9:01 AM
# re: Learn About ASP.NET MVC Via NerdDinner
I am trying to learn MVC so I'll bookmark the site.
Requesting Gravatar... Jeff Allen Mar 11, 2009 9:22 AM
# re: Learn About ASP.NET MVC Via NerdDinner
I also noticed if you type in a city and state (Plover, WI or Plover, Wisconsin) and there are no nerd dinners in that area it doesn't tell you this, it just centers the map on the city and state you typed in.
Requesting Gravatar... Jeff Allen Mar 11, 2009 9:45 AM
# re: Learn About ASP.NET MVC Via NerdDinner
The interesting question is, now that you've built it, what happens if people start using it to organize Nerd Dinners? I mean you may have just unintentionally created Frankenstein's Monster...

Witht hat said, I really like the idea of Nerd Dinners as a way to network with fellow coders, and hey if you learn some new skills over some bodacious grub then that's groovalicious!
Requesting Gravatar... pinbor Mar 12, 2009 12:47 AM
# re: Learn About ASP.NET MVC Via NerdDinner
I am trying to learn MVC,thanks!
Requesting Gravatar... RussellH Mar 12, 2009 8:37 AM
# re: Learn About ASP.NET MVC Via NerdDinner
Thanks for the free download. I plan to buy the book. I had a question about exception handling in DinnersController.cs. (Maybe I should be asking this at the CodePlex site?) There is code like

try { ... }
catch
{
ModelState.AddModelErrors(dinner.GetRuleViolations());
}

Shouldn't this code be catching specific exceptions? Doesn't this run the risk of invoking validation code when the inputs are valid, but some other error is thrown (like SQL server unavailable)?
Requesting Gravatar... haacked Mar 12, 2009 10:47 AM
# re: Learn About ASP.NET MVC Via NerdDinner
@Jeff Allen that's just a risk we are prepared to take! ;)

@RusselH I'll take a look at that. We have something in MvcFutures that I think would be a better approach. I'll blog about it after Mix.
Requesting Gravatar... urgh Mar 12, 2009 1:50 PM
# re: Learn About ASP.NET MVC Via NerdDinner
Safari can’t run the script “//pushin hover” because Safari doesn’t allow JavaScript to be used in this way.
Requesting Gravatar... mh415 Mar 12, 2009 6:46 PM
# re: Learn About ASP.NET MVC Via NerdDinner
I'm unable to create a dinner. It keeps saying "A value is required" but it doesn't tell me what field or value it needs (all fields are filled in). The feedback window frequently won't display. The Uservoice feedback page crashed. The "Description" window shown when creating a dinner is far too small. This is a nice idea for a site, but why did you release it with so many bugs?
Requesting Gravatar... simon Mar 12, 2009 8:01 PM
# re: Learn About ASP.NET MVC Via NerdDinner
> the book is licensed under a Creative Commons Attribution No Derivatives license

urm.. dont you mean the 'chapter' is licensed under CC?

trying to read it on my Kindle2 but theres a damn CC licence message on every page which gets in the middle of the text and makes it hard to read. otherwise great to have such a long chapter available for free. thansk!
Requesting Gravatar... haacked Mar 12, 2009 8:33 PM
# re: Learn About ASP.NET MVC Via NerdDinner
@Simon, I meant to say the eBook (aka Chapter 1) is licensed under CC. You're right. The entire book is not.
Requesting Gravatar... John Mar 13, 2009 6:45 AM
# re: Learn About ASP.NET MVC Via NerdDinner
Security: what's stopping someone adding extra fields to your Edit form (e.g. ID) and updating Dinners willy-nilly?
Requesting Gravatar... Shiju Varghese Mar 14, 2009 10:36 PM
# re: Learn About ASP.NET MVC Via NerdDinner
Applying dependency injection in NerdDinner Application using Unity Application Block
weblogs.asp.net/.../...dinner-com-application.aspx
Requesting Gravatar... John Mar 16, 2009 4:51 AM
# re: Learn About ASP.NET MVC Via NerdDinner
Oops, should have read the next page before passing comment :)
Requesting Gravatar... Daaffyyd Mar 16, 2009 6:26 PM
# re: Learn About ASP.NET MVC Via NerdDinner
i get the same bug as aspnet.codeplex.com/.../View.aspx?WorkItemId=3404
Requesting Gravatar... RussellH Apr 01, 2009 11:21 AM
# re: Learn About ASP.NET MVC Via NerdDinner
Was the answer my question an April fool's joke?
Requesting Gravatar... Dana C. Andrews, BS(web) Apr 19, 2010 6:34 AM
# re: Learn About ASP.NET MVC Via NerdDinner
Difficult chapter to learn MVC from because of the frequent stops to troubleshoot the example code. Example 1; 'Using' statements were coded into Scott's web.config file but this is not noted in the chapter. It is only by reviewing the source code that you 'discover' this (Scott should have started out with a blank web.config file and let VS2008 and his written instructions construct it, just like the reader would). Example 2; Coding terms change during the course of the book. Things like ModelState.AddRuleViolations(dinner.GetRuleViolations()) are later listed as ModelState.AddModelErrors(dinner.GetRuleViolations()) without any explanation. There are other such issues if you actually try to build the site using the chapter instructions. Some of the writing is lazy, especially in the later parts of the chapter. This is not unusual for an author (they get tired of writing the same thing over and over). It also wanders in some places, discussing things that do not pertain to creating the site. However, it is the job of the editor to get this issues corrected/fixed. If this document ever was actually proofed, then shame on the editors. Currently, for me, once authorization was instituted (page 127), create dinner() fails to actually put the dinner into the database. After a week of research and debugging, still not sure why.
Seeing all the NerdDinner "help me" postings, and my own frustrations at trying to make this work from what is written, it is understandable why Steve Sanderson's books are more highly recommended.
The downloadable code compiles and works just fine (it is quite a bit different than what is given in the chapter). The program itself is very innovative and the MVC structure set up is excellent. Scott and his teams are strong programmers. It is a shame about the amateurish editing, it ruins an otherwise quality product.

What do you have to say?

(will show your gravatar)
Please add 8 and 2 and type the answer here: