O'Reilly logo

Professional ASP.NET Design Patterns by Scott Millett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Creating The Product Catalog

WHAT'S IN THIS CHAPTER?

  • Requirements for the product catalog browsing experience

  • Creating the product domain model

  • Building the repository infrastructure with NHibernate

  • Using AutoMapper to provide object-to-object mapping in the service layer to create view models

  • Utilizing JavaScript Object Notation (JSON) to communicate between the controllers and the ASPX views to provide Asynchronous JavaScript and XML (AJAX) functionality

In the previous chapter, you were introduced to the requirements for Agatha's store, and you built the project structure for the solution. You also began to lay the foundations of the infrastructure that will support the site's development. In this chapter, you will build the product catalog browsing functionality that will enable customers to browse for products while utilizing AJAX and adopting a web 2.0 feel throughout.

CREATING THE PRODUCT CATALOG

Figure 11-1 shows the pages involved in displaying the product catalog for customers to browse. In this section, you will build all the code to enable customers to browse for products, and in the next section, you will build the basket functionality.

FIGURE 11-1

Figure 11-1. FIGURE 11-1

Product Catalog Model

Figure 11-2 shows the classes that form the product catalog model. The product catalog part of the domain model is fairly anemic, with little business logic. A ProductTitle represents the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required