
I finished reading ASP.NET MVC in Action
by Jeffrey Palermo, Ben Scheirman, and Jimmy Bogard. ASP.NET MVC in Action covers the ASP.NET MVC Framework very well. It has separate chapters on the various “players“ in the ASP.NET MVC Framework
- Model - This chapter has a very heavy slant towards Domain-Driven Design ( DDD ). You get introduced to Entities, Value Objects, Aggregates and Aggregate Boundaries, Repositories, etc.
- Controllers - Your normal look at these with a good discussion as to what is and what isn't the role of the controller as well as thoughts on Custom ModelBinders and ActionFilters.
- Views - Good coverage of Views, Partial Views, Master Pages and use of View Data and Strongly-Typed Views. Good look at IViewEngine as well as the importance of Presentation Model vs. Domain Model.
I typically enjoy all topics regarding ASP.NET MVC Extensibility, so the chapter entitled Customizing and Extending the ASP.NET MVC Framework was a joy to read. I never get bored with seeing examples of custom Controllers, ControllerFactories ( via Windsor and StructureMap ), ActionFilters, ViewEngines, as well as the use of Custom T4 Templates. All good stuff!
I, particularly liked Chapter 12 which was on Best Practices. Some good recommendations regarding not using Magic Strings, having a separate presentation model from domain model for more complex applications, use of strongly-typed views, view composition with partial views, use of action filters to apply common behaviors, etc.
Most of the book focuses on the Repository for persistence, but gives zero details about the implementation since it is really un-necessary to the topic. However, it that bugs you, chapter 13 looks at Recipes for data access using NHibernate, solutions to validation, a few ajax examples, thoughts on using the Spark View Engine, and other items you might find of interest.
Examples of unit testing are sprinkled throughout the book to help you understand how to test controllers, actionfilters, routes, etc. Much of the code presented in the book comes from Code Camp Server, which I believe was written specifically for the book.
All in all, I really enjoyed ASP.NET MVC in Action and highly recommend it for a fresh look at the ASP.NET MVC Framework. I would still recommend Steven Sanderson's Pro ASP.NET MVC Framework as your first ASP.NET MVC book, however, with ASP.NET MVC in Action your second book.
Check out the reviews on Amazon
.
David Hayden