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 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, ...

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