3 ms·
How is the simpler API more "fragile"? It may lack some virtues (e.g. a paging interface) but how could it be more robust? Also note that it exemplifies many o
by podperson 14y ago
How is the simpler API more "fragile"? It may lack some virtues (e.g. a paging interface) but how could it be more robust?
Also note that it exemplifies many of the virtues cited (ease of pre-generation, ease of caching, etc.) over the more complex option. Indeed, I'd suggest many API designers would prefer to offload busywork such as sorting to the client for anything other than very large datasets (you four core 3.2GHz CPU (a) is running idle, and (b) costs me, the API designer, nothing).
Consider that the simpler API is:
a) simpler to document
b) simpler to implement
c) simpler to consume
d) scales better
Note that every time the user changes sort order the complex API gets hit. The simpler API is out getting coffee and scoring with the sexy APIs from across the street.
How is it worse?