chapter nine

9 Designing a web application

 

This chapter covers

  • Goals, scenario and plan for the second part of this book
  • Creating a domain model for the scenario
  • Adding functionality to the domain model with user stories

In the first part of the 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 an API design process and further through the API lifecycle is not just about OpenAPI and tools. It’s also about people and processes. There are always new requirements and unforeseen circumstances that require handling. We tried making this second part of the book as close to reality as possible. That’s why we go through the process with a fictional company.

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

9.1 The PetSitter idea

Meet José. He is the owner of a small web development company. Even though he’s earning good money designing custom websites and web applications, he thinks a lot about developing his business and starting his own product. And he’s already got a business 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 General Introduction

9.3.2 Domain modeling for APIs

9.3.3 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?

9.5.2 Collecting user stories

9.5.3 Mapping user stories

9.6 Summary