§5.3 Submitting OrdersIn this product development cycle, SportsStore will just send details of completed orders to the site administrator by e-mail. It need not store the order data in your database. However, that plan might change in the future,
Before next chapter’s deep dive into a real ASP.NET MVC e-commerce development experience, it’s important to make sure you’re familiar with the architecture, design patterns, tools, and techniques that we’ll be using. By the end of this chapter, you’
Now it’s time to put the framework into action for real and see how those benefits work out in a realistic e-commerce application.Let name our first application with "SportsStore",so the online shopping have functions as follows: a product catalog
§2.4 A Starter ApplicationIn the remainder of this chapter, you’ll learn some more of the basic ASP.NET MVC principles by building a simple data entry application.In the next chapter, you’ll find a discussion of the key MVC architectural principles,
§5 SportsStore: Navigation and Shopping CartIn this Chapter ,you’ll learn how to do the followingUse the Html.RenderAction() helper method to create reusable, unit testable,templated controls Validate form submissions Create a custom model binder
§2.1 Preparing Your WorkstationTo build an ASP.NET MVC 2 application, you need either of the following:Visual Studio 2010 (any edition) or the free Visual Web Developer 2010 Express.These include ASP.NET MVC 2 by default. Visual Studio 2008 with SP1
§1.1 A Brief History of Web Development 時間段技術優點缺點JurassicCommon Gateway Interface (CGI)SimpleFlexibleOnly option at the timeRuns outside theweb server, so isresource intensive(spawns separate OSprocess per request)Low-levelBronze age Microsoft
§4.7 Configuring a Custom URL SchemaHow is the MVC Framework supposed to invoke your List() method when it doesn’t know what value to supply for page?Change the URL in your browser to http://localhost:xxxxx/?page=1 or http://localhost:xxxxx/?page=2
§5.2 Building the Shopping CartIn this section, you’ll do the following:Expand your domain model to introduce the notion of a Cart, and work with a second controller class, CartController. Create a custom model binder that gives you a very
§4.5 Setting Up DIBefore getting started with unit testing, it’s worth putting your DI infrastructure into place. This will deal with resolving dependencies between components.(e.g., ProductsController’s dependency on an IProductsRepository) For