Yes, finally, Microsoft has figured it out. ASP.NET MVC 2.0 lets you test drive your code, control the output of your HTML, and leverage C# and .NET in an easy-to-use web framework. This book shows you all you need to know to get started developing web applications using test-driven development (TDD). You'll learn how to do everything from creating your first test, to building REST web services, to deploying your finished ASP.NET MVC applications. Test-Drive ASP.NET MVC gets you started with all the fundamentals you need, whether you're transitioning from older Microsoft technologies, or if you're coming from an open-source background and are curious about what ASP.NET MVC has to offer.
ASP.NET MVC 2.0 is C# on the web done right. No more fiddling around with Viewstate, IsPostBack(), and drag-and-drop coding. Microsoft has addressed the shortcomings of ASP.NET and created a framework that goes toe-to-toe with other popular web frameworks such as Ruby on Rails. Programming in C# is fun again!
This book takes a test-first approach to the main features of ASP.NET MVC. You'll get hands-on experience building and deploying a time-management web application from start to finish. From building your first page, to data access, to integrating with web services such as Blogger.com, Test-Drive ASP.NET MVC guides you step by step. You'll come away with a complete understanding of web services and data access, and you'll learn how to test each component so that your code is bug-free and maintainable from the start. You'll see how to handle security, logging, and error handling.
Software isn't useful until it's deployed into production. We'll cover automated deployment using MSBuild, a build tool product that can help you get your site online, repeatably and reliably. Throughout, you'll work with open source projects that complement ASP.NET MVC, including NHibernate, MVCContrib, and Castle Windsor Container. These tools speed up developing database components, architecture layers, and testing your code.
As you build and deploy your application, you'll not only learn the framework itself, but also gain valuable experience with the test-first methodology, driving your application development through small and measurable incremental improvements.
Nice but flawed tutorial into not just ASP.Net MVC, but Test-Driven Development (TDD) as well.
The good: * Simple, understandable sample application. * Decent coverage of ASP.Net MVC framework highlights. * Easy reading, conversational style. * Works as a nice intro to TDD. * Touches on LINQ, RhinoMocks and the ORM framework NHibernate
The bad: * Relies on NUnit, rather than the VS 2008/2010 unit testing framework, though it's not hard to convert the sample code. * Would also have preferred examples using Entity Framework rather than NHibernate. * Much of the sample code (and associated narratives) leave out required 'Using' statements or reference settings. * Frequently uses techniques in the tutorial that do not relate to real world techniques ie. deleting data using an HTTP GET rather than a POST. (Fixed in a later chapter, but still...) * A larger than normal number of code samples required modification to run and were not always listed in the online errata.
In his defense, the author is providing a quick overview, not an in-depth manual. He also includes warnings that several techniques are not in line with current practice. That said, some developers are going to miss the implication of some of these bad practices and release poor or vulnerable code into the wild.