Hacker News new | ask | show | jobs
by danbruc 1286 days ago
If it was only arguing about equally good tools, but sometimes actively choosing the worse tools is beyond me. XML and SOAP were perfectly fine and mature solutions with a lot of optional bells and whistles, but no, we have to invent and religiously use JSON and REST which are inferior in almost any way. And then we reinvent everything we already had - we invent JSON schema to replace XSD, we invent Swagger to replace WSDL and SOAP, and whatever does the job of XPath, XSLT, ... And we of course also make this change in a software that has been developed for more than a decade - because this is how it is done nowadays - and now half of the services are SOAP and half of them are REST.
2 comments

I feel you're trolling. SOAP was a horror and REST is nothing to do with data formats. And while XML was fine, XML schemas were hellish and I've awful memory of them.

> and now half of the services are SOAP and half of them are REST

which seems to contradict in tone your first sentence.

[...] and REST is nothing to do with data formats.

In theory yes, but in practice almost no one builds anything that comes close to the initial vision of REST, in practice, i.e. the way the term is commonly used, REST means little more than we push around JSON via HTTP and maybe the HTTP method indicates what operation I want to do. And REST I mentioned with Swagger in comparison to SOAP and WSDL, not to JSON or XML.

Perhaps you could explain what that means, given REST is defined fairly well in Fielding's dissertation, and fits in quite well with pushing data around with the HTTP method indicating the operation. Wat else?
HATEOAS [1], i.e. you discover the available operations dynamically. In my opinion totally impractical unless the service is directly consumed by humans or you are building some kind of naked objects application [2] with all its implications. But this is what really distinguished REST from other remote procedure call implementations and this is also what essentially nobody does.

[1] https://en.wikipedia.org/wiki/HATEOAS

[2] https://en.wikipedia.org/wiki/Naked_objects

And the other two halves are gRPC and GraphQL...

Perhaps a Monty Python Shoe vs. Gourd reference would illustrate...

https://www.youtube.com/watch?v=Ka9mfZbTFbk&t=44s