Professional ASP.NET MVC 3 is available!, mvc, personal, tech, code 0 comments suggest edit

I hate code samples in technical books! No seriously, this is bile I’m not afraid to give a permalink to (nor am I afraid to end a sentence with a preposition, so there!).

Even the shortest code samples are a pain to type in. And if they show anything reasonably interesting, they’re probably too long to type in.

Of course, nobody actually types in the sample code, they grab the code from the companion CD (blech!) or download zip files containing the code from the companion website.

With Professional ASP.NET MVC 3 (print edition | kindle edition) we experimented with a different approach. We made our sample code available as NuGet packages.

It seemed fitting given that ASP.NET MVC 3 included NuGet 1.0 as part of the product. The benefit of this approach is that there’s no fiddling around with downloading and unpacking files and copying source files into the right place.

Throughout the book, you’ll run into a call-out with a command that says something like Install-Package Wrox.SomethingOrOther. If you’re following along with an ASP.NET MVC 3 project open in Visual Studio, it’s as easy as installing that package and you have the source code nicely organized and immediately runnable!

Along with the easily installable code samples, the book covers all the cool new features of ASP.NET MVC 3 including EF Code First Scaffolding, NuGet, and Razor.

For those that like to dig deeper, the book covers the concept of dependency injection and ASP.NET MVC 3’s support for it as well as Test Driven Development (TDD) with ASP.NET MVC. These chapters were written by Brad Wilson, who’s also a co-author of the unit test framework.

Along with Brad, I had the pleasure of also working with Jon Galloway and K. Scott Allen. This was a bit of a reunion for K. Scott, Jon, and I as we co-authored a book with Jeff Atwood (aka CodingHorror) a lifetime ago.

Since Brad and I are on the product team, we were able to sprinkle in behind-the-scene tidbits from the product team that provide insight into how or why certain decisions were made when it came to the product design.

If you read the book (again, available in both a print edition and a kindle edition. Don’t be shy about collecting them all! Winking
smile), please do write a review on We appreciate all the feedback we can get and already have ideas on how to improve the next one!

Also, a lot of folks have asked me why the Kindle is priced more than the paperback in some areas. We’re not really in control of that. The suggested retail price of the two editions are exactly the same, but Amazon provides different discounts for each edition.

As to the question, why are the suggested retail prices the same? I really don’t know but I plan to suggest that the electronic edition ought to be cheaper.

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



32 responses

  1. Avatar for Justin James
    Justin James August 7th, 2011

    Phil -
    Interesting idea, and I like it, but it also presumes that the reader is sitting at their desk near a computer with Visual Studio installed while reading the book, which is not true a lot of the time.

  2. Avatar for Maciej Gos
    Maciej Gos August 7th, 2011

    Hi Haacked,
    I just buy this book. As soon as I receive I write review.

  3. Avatar for haacked
    haacked August 7th, 2011

    @Justin I probably didn't make it clear, but the NuGet packages are in addition to the source listings which are still printed in the book.

  4. Avatar for Dave Van den Eynde
    Dave Van den Eynde August 7th, 2011

    So, how long before this will show up in my Safari Books Online library?

  5. Avatar for Phillip
    Phillip August 7th, 2011

    Pass, will wait for book by Steven Sanderson and Adam Freeman, or Dino Esposito. They are proper books. These 'Professional' books are never good.

  6. Avatar for Simon Bartlett
    Simon Bartlett August 7th, 2011

    Wow, the Kindle version is almost $20 more expensive than the print version, what a bargain - not.

  7. Avatar for Euan
    Euan August 7th, 2011

    Cool idea. Any idea when the book will be released in the UK? I've got it on pre-order on and the release date has been pushed back 3 times

  8. Avatar for Brad
    Brad August 7th, 2011

    Thanks Phillip, I just ordered both those books.

  9. Avatar for Jason B
    Jason B August 7th, 2011

    Thanks Phillip. I just ordered the 'Pro ASP.NET MVC 3 Framework' book, I agree those 'professional' books, are never 'professionally' written. Just rubbish.

  10. Avatar for Sean Killeen
    Sean Killeen August 7th, 2011

    Don't forget that the PDF e-book is also available! Plenty of us prefer that format. You can find it on the Wrox site at Looking forward to reading it!

  11. Avatar for Steve W
    Steve W August 7th, 2011

    Nuget packages for source code - that's a really great idea - it will make things so much smoother, no stopping to load the cd / find the download link etc. :)

  12. Avatar for ctrlShiftBryan
    ctrlShiftBryan August 7th, 2011

    @simon stuff like this is why the publishing industry is doomed. I think they are as clueless as the music industry.
    I just bought a 4 book set print copy of game of thrones for $16. I can sell the books when I'm done reading them. Or give them away to a friend.
    The kindle version was $40...

  13. Avatar for Mitch Labrador
    Mitch Labrador August 7th, 2011

    Good job! Just bought it for my kindle and I like it. Nice easy to follow writing style with enough beginning content as history lesson, but you waste no time getting to the advanced meat of the matter.

  14. Avatar for Robert Corvus
    Robert Corvus August 7th, 2011

    Hi Phil,
    I'm thinking about publishing a book, so I'm curious about why you went with Wrox vs self-publishing? You and the other authors are already well-known (legendary, even) and I'm thinking most who will buy your book are already reading at least one of the author's blogs. If buyers don't already know you, I would think they would easily find your book on Amazon. Is Wrox doing anything to market your book beyond what you yourself are already doing? I'm thinking Wrox would get you into the hardcopy convenience stores like Borders (oops) or Waldenbooks (oops) or Barnes&Noble (they're next), but how much will you make there compared to how much you'll make self-publishing straight to Amazon?
    Your fan,

  15. Avatar for gs
    gs August 8th, 2011

    kindle edition <3

  16. Avatar for haacked
    haacked August 8th, 2011

    @Robert I think it's mainly to get the books in the stores. But to be honest, I haven't put a whole lot of research into comparing self publishing vs using a publisher. It's an interesting idea. :)

  17. Avatar for Justin James
    Justin James August 8th, 2011

    Phil -
    Thanks for the clarification! That makes a lot more sense. :)

  18. Avatar for Siderite
    Siderite August 8th, 2011

    Just make it a video series, with those little annoying bubbles pointing to code that is posted in Google+ and host it on YouTube as a vlog. Lol!
    I always like clear links to downloadable code, but usually, when I am reading a book, I am in the subway. Removing the code sample from the text would not help me. 0.02$

  19. Avatar for robi.y
    robi.y August 9th, 2011

    Any plans to update the nerddinner tutorial to v3?

  20. Avatar for Justin B
    Justin B August 9th, 2011

    My first impression was that code samples were only available via NuGet as well. That certainly makes a great addition when following along with the book!

  21. Avatar for Jason
    Jason August 10th, 2011

    Why was NerdDinner removed from the book? That was a fantastic sample app? The only sample I see in the TOC is Music Store, but it seems like a much smaller example.

  22. Avatar for andrew boudreau
    andrew boudreau August 18th, 2011

    great book, just finished it.

  23. Avatar for pretty_cool
    pretty_cool September 21st, 2011

    Great book,I want to buy it

  24. Avatar for Stephen
    Stephen September 21st, 2011

    Amazon UK doesn't have the kindle edition available anymore :( shame cause I might have got it (if it wasn't more expensive than the physical book....)

  25. Avatar for William
    William September 27th, 2011

    The Kindle version of Pro ASP.NET MVC 3 is no longer available for the US. Please bring it back!

  26. Avatar for bob
    bob October 7th, 2011

    Although using nuget is great when you have a copy of VS and an active net connection how can I get hold of and view code samples if you don't have a copy of VS on the computer you are using.
    I have tried looking @ the wrox site but all I get is a page with no download links when I try to get the sample code.
    P.S. Is it possible to get the mvcscaffolding stuff installed on a pc without a net connection too?

  27. Avatar for Adeyinka Oluwaseun Doyin
    Adeyinka Oluwaseun Doyin October 18th, 2011

    Best book so far on ASP.NET MVC.....really recommending it to newbies in ASP.MVC....Great work !!!!!

  28. Avatar for Rob
    Rob November 8th, 2011

    @haacked What happened to the Kindle edition??? I only buy tech/programming books either in eBook (Kindle) or PDF format because it's much easier to read & code the tutorials at the same time! Especially with a dual monitor setup.
    Why is the Kindle edition not available? Please make it available, pretty please!

  29. Avatar for haacked
    haacked November 9th, 2011

    @Rob I'm not sure. I talked to our publisher and they're looking into it.

  30. Avatar for Edward Wilde
    Edward Wilde December 8th, 2011

    any news on the kindle edition? as of 09/12/2011 couldn't find it on amazon

  31. Avatar for Asif Ashraf
    Asif Ashraf May 5th, 2012

    I still remember my first Microsoft Exam book: Que's Certification Guide for MCP for Windows Forms Applications for .NET Framework 1.1 --- And amazing thing I did at that time that I typed in ever single example and That was major breakthrough in my life of programming. The things which I did at that time were never repeated again. Now I have much much blot of experience but I still think I wouldn't be that smart if I couldn't accomplish that code typing.
    But I agree, things are not simple windows forms now. So Thumbs up for the Nuget. That's powerful like Phil Himself.

  32. Avatar for Madan
    Madan July 4th, 2012

    I was trying to understand how the update the the DB would work with a view model. The text in Chapter 4 on the Edit view talks about the "essence" of the edit view and associated code. I was wondering if there could be a package available to show how that update would work. Is there a complete solution code available anywhere?