September 2015
Intermediate to advanced
354 pages
8h 27m
English
While building a RESTful web API, you should try avoiding the chattiness of APIs. On the other hand, APIs should not be overly coarse-grained as well. Highly coarse-grained APIs become too complex to use because the response representation may contain a lot of information, all of which may not be used by a majority of your API clients.
Let's take an example to understand the difference between fine-grained and coarse-grained approaches for building APIs. Suppose that you are building a very fine-grained API to read the employee details as follows:
GET /employees/10/nameGET /employees/10/address1GET /employees/10/address2 ...Read now
Unlock full access