Skip to content

Latest commit

 

History

History
119 lines (76 loc) · 8.15 KB

SDPR-CandidateEndpointList.md

File metadata and controls

119 lines (76 loc) · 8.15 KB
Scope Phases Roles Activities Abstraction/Refinement Level
Remote service layer of backend
Late analysis, early design (any iteration)
Service Designer, Integration Architect
Stepwise/Incremental Service Design (Contract First), Step 4
Technology-agnostic, platform-independent

Artifact/Template: Candidate Endpoint List (CEL)

also known as: Preliminary Endpoint List, Draft API Plan, Initial API Roadmap, Resource Candidates

A candidate endpoint list outlines an initial API design, derived from analysis results.

Motivation (Addressed Information Need)

Let us articulate the need for this artifact in question form:

How can an initial, draft set of API capabilities (i.e., responsibilities, collaborations) be compiled as these capabilities are identified in new requirements, design artifacts, and descriptions of existing systems (for instance, domain-driven designs, user interface mockups, integration stories)?

Usage (Produced and Consumed When)

Step 4 in the Stepwise Service Design activity in DPR concerns remote service layer design; the API exposed by a service provides remote facades (@Fowler:2002). The still technology- and platform-independent output of this step is the Candidate Endpoint List (CEL); an endpoint candidate may be a remote facade.

Mike Amundsen's seven-step Web API design method starts with "List all the things"; this activity roughly corresponds to Steps 1 to 3 in DPR. Arnaud Lauret proposes an "API goal canvas" in Chapter 2 of "The Design of Web APIs" (@Lauret:2019).

Who wants to do what and how? What are the inputs and outputs? Which goals result?

Template Structure and Notation(s)

A simple table will suffice:

| Endpoint | Operation | Role/Exposed Data | 
|----------|-----------|-------------------|
|...       |...        |...                |

Example(s)

Microservice API Patterns Tutorial 2 provides a customer master-data management example. In the tutorial, the following user story (complemented with architectural context information, NFRs, and a simple domain model) provides the primary input to the API design activities:

"As a customer of Lakeside Mutual, I want to update my contact information myself online so that I can make sure that the data is entered correctly and I do not have to call an agent, which may involve long waiting times."

A CEL identifying the API design and frontend-backend integration needs derived from this story looks like this (note that HTTP verbs are already called out, which might be a little early):

Endpoint Operation (HTTP verb) Role/Exposed Data
Customer Find (GET) Returns list of identifiers of customers that match some search criteria
Read (GET) Returns details of one particular customer record
Update (PUT) Allows client to change all or parts of a customer record (for instance, address and context information)

Tools

Any plain text or Markdown editor, wikis, presentation tools (and even spreadsheets) can be used to create and populate CEL tables, as long as they provide some support for table editing.

Hints and Pitfalls to Avoid

Taking the output of Step 3 in the Stepwise Service Design activity (or equivalent output of any business analysis and architecture design method) into account, you may want to follow the following steps when populating the CEL table (and, in the next step, the Refined Endpoint List (REL)):

  1. Add one candidate API per functional partition, for instance expressed as DDD Subdomain (@Evans:2003) or Bounded Context (@Vernon:2013); optionally, also add one candidate endpoint per Entity and Service in a Subdomain and/or Aggregate in a Bounded Context.
  2. Add one candidate API per layer that crosses a physical tier boundary according to the chosen assignment of logical layers to physical tiers, also known as client-server cuts (@RenzelKeller:1997). For instance, add one candidate API per client application as explained/motivated in the Backends-for-Frontends pattern.
  3. Refactor (merge, split) to remove redundant candidate endpoint entries and achieve high cohesion (w.r.t. business-/domain-level responsibilities) within endpoints.

A general hint is not to hesitate to undo and revise as you learn more about the client's information needs and provider capabilities (both on CEL and REL level).

Origins and Signs of Use

Any design/documentation artifact in between a planning item/requirement specification (for instance, a user story) and annotated source code providing a RESTful HTTP (or similar) endpoint resource qualifies as a CEL.

The CEL and REL artifacts in DPR originate from the MAP project, mining experiences in the community. Similar artifacts appear in "Build APIs You Won’t Hate" (@Sturgeon:2016) and "Design and Build Great Web APIs" (@Amundsen:2020). Chapter 2 of "The Design of Web APIs" (@Lauret:2019) features an "API Goals Canvas", which also is very similar to the CEL/REL artifacts in DPR.

Related Artifacts and Practices (incl. Alternatives)

More Information

Data Provenance

title: "Design Practice Repository (DPR): Candidate Endpoint List"
author: Olaf Zimmermann (ZIO)
date: "03, 31, 2021"
copyright: Olaf Zimmermann, 2020-2021 (unless noted otherwise). All rights reserved.
license: Creative Commons Attribution 4.0 International License