
Professional ASP.NET MVC 1.0 (Wrox Programmer to Programmer)
by Rob Conery, Scott Hanselman, Phil Haack and Scott Guthrie
Published by Wrox Books
ISBN: 978-0-470-38461-9
I finally had the chance to complete this book. This has been a very long summer, and my hope was to finish this by the end of June. No such luck. I only just finished it this September long weekend after trying to find some time to do it, but that was not to be. I am happy to say that I have now completed it, and it was worth its time to actually take some time.
The Good
This is definitely a good book for someone already familiar with coding in C#. You don’t have to be a C# guru (thank God for that), but you have to understand the nuances of the language. Understanding the ins and outs of ASP.NET helps too so that you can truly understand the difference between the MVC framework and WebForms.
The book has 420 pages made up of 12 chapters. This should not seem daunting, though; the first chapter alone takes up the first 164 pages of the book, but is a complete step-by-step walkthrough of an ASP.NET MVC application called Nerd Dinner. It gives and intro to virtually every concept that the MVC Framework 1.0 covers without delving into too much detail; the detail follows in the other 11 chapters.
Each subsequent chapter contains a singular topic that allows the reader to focus and they actually flow well into one another: Routing to Controllers and Views to TDD. This book covers a lot of the main topics that a developer who delves into MVC will need (I especially like the TDD chapter – definitely a boon for someone who never saw the value in TDD until recently, but that was simply because I never truly understood the value).
I do like the fact that this book did not jump into jQuery. The authors mention at the start of Chapter 7 that jQuery will be supported within ASP.NET MVC but do not delve into it. Why not? Because there are many books on jQuery out there that can cover the topic there. jQuery is also not native to just MVC so it makes sense not to cover it here, but I am glad that they did make mention of the technology.
They also mention that WebForms and MVC can exist in the same project. What? Touting the fact that the technology being used is not the only solution out there?? Inconceivable! And yet, it’s great to see a compare and contrast view, and then a “But we can work together by…” methodology being demonstrated.
I also enjoyed the “Product Team Aside” sections. What is nice about this book is that it is written by 4 individuals who actually worked on the product team within Microsoft. That means that they truly have an inside track as to what is going on with the technology and give a birds-eye view of it. There are far too many books that are used by experts in the technology, but with only personal experience and no knowledge of where it is going. (Although they don’t outright say where MVC is going in the book, a logical assumption is that they aren’t going to focus on a feature that they know is going to be dumped – the primary advantage of the product team writing it is that it is not someone making an assumption and posing in a book “Why is this not there?”.)
The Bad (AKA What I Think Would Be Better in the 2nd Edition)
What I mean to say here is not necessarily bad, but just something I think could have been better.
Being one of the few books that gives you a full tutorial from beginning to end, one thing I found disappointing was the fact that some of the code presented in the book just simply wouldn’t compile. I followed every step-by-step instruction and it worked for the most part, but once I hit a certain threshold it just wouldn’t work. (Thankfully, the authors provided the application online for download. By downloading that you could get the application to compile, but it was the final version so you really had to jump around and grasp a lot of things at once.)
I think it would have been better had Chapter 2 actually been Chapter 1 – a comparison of MVC frameworks, a high-level discussion of what it does (not in-depth) and then dive into the tutorial as a second chapter. (Don’t get me wrong – I love the idea of the full application tutorial, not enough books give this kind of in-depth summary from beginning to end; I just don’t necessarily agree with it as the first chapter.)
This is something I am putting under bad, but it’s not bad; I hope that by putting it here that if the authors read this post that they will consider it for a future edition, and that it also sparks some discussion/debate: Put more emphasis on the testing. There were 2 chapters in the book which covered TDD and testing patterns, but I don’t think that was enough. The MVC framework is such that this is the perfect technology to truly expand upon the testability of software applications and bring a higher level of quality to the applications. With proper tests, confidence in the quality of the application goes up and value of the application (and the development team) also goes up. Far too often, testing comes as an afterthought if at all; partly because many frameworks do not truly support how it can function. This framework endorses the testing platform from day one, and I think not enough attention was granted to it. (I know it may have made the book bigger, but considering the size of some other technical books an extra 2-3 chapters on testing your MVC application would not kill anyone.)
The Nitpicky
I am pretty nitpicky a lot of the time. Although well written, you could tell that this book had 4 authors. You could tell frequently when one person wrote one section or chapter and then another took over; their personalities (especially if you read their blogs) stood out as did their writing style. I am pretty sure that much of the identification was taken out during the editing phase, but you can’t get it all. (You also can’t please all of the people, which is why this is not a bad thing, but merely a nitpicky thing.)
What I Would Have Liked To See
The book really does cover the advantages of MVC over WebForms, but also talks about the advantage at times of WebForms over MVC. What it does not cover, in my opinion, is when you would want to use MVC over WebForms. The book is (and intentionally so) technical, but my experience is that an organization wants their people to make recommendations and relate it back to the business element and why they should choose a current technology. Many companies may not even want to look at MVC 1.0 because:
- It’s a version 1.0 product
- This framework may not yet be “proven” to an organization that has a deliverable arrangement necessary
- It’s considered to be merely a new “flavour of the week”
Although there are many great technical reasons to choose MVC, there is no way to convince a non-technical (or even someone technical who would understand it but is set in their ways) why you would want to use this framework for a client deliverable. (I will touch on what I think the best case for MVC versus WebForms should be in an upcoming post – probably to be written shortly after I post this one.)
Summary
I may sound somewhat negative, but I am not. Not about this book. This is one of the better technology-related books I have read in a long time. It covers the technology in detail, it gives great examples, it gives ideas of where the technology is going, and it shows that it’s not the only solution out there. It can co-exist with other, similar technologies and continue to grow. My negatives are not really negatives, just more personal preference; there is nowhere here where I said that “this sucks” or anything along those lines, because it doesn’t. This is a well brought-together book which drives people to understand this new framework (already in 2.0 Beta – I knew I should have read faster). It isn’t the end-all, be-all; it is simply another option. And I think it’s a good one that’s only just getting started.