Project Two: Design an Ecommerce Application
In Project Two, we are going to build an eCommerce system, which you will probably have to do at some point in your development career. In this case, we're going to build an online coffee ordering system.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

One of the most common questions that I get from students is how to build out some type of eCommerce platform, which is why I added this project to the course. You'll learn how to build all of the different components and structure them so that they can relate to each other. This will give you a high-level view of everything that's required.

In Project One, we built out a social network. Social networks, in general, have a very complex design. They have to have things like self-referential tables, joined tables, etc. which gives them their own unique set of complexities.

Ecommerce systems, on the other hand, have their own set of complexities. This project is even more complex than the Twitter project, with its own set of features and its own design.

One of the key differences I want you to focus on in this project is the HasMany and BelongsTo relationships. For example, the Order class is going to "have many" products in it, and it's going to "belong to" a user. With the Product class, that Product is going to "have many" line items. There are many different ways that you're going to have to implement parent-child relationships and discover how to model that nesting in the best way.

In addition to a complex data model, this type of system also has a number of challenges around building out the behavior. For this, we're going to utilize an activity diagram where we outline every single element and every stage that a user is going to see from when they enter the site all the way through to a completed purchase.

Project Requirements

We're going to build two diagrams. The first one is going to be structural, and it's going to be another class diagram. Expect to build a diagram that is about 10 to 20 percent bigger than the Twitter project.

Classes

  • User
  • Address
  • City
  • Country
  • Cart
  • CartItem
  • Inventory
  • InventoryItem
  • InventoryOption
  • Taxonomy (or, Category)
  • Relationship between inventory and taxonomy
  • Payment
  • CreditCard
  • PayPal
  • PaymentStatus
  • Order
  • OrderStatus
  • OrderItem

Now, let's talk about the activity diagram. We need to cover a full flow from when the user gets to the application, all the way to when they've purchased a product.

Activities

  • Search
  • View based on categories
  • Viewing Products
  • Customizing products (update qty, style, etc)
  • Add to cart
  • User registration
  • View cart
  • Update cart
  • Checkout
  • Payment

Make sure to include validation points throughout the process. For example, what happens if their credit card comes up and is declined?