Chapter 13. Customer Membership

WHAT'S IN THIS CHAPTER?

  • You will build the customer domain model and customer account section

  • You will use the ASP.NET membership API to offer a local authentication service

  • You will use a web-based authentication service provided by Janrain to allow customers to authenticate themselves on the site using existing accounts such as Google and Facebook

This chapter builds upon the solution from Chapter 12 by adding customer membership functionality. In this chapter, you tackle the requirements of customer membership, registration, and authentication.

CUSTOMER MEMBERSHIP

Figure 13-1 shows the site map for customer membership.

You will focus on the login and registration functionality as well as the customer and delivery address book management. The next chapter deals with the customer's order history.

Customer Model

The domain model for customer aggregation is simple and consists of only two classes: the Customer and the DeliveryAddress, as shown in Figure 13-2.

FIGURE 13-1

Figure 13-1. FIGURE 13-1

FIGURE 13-2

Figure 13-2. FIGURE 13-2

Address has been defined as a separate base class because it will be used with the order aggregation to represent the order dispatch address. Because customers and addresses can be created, it's important that they are created in a valid state. With this in mind, ...

Get Professional ASP.NET Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.