Chapter 5. Hypermedia Services
The best software architecture âknowsâ what changes often and makes that easy.
Paul Clements, Software Architecture in Practice (Pearson)
A primary challenge in designing and implementing APIs for services is balancing usability with evolvability. It is important for service APIs to be clear and easy to understand. At the same time it is critical that these same interfaces be defined in a way that allows for future modifications. Finally, the value of service APIs is often tied to their reliability over time. Itâs fine to be able define an API that solves an immediate problem. But as that problem varies over time, operating parameters change, and needs and goals drift over time, that APIâideallyâshould continue to be useful. Thatâs a lot to ask of a service interface design!
Tip
Check out âPromoting Stability and Modifiability with Hypermedia Servicesâ for additional discussion on the foundations of creating service interfaces.
As the chapterâs opening quote implies, knowing what changes often in a software design and making that easy is a worthy goal. This is especially true for service APIs. The API is the contractâthe promise that needs to be kept.
A great example of this can be found in the way the HTTP protocol was designed. Almost every key aspect of HTTP is modifiable. HTTP methods, status codes, URLs, the list of possible headers, and the list of possible body formats are all abstract collections that can be amended ...
Get RESTful Web API Patterns and Practices Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.