Sigh. This is optimizing for the wrong problem. Stop creating REST APIs that are only level 1 or 2 (see http://martinfowler.com/articles/richardsonMaturityModel.htm... ). Start writing HATEOS systems where the client is coupled to the semantic rather than the syntax. Machine parseable interface descriptions might get rid of some boilerplate but it doesn't make for a more robust client-server relationship.
Stop Writing REST API Clients
51–60 of 137 posts
Re: Stop Writing REST API Clients
#52Re: Stop Writing REST API Clients
#53Yeah, let's do CORBA once again. No thanks.
Well, it wouldn't be so bad if it were universal enough, but we'd probably have to wrap it in some sort of inter-ORB protocol for the internet or something...
Actually not having a "universal" spec helps: it forces every provider to give some thought to how to make his API as lean as possible. Hopefully.
Re: Stop Writing REST API Clients
#54RPC FTW ;)
Re: Stop Writing REST API Clients
#55Substitute "XML" for "JSON" and we've now come full circle. The point about REST is that it is self-describing. And ideally should be using the same URIs as the version people clicking around in Firefox or Chrome see. The API is just the XML or JSON or whatever is flavour of the week version of the HTML version. (Or we could use embedded data—microformats, microdata, RDFa—and get rid of that distinction.)
Re: Stop Writing REST API Clients
#56Another example: I wrote a client that returns a queue message. Attached to that message are some helper methods for deleting, releasing, and touching the message. It makes your code cleaner and easier to understand.
Re: Stop Writing REST API Clients
#57Sigh. This is optimizing for the wrong problem. Stop creating REST APIs that are only level 1 or 2 (see http://martinfowler.com/articles/richardsonMaturityModel.htm... ). Start writing HATEOS systems where the client is coupled to the semantic rather than the syntax. Machine parseable interface descriptions might get rid of some boilerplate but it doesn't make for a more robust client-server relationship.
Re: Stop Writing REST API Clients
#58We could give a name to the language we use to define such files. It's a language that defines Web services, so perhaps Web Services Description Language? :-) http://en.wikipedia.org/wiki/Web_Services_Description_Langua... Flippancy aside, maybe there's a need for a next generation of this that skips all the XML headaches after all.
JSON has just been lucky that its user base hasn't been the same enterprise architects that ruined Java.
Re: Stop Writing REST API Clients
#59While this has some benefits, it seems like a slippery slope leading back to SOAP.
Re: Stop Writing REST API Clients
#60Can someone please explain me why it doesn't scale ? True question.