Prof. Dr. Cesare Pautasso

Patterns on Designing API Endpoint Operations

Apitchaka Singjai, Uwe Zdun, Olaf Zimmermann, Mirko Stocker, Cesare Pautasso

28th Conference on Pattern Languages of Programs (PLoP'21), Virtual, pp. 5:1--5:15

October 2021

Abstract

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.

Download

DOI: 10.1145/3489449.3489976

PDF: ▼plop21-api.pdf (936KB)

Citation

Bibtex

@inproceedings{2021:plop,
	author = {Apitchaka Singjai and Uwe Zdun and Olaf Zimmermann and Mirko Stocker and Cesare Pautasso},
	title = {Patterns on Designing API Endpoint Operations},
	booktitle = {28th Conference on Pattern Languages of Programs (PLoP'21)},
	year = {2021},
	month = {October},
	publisher = {ACM},
	pages = {5:1--5:15},
	address = {Virtual},
	abstract = {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.},
	keywords = {API, Domain-Driven Design},
	doi = {10.1145/3489449.3489976}
}