Earlier this year I started with the beta/RC of ASP.Net MVC and as the year progressed I was using it to build my first MVC.Net application. The only problem being, at the time, no books or real guidelines.
Let me start by saying this is one of the rare occasions I just bought a book on the reputation of the authors Rob Conery, Scott Hanselman, Phil Haack and Scott Guthrie. Seeing that their blogpost were instrumental for me in getting started with MVC.Net and building my first production application with it.
Starting with chapter 1 you’ll be reading and clicking at the same time, making you’re first MVC.Net application. The first chapter will take up about 165 pages of the total 420 and you’ll be touching all the aspects of building an application, from database access, CRUD actions to implementing AJAX. What I liked about this approach, that it takes the bull by the horns and gives you context during the rest of the book.
Chapter 2 & 3 will explain where Model-View-Controller comes from, what it tries to accomplish and why MVC.Net was created and how it is positioned across\besides Webforms. If you are wondering if MVC.Net is useful during your next webproject or complementary read these two chapters first!! It’s about 32 pages so it’s short and to the point. My advise, start here and if you don’t like what you are reading put it back on the shelf.
Routing being a standalone library in the 3.5 framework is the starting point for each request in a MVC.Net application and one of the pillars of the whole MVC.Net framework. Chapter 4 goes into great and very clear detail how it works, why to use it and even how to get you ASP.Net Webforms application using it.
Chapters 5 & 6 go into the inner workings of MVC.Net itself and explain how to use Controllers and Views. I liked the explanation of view engines especially because I haven’t had the opportunity to work with them and therefore had no clue as to why or how to use them.
Chapter 7 shows you how to use AJAX technology with MVC.Net, but in my opinion they could have skipped this chapter.
Chapter 8 I liked very much, because it will give you a clear explanation on how to use filters and it helped me refractor some of my production code as to handle exceptions a lot clearer.
Chapter 9 must be one of the chapters I would have like to be a lot bigger, besides having some MUST do’s in handling you application security; you’ll be learning some stuff you wouldn’t thought about before. Although I didn’t like the case studies in this chapter, they do put a few essential security issues in perspective and give you food for thought.
Chapters 10 & 11 go into TDD and testable design patterns that can be applied on MVC.Net; If you’re new to TDD and want to learn, first read a book on TDD before reading these chapters. They are just touching the surface but they do show you how nicely testable the entire framework has been made.
Chapter 12 granted very short, but it shows you how to combine MVC.Net and Webform together to build one application; A best of both worlds!.
The book unfortunately did not live up to my expectations, but maybe my expectations where set to high, let me explain. I bought the book after having worked with MVC.Net for a couple of months and having followed the authors blogs there just wasn’t anything really new. I expected some more guidelines as how to use the MVC.Net framework and validate some of the choices I made in my application.
If you´re a N00B in the world of MVC.Net this book is definitely for you, why because it takes all the blog posts of the authors and bundle them in a very nice and quick to read through book. But be quick! MVC.Net team is quickly working on the 2.0 release which gives the book a limited shelf life.