3 ms·
There is no data that should be encapsulated in hypermedia. YAGNI in this sense is the opposite - You Are Gonna Need It
by sublinear 3y ago
There is no data that should be encapsulated in hypermedia. YAGNI in this sense is the opposite - You Are Gonna Need It
- recursivedoubts 3y agoThat's fine, you can build a reasonable general purpose JSON API very quickly, particularly if you aren't having it dragged around by your web applications nitty-gritty needs. In the linked essay I am riffing on someone already recommending splitting your JSON APIs into a general purpose API for clients, and a specialized one for your web application, in order to separate these two concerns and remove the pressure that that latter puts on the former. I recommend going further with that and adopting hypermedia for your application API, since no one else should be depending on it. I recommend this because I like the hypermedia paradigm, but it only makes sense as part of a complete hypermedia system. Trying to reuse a hypermedia API for other clients isn't a good idea and that's not what I'm recommending. Does that make sense?