ASP.NET MVC 1.0 Test Driven Development: Problem – Design – Solution
A hands-on journey takes you through the development process of a Web application from concept to production
ASP.NET MVC is a new Web development framework created by Microsoft as an alternative to ASP.NET web forms applications. MVC is well suited to testability, and Test Driven Development (TDD) affords you a generous level of control while also making MVC very powerful and extensible. This book takes the ASP.NET MVC and combines it with a testing methodology and tools and guides you through the process of taking Web application from concept to production.
Using a complete working sample application that demonstrates all the tools needed to build an e-commerce Web application, the popular Problem – Design – Solution format gradually introduces you to new alternative tools, frameworks, and methodologies to get you started creating cutting-edge Web applications.
- ASP.NET MVC is Microsoft's hot new Web development framework to use as an alternative to ASP.NET Web forms applications
- Use the popular Problem – Design – Solution recipe and encourages you to get involved with developing a Web application from concept to production
- Introduces new alternative tools, frameworks, and methodologies, such as nUnit and Inversion of Control containers
- Shows you how to use open source JavaScript libraries and work with a mocking framework
As you work with all facets of Web application development-requirements, design, testing, deployment, beta releases, refactoring, tool, and framework selection-you will have developed a live Web application by the time the book is finished.
ASP.NET MVC 1.0 Website Programming: Problem – Design – Solution (Wrox Programmer to Programmer)
Perfectly suited to the innovative Problem Design Solution approach, ASP.NET MVC is a new development model that separates code for the data, look, and business processes of a Web site. This nuts-and-bolts guide thoroughly covers creating a Web site with MVC and discusses solving the most common problems that you may encounter when creating your first application or trying to upgrade a current application. The material is based on the highly praised and widely used TheBeerHouse ASP.NET Starter Kit that was developed in the bestselling ASP.NET 2.0 Website Programming: Problem–Design–Solution. Additional coverage includes registration and membership systems and user-selectable themes; content management systems for articles and photos; polls, mailing lists, and forums; e-commerce stores, shopping carts, and order management with real-time credit card processing, and more.
ASP.NET MVC in Action
The final version of ASP.NET MVC 1.0 was released March 2009 during the Mix 09 conference and nobody was caught by surprise with what was inside—and this is a good thing. Before the debut of the final version, the product team had released multiple public previews with full source code in an effort to raise the bar on openness and community involvement for a Microsoft product.
Why would we do this?
Transparency and community involvement are noble goals, but they aren’t necessarily the end goal of a project. What we’re really after is great product. I like to think of ASP.NET MVC as almost an experiment to demonstrate that transparency and community involvement were great means to achieving that goal.
After Preview 2 of ASP.NET MVC was released, we received a lot of feedback from developers that writing unit tests with ASP.NET MVC was difficult. Jeffrey Palermo, the lead author of ASP.NET MVC in Action, was among the most vocal in providing feedback during this time. We took this feedback and implemented a major API change by introducing the concept of action results, which was a much better design than we had before. Community involvement helped us build a better product.
ASP.NET MVC focuses on solid principles such as separation of concerns to provide a framework that is extremely extensible and testable. While it’s possible to change the source as you see fit, the framework is intended to be open for extension without needing to change the source. Any part of the framework can be swapped with something else of your choosing. Don’t like the view engine? Try Spark view engine. Don’t like the way we instantiate controllers? Hook in your own dependency injection container.
Professional ASP.NET MVC 1.0
This book begins with you working along as Scott Guthrie builds a complete ASP.NET MVC reference application. He begins NerdDinner by using the File->New Project menu command within Visual Studio to create a new ASP.NET MVC Application. You'll then incrementally add functionality and features. Along the way you’ll cover how to create a database, build a model layer with business rule validations, implement listing/details data browsing, provide CRUD (Create, Update, Delete) data form entry support, implement efficient data paging, reuse UI using master pages and partials, secure the application using authentication and authorization, use AJAX to deliver dynamic updates and interactive map support, and implement automated unit testing.
From there, the bulk of the rest of the book begins with the basic concepts around the model view controller pattern, including the little history and the state of the MVC on the web today. We'll then go into the ways that MVC is different from ASP.NET Web Forms. We'll explore the structure of a standard MVC application and see what you get out of the box. Next we dig deep into routing and see the role URLs play in your application. We'll deep dive into controllers and views and see what role the Ajax plays in your applications. The last third of the book focuses entirely on advanced techniques and extending the framework.
In some places, we assume that you're somewhat familiar with ASP.NET WebForms, at least peripherally. There are a lot of ASP.NET WebForms developers out there who are interested in ASP.NET MVC so there are a number of places in this book where we contrast the two technologies. Even if you're not already an ASP.NET developer, you might still find these sections interesting for context, as well as for your own edification as ASP.NET MVC may not be the web technology that you're looking for.
It’s worth noting, that ASP.NET MVC is not a replacement for ASP.NET Web Forms (aka just "ASP.NET"). Many web developers have been giving a lot of attention to other web frameworks out there (Ruby on Rails, Django) which have embraced the MVC (Model-View-Controller) application pattern, and if you’re one of those developers, or even if you’re just curious, this book is for you.
MVC allows for (buzzword alert!) a "greater separation of concerns" between components in your application. The book goes into the ramifications of this, but if it had to be said it in a quick sentence:ASP.NET MVC is ASP.NET Unplugged. ASP.NET MVC is a tinkerer’s framework that gives you very fine-grained control over your HTML and Javascript, as well as complete control over the programmatic flow of your application.
