Pro ASP.NET MVC Framework Book Review - Steven Sanderson / Apress

I just finished Pro ASP.NET MVC Framework by Steven Sanderson and Apress. Pro ASP.NET MVC Framework is an excellent book. I read it as a PDF and can't wait for the hard copy to get here in the mail as this will be the book that sits within arm's reach while I work at my desk.

Pro ASP.NET MVC Framework is broken up into two parts.

 

Part I : SportsStore ASP.NET MVC Web Application

The first part of the Pro ASP.NET MVC Framework starts out with a bang by walking you through the creation of a SportsStore ASP.NET MVC Web Application. You create the product catalog pages, shopping cart, checkout pages, administrative pages, and everything else to get the store up and running. You will be diving into the basics of views and controllers, model binding and custom modelbinders, validation via IDataErrorInfo, navigation, PartialViews and Html.RenderAction, forms authentication, etc.

During the development you are introduced to the concepts and features of the MVC framework with special consideration for:

  • Domain-Driven Design using Repositories, Aggregates, etc.
  • Unit Testing and Mocking
  • Dependency Injection via Castle Windsor

What I like about Steve's approach here is that he introduces these “advanced” topics in a very comfortable and inviting manner for those interested, but not in such a way that it detracts from the book if you are not interested. Steve uses LINQ To SQL and approaches it from a code-first perspective so that you can get a feel for a semi-POCO use of LINQ To SQL in your domain model. If that wasn't enough, he also brushes the reader up on C# 3.0 Language Features used during the book so you feel comfortable with the code being presented.

 

Part II: ASP.NET MVC in Detail

The second part of the book is about the ASP.NET MVC Framework in detail, and I mean detail. Steve doesn't just give you the basics, but dives down deep and tells you exactly how things work and the order in which things happen.

You get the overall look of the ASP.NET MVC Request / Response Pipeline and then he picks it apart and gives you the details of:

  • URLs and Routing
  • Controllers and Actions
  • Views
  • Data Entry
  • AJAX and Client Scripting
  • Security and Vulnerability
  • Deployment
  • ASP.NET Platform Features
  • Combining MVC and Webforms

Steve does a great job here of first telling you what you get out of the box and how it works, which is perfect for hitting the ground running. However, for those who want to know more, he starts digging deeper and deeper explaining how things work under the covers and how to customize and take advantage of those features when it makes sense. He talks about a lot of extensibility, like creating -

  • Routing Constraints and Custom Route Handlers
  • A Custom Action Result for putting a Watermark on an Image
  • Authorization, Result, Action, and Exception Filters
  • Custom ControllerFactories
  • ActionMethodSelectorAttributes
  • Custom ModelBinders
  • Vew Engines
  • etc...

You even get nifty examples like how to create a solution for CAPTCHA, RSS Feeds, etc. There is a really cool section on confirmation links and tamper-proofing with HMAC Codes. For those wanting to understand security with the ASP.NET MVC Framework, Steve does an excellent job discussing Cross-Site Scripting and HTML Injection, Session Hijacking, Cross-Site Request Forgery, etc.

A lot of this comes with considerations for unit testing and mocking, so if you want to get a feel for how you would test a lot of this Steve addresses that as well.

 

Conclusion

Pro ASP.NET MVC Framework by Steve Sanderson and Apress is a must-have ASP.NET MVC book IMHO.

Check the reviews on Amazon

 

David Hayden

 

posted on Monday, May 11, 2009 10:04 PM

Main

News

Green Tea

.NET Development

Enterprise Library

Patterns & Practices