9 Designing a web application

 

This chapter covers

  • The goals, scenarios, and plan for the second part of this book
  • Creating a domain model for the PetSitter application
  • Adding functionality to the domain model with user stories

In the first part of this book, we went through the basics of APIs, how to use them, and how to formally describe them with OpenAPI. We also worked with Swagger Editor to document an existing API—the FarmStall API—using OpenAPI. Now, in the second part of this book, we’ll design a new API for a web application from scratch.

Going through the API design process and further through the API lifecycle is not just about using OpenAPI and various tools. It’s also about people and processes. There are always new requirements and unforeseen circumstances that require handling. We’ve tried to make this second part of the book as close to reality as possible by working through the process with a fictional company.

We’ll start with a founder envisioning an idea and assembling a team. Together they’ll create a plan to realize the project that starts with a domain model and user stories, continues with API design, and finishes with software implementation and integration. We’ll explain these methods as we move through the process.

9.1 The PetSitter idea

9.2 PetSitter project kickoff

9.2.1 Additional requirements

9.2.2 Team structure

9.2.3 API-driven architecture

9.2.4 The plan

9.3 Domain modeling and APIs

9.3.1 Domain modeling for APIs

9.3.2 Looking back on FarmStall

9.4 A domain model for PetSitter

9.4.1 Concepts in the model

9.4.2 The User model

9.4.3 The Job and Dog models

9.5 User stories for PetSitter

9.5.1 What are user stories?