Book Review - Asp.net MVC3 by Steven Sanderson (Apress)

Pro ASP.Net MVC 3 Framework
Review by Christian Brubaker

This is the second book I have read on ASP.Net MVC, but the first on MVC 3. The MVC pattern has been around for decades and is gaining more momentum amongst developer communities like .Net and Ruby. Suffice it to say, I was anxious about reading this book not only for the material, but to see how well MVC Pattern was covered and made use of in examples.

Firstly, the authors do a great job at keeping you interested as well as informing and teaching. The book starts out with a history of web development and points out key differences between MVC and other web implementations. There is also quite a bit of mention on TDD. By chapter 3 you are rolling up your sleeves for your first Hello World application. The book continues forward outlining language features for working with Microsoft’s implementation. Although most of the language features aren’t specific to MVC, I felt that it highlighted how using said features can simplify code and improve code reuse and maintenance.

The next few points in the book are specific to frameworks/tools that the authors chose to demonstrate how easy integration is with MVC. They do mention that there are several ways to skin a cat and, quite frankly, would have needed another book just to cover all of them.

Razor is the view engine that was picked for this book and there is quite a lot of material to cover since this is fairly new. I picked up a lot of tips and useful information in this area of the book. Having worked with several technologies like JSP, ASP, Asp.Net, etc in the past, I was blown away by how clean and syntactically beautiful the Razor view engine is.

The tools section of the book covered only Ninject (IoC) and Moq frameworks. This was fine for me since they are the two I use most often when doing TDD. Again, great job covering these and showing how easy they blend into the MVC framework. I feel anyone unfamiliar with TDD would have a good understanding of its usefulness as well as how to easily implement it against and MVC project.

The next few chapters keep your feet wet with building out a store website. Who doesn’t love a lot of code and examples in a tech book right? There is lots of code, testing, mocking, and just plain fun in this one.

Throughout the rest of the book you are introduced to MVC concepts (Models, Views, Controllers, Actions, Routes, Filters, Partial Views, Layouts, etc) and are given in-depth descriptions and understandings of them. These topics are essential to the framework and require a lot of teaching to fully understand and appreciate them. Adam and Steven do a wonderful job at this. A lot of tech books seem dry when it comes to that part and I often loose interest, but not with this book.

I learned a lot by reading this book and will be keeping a copy for referencing and will most definitely read it again. There was so much covered in this book, that I will need to go back through it now that I am working with MVC 3 and Razor.

No Comments