Patterns on Designing API Endpoint Operations

TitlePatterns on Designing API Endpoint Operations
Publication TypeConference Paper
Year of Publication2021
AuthorsSingjai, A., U. Zdun, O. Zimmermann, M. Stocker, and C. Pautasso
Conference Name28th Conference on Pattern Languages of Programs (PLoP’21)
Conference LocationVirtual
KeywordsAPI, Domain-Driven Design

Domain-driven design (DDD) is often applied when implementing microservices or communicating through APIs in distributed
systems. APIs expose a published language that provides a view on entire domain models or subsets of such models. Hence,
tactical DDD patterns such as Aggregate, Service, and Entity may not only structure API implementations, but also guide API
specification work. In our previous work, we described endpoint-level patterns for this context. In this paper, we present three
complementary patterns, namely Aggregated Domain Operation on API Endpoint, Event-Based API Endpoint Operation, and
CRUD-Based API Operation. These patterns aim to derive API operations from the operations of Domain Services and Entities
as well as Domain Events. We also discuss variants of these patterns, such as their combination with the patterns Command
Query Responsibility Segregation (CQRS) and Publish/Subscribe. Our pattern mining work is based on a data set from an
empirical study of 32 grey literature sources investigating practitioner views on deriving API designs from DDD models.

Citation Key2021:plop
Refereed DesignationRefereed