Hands-On RESTful API Design Patterns and Best Practices
by Harihara Subramanian J, Anupama Murali, Pethuru Raj
Optimized APIs
This section discusses adopting better optimization for the API. There's no concept of one-size-fits-all. In the real world, multiple APIs may support the same service as that service might be serving different types of users and use cases. As we quoted earlier in this chapter, the API should be modeled after the design according to the use case it fulfils and not by the backend services or applications it exposes.
So optimization applies to a specific business request in a particular context. Let's take an example, a web service enables its mobile app consumers to clear electricity bills. In the context of the mobile, the constraints of mobile application should be our primary consideration, as a mobile app is sensitive to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access