Learn About ASP.NET MVC Via NerdDinner

code, asp.net mvc 0 comments suggest edit

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.

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.



25 responses

  1. Avatar for Andrei Rînea
    Andrei Rînea March 10th, 2009

    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 !

  2. Avatar for Sarvesh
    Sarvesh March 10th, 2009

    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.

  3. Avatar for Adam Vandenberg
    Adam Vandenberg March 10th, 2009

    Bug: Typing in a zip code and pressing ENTER doesn't submit the search form.

  4. Avatar for Elijah Manor
    Elijah Manor March 10th, 2009

    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!

  5. Avatar for Liam McLennan
    Liam McLennan March 10th, 2009

    Nice app. Since you asked: Thoughts on Nerddinner

  6. Avatar for Shady Sayed
    Shady Sayed March 10th, 2009

    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 :)

  7. Avatar for Dan F
    Dan F March 10th, 2009

    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 :-)

  8. Avatar for Dan Sylvester
    Dan Sylvester March 10th, 2009

    I am trying to learn MVC so I'll bookmark the site.

  9. Avatar for Jeff Allen
    Jeff Allen March 10th, 2009

    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.

  10. Avatar for Jeff Allen
    Jeff Allen March 10th, 2009

    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!

  11. Avatar for pinbor
    pinbor March 11th, 2009

    I am trying to learn MVC,thanks!

  12. Avatar for RussellH
    RussellH March 11th, 2009

    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 { ... }
    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)?

  13. Avatar for haacked
    haacked March 11th, 2009

    @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.

  14. Avatar for urgh
    urgh March 12th, 2009

    Safari can’t run the script “//pushin hover” because Safari doesn’t allow JavaScript to be used in this way.

  15. Avatar for mh415
    mh415 March 12th, 2009

    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?

  16. Avatar for simon
    simon March 12th, 2009

    > 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!

  17. Avatar for haacked
    haacked March 12th, 2009

    @Simon, I meant to say the eBook (aka Chapter 1) is licensed under CC. You're right. The entire book is not.

  18. Avatar for John
    John March 12th, 2009

    Security: what's stopping someone adding extra fields to your Edit form (e.g. ID) and updating Dinners willy-nilly?

  19. Avatar for Shiju Varghese
    Shiju Varghese March 14th, 2009

    Applying dependency injection in NerdDinner Application using Unity Application Block

  20. Avatar for John
    John March 15th, 2009

    Oops, should have read the next page before passing comment :)

  21. Avatar for Daaffyyd
    Daaffyyd March 16th, 2009
  22. Avatar for RussellH
    RussellH April 1st, 2009

    Was the answer my question an April fool's joke?

  23. Avatar for Dana C. Andrews, BS(web)
    Dana C. Andrews, BS(web) April 18th, 2010

    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.

  24. Avatar for Jon
    Jon November 30th, 2010

    Is there documentation that explains HOW TO DEPLOY NERDDINNER? It seems like I can learn a lot about MVC through this app but I just can't deploy it.

  25. Avatar for C++ Source Code Directory
    C++ Source Code Directory January 13th, 2011

    Nice post, very helpful. I saw another post by refering to how to download the packages to your local repository, I think that is a nice complement to this one.