The ASP.NET MVC 4 Book Is Available! mvc, blogging, code 0 comments suggest edit

When someone says they want to write a technical book, I take a hammer and slam it on the aspiring author’s thumb and ask “How do you like that?” If the answer is, “Very much! May I have another.” This person is ready to write a technical book.

Sure, writing a book always starts off full of exciting possibilities. But it soon devolves into drudgery and pain with the constant question of whether the time spent is worth it when weighed against all your other obligations and opportunities in life.

But no matter how much I sometimes hate the process of writing a book, I do love this moment. The moment the fruits of your labor are delivered in a cardboard box and you open it up to see your name on a glossy cover with a speedy looking bobsled!


But soon after the big question sets in, “what the hell am I going to do with all these books?!” (I’ll bring some toMonkeySpacein October! And maybe I’ll give a few away via the internet if I can think of a criteria for giving them out.)

At long last, the Wrox Professional ASP.NET MVC 4 book written by me and my esteemed coauthors, Jon Galloway, K. Scott Allen, and Brad Wilson, is available (in Kindle and Print formats) on Amazon.

As Jon points out in his blog post, the Kindle version looks nice and is in color (on devices that support color of course).

Real World Development

This book includes a new chapter that I really did enjoy writing. The focus on the chapter is building a real world ASP.NET MVC application using the NuGet Gallery as a case study. The NuGet Gallery is the code behind, the online public host for thousands of NuGet packages with millions of package installs.

This is a great case study because it’s easy to visit the site while you read the chapter and you can easily grab the source code. The chapter covers the packages used to build the gallery as well as some of the trade-offs the NuGet gallery team made. For example, there are some places where we rolled our own features rather than using the built in defaults.

Ironically, because we haven’t upgraded the NuGet Gallery yet, the content of the chapter describes an ASP.NET MVC 3 project. But all of the concepts and packages apply equally well to an ASP.NET MVC 4 project.

If you’re building real web applications with ASP.NET MVC, I think you’ll find at least one thing useful in this chapter. Hopefully more!


I really must give a lot of credit to my coauthors who really knocked it out of the park. These are some smart folks I have the pleasure of working with. Extra kudos to Jon Galloway who was more or less the project manager and chief cheerleader in organizing the rest of us to get this book out the door.

I also want to give a big thanks to Eilon Lipton, our technical reviewer. He’s the developer lead still responsible for the developer team that works on ASP.NET MVC and Web API and is a meticulous reviewer.

What’s Next?

ASP.NET MVC 4 is the last version of ASP.NET MVC that I had any involvement with. I don’t plan to be a coauthor on the ASP.NET MVC 5/Web API 2 book at this point. I’m just not likely to be involved enough to have the level of insight that I’ve had in the past. Also, it’s really hard work.

So you should buy this book because it’ll be a collector’s item! Or, you can take the advice of another former coauthor of mine who said Don’t Buy This Book right after we finished one together. Either way, I won’t hold it against you. (But do buy it anyways just to spite Atwood.)

Will I write another book again? Maybe, but if I do it won’t be like any of the books I’ve worked on in the past. I have some ideas to write a fiction piece about a shimmery vampire wizard who goes to a school named PigPimples under the control of a spoiled brat king named Jeffrey who hates his midget uncle Teeryon Bannister. I even have a catchy phrase, a Bannister always pays his dates.

If it somehow turns out that writing fiction doesn’t work out, I might be interested in writing a book that explores more of the people aspects of software development or related to core principles. Something that doesn’t change and get outdated every year.

Or perhaps I’ll just keep randomly slamming keys on my keyboard and publish the result on my blog and call it a blog post. At least I still have fun doing that.

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



25 responses

  1. Avatar for Eric
    Eric October 3rd, 2012

    I'm ordering the book for the that chapter alone (I already have the 3rd edition and by comparing the nearly identical table of contents, it doesn't appear that much has changed).
    The Nuget Gallery code is probably an example of the best "real world sample application" that I've seen for ASP.NET MVC. It's hard to believe that there aren't more project samples like this available from Microsoft.

  2. Avatar for Thomas Hoyt
    Thomas Hoyt October 3rd, 2012

    I think you might have used "criteria" wrong while you were talking about how to give away your book online. Either way, congrats! I may just have to pick this up.

  3. Avatar for Rob Angelier
    Rob Angelier October 3rd, 2012

    Great!! I'm really looking forward to this one, hope you decide the criteria soon!

  4. Avatar for Paul
    Paul October 3rd, 2012

    I must know more about the shimmery wizards adventures at PigPimples. Don't leave me hanging

  5. Avatar for ZippyV
    ZippyV October 3rd, 2012

    Why is the Kindle edition 10$ more?

  6. Avatar for Redth
    Redth October 3rd, 2012

    I recently coauthored a Wrox book myself "Professional Android Programming with Mono for Android and .NET/C#" and I can totally relate with your post :). It was my first book and plagued with delays and changes. In the end it was worth it, but in the process I asked my wife to smack me if I ever said I wanted to write another book. However, seeing the fruits of labour, opening that big box of red books (you know the ones you have a small library of from when you learned to code) was the best feeling ever. Maybe even good enough to do it all again!
    Anyway, congrats, I'd love to read it! Looking forward to Monkeyspace and hope to meet you there!

  7. Avatar for Jamie Rytlewski
    Jamie Rytlewski October 3rd, 2012

    Why don't you have a DRM free version of the book? Kindle store only (for eBook)? How about selling a DRM free version yourself. Is that possible or does the publisher hold the rights?

  8. Avatar for Brian Hartung
    Brian Hartung October 3rd, 2012

    You can name your new book Game of Groans...

  9. Avatar for Ruffin
    Ruffin October 3rd, 2012

    The criteria for giving away books on the Internet should be that you give them to those who are able to give you the best criteria for giving them away on the Internet.
    You can send mine to 123 Easy Street...

  10. Avatar for Bruno Yudi
    Bruno Yudi October 3rd, 2012

    Seems to be a great book, for all the hard work you said... I already added to my Kindle wishlist!

  11. Avatar for haacked
    haacked October 3rd, 2012

    Hi All! Thanks for your comments.
    Unfortunately, we don't get to set the pricing on Amazon often provides a discount on print editions, which has the effect of making the Kindle edition "more expensive" when in reality it's the print edition is "less expensive". I hate that. I think the fact that the Kindle version is just bits shipped over the wire and doesn't require killing trees justifies a lower price. But of course, price is set by supply and demand and it's possible there's more demand for the Kindle edition. Which I guess is a good thing.
    As for a DRM free version, Our publisher, Wrox, owns the rights to the work. They may have interesting options. I know they've been pretty open to doing Creative Commons and other things in the past.
    In the future, I hope to either self-publish or work with publishers that are more cutting edge in regards to e-books.
    I'm sorry for how much of a pain it is today. It really needs to get better. CodingHorror wrote up a great post on why ebooks still suck and how they can get better.

  12. Avatar for Andy
    Andy October 3rd, 2012

    You should add a bit more sex to your fiction book idea and call it Fifty Shades of #808080

  13. Avatar for Art
    Art October 3rd, 2012

    @Jamie, offers a DRM free PDF for $29.99. Easy to find some discount coupons for Wrox too.

  14. Avatar for Jeremy
    Jeremy October 4th, 2012

    Awesome, looking forward to getting this.

  15. Avatar for Ruffin
    Ruffin October 11th, 2012

    DRM free version is up at Wrox now. pdf, epub, and prc.
    I like hard copies and ran to the local Barnes and Noble today to get one. Get this -- it's $23.33 shipped to your door from, but $44.99 [sic] if you bother to drive down to's brick & mortar. That'll teach me not to read the small print online.
    So the Kindle version is pretty cool in color? /sigh

  16. Avatar for Arvin
    Arvin October 12th, 2012

    I just got the book. No CD?
    I thought it would come with PDF version :(

  17. Avatar for haacked
    haacked October 12th, 2012

    Hi Arvin. The code samples are all in NuGet. As for a PDF version, try contacting Wrox. I'll ask them too.

  18. Avatar for Khuzema
    Khuzema October 13th, 2012

    Actually, the building Nuget website sample chapter, is wish come true. As I was always wondering why there is no detail explanation for the website. Now we have it. Thank you

  19. Avatar for Diehl
    Diehl October 31st, 2012

    Any idea when the book will show up on Safari?

  20. Avatar for Alex Y.
    Alex Y. November 1st, 2012

    Awesome, thanks! Just ordered one (wondering why it's so pricey at UK-amazon btw...)
    I have to say, when you left Microsoft for GitHub, I thought "Oh crap, another great guy has just left the .NET camp". Good to know you're still with us. And I still hope you'll be co-authoring the next book ;)

  21. Avatar for simon
    simon November 7th, 2012

    Does it say how to use LowercaseUrls = true with areas?
    In that case I'll buy two, please tell someone to fix that bug, it's bugging =)
    And publishing congrats to the authorium!

  22. Avatar for Elyor
    Elyor November 10th, 2012

    Hi All!,
    This book free download for click here,yet more mvc 4 book ;)

  23. Avatar for Ali Kuli
    Ali Kuli January 13th, 2013

    Hello Phil

    I bought your book and I am reading it. I like the way you write. I have gotten lost in the examples here and there because they only work if you keep on Rebuilding the example otherwise the dropdowns do not show the entries.

    If you write another book -I'll buy!

  24. Avatar for Imran Siddiqui
    Imran Siddiqui March 11th, 2016

    I am new in ASP.NET MVC and little bit confuse when to use custom binder, when to use cutom value provider, where validation take place in model binder or in value provider. can you please help me to clear this issues.

  25. Avatar for haacked
    haacked March 14th, 2016

    Hi Imran! I wrote a post that covers when you'd use a custom value provider vs a custom model binder. I hope that clears it up.