TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Someone Save Us From REST

42 pointsby subdigitalabout 13 years ago

8 comments

xivSolutionsabout 13 years ago
Crack me up.<p>I am still learning programming the hard way - namely, by checking out how other folks do it, then struggling to do it myself. However, I've learned enough, I think, to get the impression that some people get rrrreeeallly attached to their architecture.<p>I have come to believe that all these models, "patterns" and such are very useful tools, but only that. Seems like we keep having these religous wars about language, patterns, architecture, whatever.<p>All of it is only useful as long as it, well, useful. When the "architecture" starts hindering the function, it has stopped doing it's job.
skogenikabout 13 years ago
I used to be a programmer like you, then I took a Paradigm to the ... sorry, I can't do it.<p>You raise very good points though are we asking to be saved from REST or REST Pedants who argue about minutia ?
neilkabout 13 years ago
I have not yet seen any application that would be improved by full HATEOAS. Fielding argues that you need it if you intend to be around for decades. Guess what, the Flickr API is verging on a decade and it's still doing fine.<p>Some things in the Flickr API could be nicer with more HATE. For instance, currently, the client needs to know how to turn a returned photo ID into a URL. Fielding would ask why the API doesn't just return URLs in the first place. (One answer: because that would be inanely repetitive.)<p>But that's mostly cosmetic. Yes, we expect the client to translate IDs to page URLs, but we also expect it to understand what the difference between a photo and a user is.<p>Nobody has explained to me how "Hypermedia" APIs are supposed to be traversable without a programmer embedding significant domain knowledge into the library anyway.
sukuriantabout 13 years ago
You're going to need a ControllerFactory for those Controller's; but at least you're using MVC. Did you remember to not have your Singleton instance instantiated until its first call?<p>Programming is an art as well as a science; and those papers were guides to direct us toward something useful, not to be followed as creed and memorized to be recited in a religious ceremony. The sooner people learn that, the better.<p>In all, I agree with your the post.
carsongrossabout 13 years ago
What, an methodology that encourages (pedants note: I did not say mandates) a CRUDdy API, where resources are grouped together behind different urls, making automated interactions of any significance an almost hilariously slow series of HTTP requests (oh, oh, oh, keep alive!) while at the same time giving the API designer a smug sense of satisfaction and accomplishment might be worth looking at skeptically?<p>Naaaaaaaaaah.
jongalloway2about 13 years ago
Nice explanation from Glenn on both implementation decisions - both separate controllers and different url's: <a href="http://codebetter.com/glennblock/2012/02/28/why-are-there-2-controllers-in-the-asp-net-web-api-contactmanager-example-rest-has-nothing-to-with-it-2/" rel="nofollow">http://codebetter.com/glennblock/2012/02/28/why-are-there-2-...</a>
Mayank_about 13 years ago
Brilliant post with intended humor. I see some bigger points here, beyond the discussion of REST. Like a satire on design and (over) engineering.
johncoderabout 13 years ago
Awesome post. Love how Rob questions things and stirs the pot. Several good points.