Book Review : Test-Drive ASP.NET MVC
I just finished reading of Pragmatic Bookshelf's Test-Drive ASP.NET MVC written by Jonathan McCracken. This book gives an excellent introduction to ASP.NET MVC 2 using Test Driven Development (TDD) approach. Jonathan introduces the ASP.NET MVC framework with a Test First development approach that gives you a better understanding of both ASP.NET MVC 2 and TDD. Jonathan's writing style is very enjoyable and can be easy to follow the whole book. He is explaining all concepts with good sample code. The book explores the topics such as IoC with Castle Windsor, NHibernate, Fluent NHibernate , Nunit, Rhino Mocks, jQuery, REST and Build/Deploy that can be very useful for building real world ASP.NET MVC applications.
This is a near 300 page book and it is not a reference for ASP.NET MVC but it will give you a better understanding of ASP.NET MVC with a practical and TDD way. This book along with Steven Sanderson’s Pro ASP.NET MVC 2 Framework would be a great combination for learning and developing applications with ASP.NET MVC 2. I hope that this book won’t be the last book from Jonathan McCracken and expecting more practical books from him in future.
I highly recommend Test-Drive ASP.NET MVC for those new to ASP.NET MVC Framework or Test Driven Development (TDD). This book will give you a better understanding of ASP.NET MVC Framework with a practical and TDD way.
The contents of the book is given below
1 Getting Started with ASP.NET MVC
1.1 How ASP.NET MVC Works
1.2 Installing MVC
1.3 MVC in Five Minutes: Building Quote-O-Matic
2 Test-Driven Development
2.1 TDD Explained
2.2 Test-Driving “Hello World”
II Building an Application
3 Getting Organized with MVC
3.1 Time Management with GetOrganized
3.2 Reading Data
3.3 Creating a To-Do
3.4 Deleting: Creating an Action Without a View
3.5 Updating: Marking a To-Do as Complete
4 Working with Controllers
4.1 Creating Topics
4.2 Using the FormCollection and TempData Objects
4.3 Adding a Little Color with jQuery
4.4 Controllers Talking to Controllers
5 Managing State and Files with Controllers
5.1 Enabling Filters and Results with Controllers
5.2 Logging In
5.3 Storing Information in Memory
5.4 Manipulating Files
5.5 Testing Routes in MVC
6 Enhancing Views with HTML Helpers and Master Pages
6.1 Making Our Site Presentable with HTML Helpers
6.2 Building a Custom HTML Helper
6.3 Simplifying Page Layouts with Master Pages
6.4 Adding Validations Using ModelStateDictionary
6.5 Replacing Web Controls with Advanced HTML Helpers
7 Composing Views with Ajax and Partials
7.1 Working with Ajax
7.2 Finding It in a Snap with Autocomplete
7.3 Using Partials to Reduce Duplication
III Integrating with Other Frameworks
8 Persisting Your Models
8.1 MVC’s Next Top Model: NHibernate
8.2 Using the Repository Pattern
8.3 Mapping with Fluent NHibernate
8.4 Creating and Reading Records
8.5 Editing Models
8.6 Deleting Records
8.7 Additional ORM Data Relationships
9 Integrating Repositories with Controllers
9.1 Fixing the NHibernate Session Inside MVC . . . . . . .
9.2 Using Inversion of Control with the IControllerFactory
9.3 Injecting Repositories into Controllers
9.4 Creating a Custom Action Filter
9.5 Linking NHibernate and MVC Validations
9.6 Preventing Performance Problems with Profiling
10 Building RESTful Web Services
10.1 Use SOAP or Take a REST Instead?
10.2 Creating a Web Service
10.3 Publishing to Blogger
IV Security and Deployment
11 Security, Error Handling, and Logging
11.1 Applying Additional Security
11.2 Using an Action Filter to Handle Errors
11.3 Using Logging to See What Went Wrong
11.4 Checking for a Pulse with ASP.NET Health Monitoring
12 Build and Deployment
12.1 Automating Builds
12.2 Using MSBuild to Automate the Build
12.3 Deploying to Production