Live data from Hacker News

Stop Writing REST API Clients

ttezel.github.com

21–30 of 137 posts

Re: Stop Writing REST API Clients

#21
I don't see how writing JSON REST API descriptions isn't practically the same as writing REST API clients anyway: they're still clients, just written declaratively rather than procedurally.

If the point is "stop writing procedural REST API clients and write them declaratively instead" then that advice is by no means restricted to REST API clients.

If the point is "hey, I noticed that REST API clients are another thing that we can now comfortably write declaratively" then OK.

Re: Stop Writing REST API Clients

#23
post #6

While this has some benefits, it seems like a slippery slope leading back to SOAP.

Exactly. But to be precise, REST would be the equivalent of SOAP and the format described in this post would be equivalent to WSDL [1]. And then, we'll need a central location to store all of these API descriptors and UDDI [2] will be back with a vengeance. [1] http://www.w3.org/TR/wsdl [2] http://en.wikipedia.org/wiki/Universal_Description_Discovery...

When I see this post, the first thing to pop up is SOAP as well. Just that SOAP is not human-readable. Then I suddenly remembered that it wasn't SOAP itself that include the schema but the SOAP providers would generate WSDL alongside a SOAP endpoint.

Re: Stop Writing REST API Clients

#27

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.

[deleted]

Re: Stop Writing REST API Clients

#28

We 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.

http://en.wikipedia.org/wiki/Web_Application_Description_Lan... ?

Re: Stop Writing REST API Clients

#30

We 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.

http://en.wikipedia.org/wiki/Web_Application_Description_Lan... ?

It's still XML but that does look closer. I thought the other commenter was joking that this existed.. :-)
Post reply on HN