O'Reilly logo

Take My Money by Noel Rappin

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

Building the Shopping Cart Feature

Now that you understand the data model, let’s build our first piece of checkout functionality: adding items to the shopping cart.

Our requirements are simple:

  • The user needs to be able to go to the page for an event and select the number of tickets to be purchased for a specific performance.

  • The user needs to be taken to a shopping cart page that shows the newly entered items.

That’s the happy path, and once we get that in place, I’ll talk about some failure scenarios or edge cases.

We’ll build our shopping cart feature using test-driven development (TDD), which also gives us an opportunity to see how we’ll be writing tests as we move forward. A common TDD process is called outside-in, which starts with an ...

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