Live data from Hacker News

REST is the new SOAP

medium.com

271–280 of 351 posts

Re: REST is the new SOAP

#271

Earlier quoted context omitted.

I avoid medium posts as much as possible. Everyone is an expert on there with very strong opinions telling me how every technology older than 2 years and not written in javascript is obsolete/dead/not the right way/new . And what's with the UI on their publications. They take up top 25% of the screen with the branding and navbar and bottom 10% asking me to sign in and both sticks on the screen. Who approved that?

Medium posters borrow clout from medium which makes their post have clout. If you think of medium posters as just bloggers with their own domain or blogspot, you'll see them differently.

Who are these people who think that writing on Medium gives you clout?

Re: REST is the new SOAP

#272

Those who refuse to learn history are doomed to repeat it. REST is not the end of history, there can and should be successor architectures, but RPC is not that successor. It’s been around a very long time and fell out of fashion for good reason. It is a convenient approach that can be used if you have major control over all the interfaces, endpoint implementations and underlying infrastructure, as Google does for its…

> It really falls over if you want independent implementations and variable infrastructures over a large scale, as is the case for most Internet / Web interactions. But what exactly? I can't really think of anything that would work without an interface description (like a HTML form). Let's have a few informal RPC signature conventions for example for retrieving a Web page (the equivalent to HTTP GET). It would make d…

HTTP GET is one of the most formalized, optimized and tested standards in the world. Replacing that with “an informal RPC signature” would be a nightmare for developers : misunderstood semantics, little to no interoperability, poor performance, poor scalability, and on.

If you think there is no problem replacing hyperlinks with RPCs, be my guest, do so on all your forthcoming projects, and see if it works. It sounds like a bad idea to me but we are both just random people on the internet.

Re: REST is the new SOAP

#273
REST has the same problem as object oriented programming. It's too skeuomorphic. Lots of web applications are wrappers around conceptually monolithic resources, so it's convenient to use a protocol that makes that assumption. But as soon as you need to nest resources, or perform some action that has nothing to do with CRUD, or do just about anything interesting, the metaphor begins to fall apart.

(That's also why OOP has all these "patterns." Many are just attempts to cope with the "object" metaphor falling apart. "Is" an AttackingRock a Monster, or "is" it an Obstacle? Hmm...)

Re: REST is the new SOAP

#274

I author REST APIs and try to do them properly, with mediatypes, link relations, and all the good hypermedia stuff most people avoid. Nonetheless, the author's post reflects the sort of rant I've had to coworkers at the watercooler, or anyone who'd listen. The author nicely preempts the debate about HATEOAS and "most RESTful APIs aren't REST" and shows that the debate is part of the problem. It is. It's not a spec bu…

> The author nicely preempts the debate about HATEOAS What is the debate about HATEOAS? What's the difference between an API with and without that quality?

Thank you. This is one that I've been puzzling over for years. If anyone has a straightforward answer, and can provide example REST responses with and without "HATEOAS", I'd really appreciate it.

Re: REST is the new SOAP

#275

Earlier quoted context omitted.

> The author nicely preempts the debate about HATEOAS What is the debate about HATEOAS? What's the difference between an API with and without that quality?

Thank you. This is one that I've been puzzling over for years. If anyone has a straightforward answer, and can provide example REST responses with and without "HATEOAS", I'd really appreciate it.

See the 'Richardson Maturity Model' levels [1], and contrast level 2 with 3. Level 3, satisfying the HATEOAS constraint, has hyperlinks leading to other resources, and the relationship between the origin and destination resource is qualified (with link relations [2]).

Essentially, everything is a graph, resources are the nodes, and the labels on edges are the relations, also serving as an inventory of state transitions.

The "HATEOAS debate" is the trope that says people will inevitably debate whether a particular API that claims to adhere to REST does in fact adhere to REST, because many APIs that namedrop REST don't satisfy the HATEOAS constraint. This is rarely a practical debate, but the fact that it keeps coming up -- and people take the time to explain -- is part of the problem with REST. This was the author's point.

[1] https://martinfowler.com/articles/richardsonMaturityModel.ht... [2] https://www.iana.org/assignments/link-relations/link-relatio...

Re: REST is the new SOAP

#276
Here's the secret of REST: it's all about the information and definitely not verbs.

The author begins by confusing HTTP with REST. I understand that HTTP is probably the most common protocol for implementing RESTful architectures, but since the author is devoting so much time to trashing REST, they ought to correctly make this distinction. Hence, the complaint that HTTP verbs aren't adequate to express certain problems isn't a critique of REST, it's a critique of HTTP. This problem is present throughout the entire article.

Then, the author complains about the specifications of REST (i.e. "What a scoop in the software world" with respect to the client/server architecture). Not all applications are well-suite to client/server architectures -- those applications are not well-suited for REST. Some principles of any architecture may seem simple, but I don't think that's an inherit problem.

The author really revealed their ignorance with:

    >Rest is awesome, because it is STATELESS. Yes there is 
    >probably a huge database behind the webservice, but it doesn't
    >remember the state of the client. Or, well, yes, actually it
    >remember its authentication session, its access permissions… 
    >but it’s stateless, nonetheless.

REST is not stateless, RESTful communication is. This just means that each request from the client contains the information necessary to create an appropriate response -- and that this is possible for all resources. That implies that issuing temporary authentication tokens is not RESTful, since an initial authentication request is required to create a second "meaningful" request. This is a desirable trait for many classes of applications.

However, all of this being said, the proposition 'REST is sometimes used inappropriately' is true, and it is interesting and constructive to identify situations where REST is being used inappropriately. It isn't clear to me that RPC calls are appropriate in all (or even most) places REST is used.

Rants like the one in this article are really toxic, simply because they make people think this is an acceptable way to approach technological problems. What would actually be useful is to:

* identify and find examples of misuses of REST

* try to create a taxonomy of REST abuses and recommendations for those scenarios

Re: REST is the new SOAP

#277
post #172

I tried some experiments earlier this year with radically simpler RPC calling conventions. It's called NSOAP, and is available for express, koa and React. It gets rid of HTTP verbs and treats the url like code. https://github.com/nsoap-official/nsoap-express Some examples. //Adds two numbers http://www.example.com/addTwoNumbers(10,20) //String arguments http://www.example.com/search(thomas) //Parameters http://www.ex…

Looks a little bit like OData, at least the querying parts.

Re: REST is the new SOAP

#278
post #13

Why is REST so popular? Because it's easy to implement and works for lots of use cases. I'm sorry that you found places it doesn't, but in the real world, having been through that SOAP pain it's being compared to, I'd say there's not even a comparison. Everyone seems to want to find a reason to dislike product/technology/feature X but in this case, X is just better than anything we've had for a 90% adoption case. Wha…

I thought that SOAP was great, in that the library handed remote executions without extra work.

There are HA microservice and REST model libraries/clients that do it much easier and without XML :D

You have to give it up to Colfer protobufs on zeromq and kafka :D

edit: stray click

GRPC is fun too. I miss my fiber interconnected compute though.

Re: REST is the new SOAP

#279
post #146
post #17

Article reads like being from a crumpy snarky old age dev who lives in his XML-land filter bubble of the 1990s. Go back to XMLRPC and SOAP please. This site is getting more of these corporate old farts lately that don't want to adjust at all. I wish the time back when this site was about startup news, VCs, and new exiting things and not about whining and boring stuff.

We've asked you many times to please comment civilly and substantively, and yet you've continued to repeatedly violate the guidelines, so we've banned the account. We're happy to unban accounts if you email us at hn@ycombinator.com and we believe you'll start following the guidelines. https://news.ycombinator.com/newsguidelines.html

You shadow banned my account? In case you, a mod, can read this:

Repeatedly? I was questioning if certain accounts are corporate PR drones and downvoting bots, yes. (At least two companies employ very visible a bunch of accounts, and use them to flag/votedown articles and add troll comments to get articles hidden, while they publish "good news" in the very same moment. It's visible on the web, you are in partnership with those companies, and one can guess YC profits from the partnership). But beside that not so much. Unfortunately, two admins never found any evidence, they said, and just said shut up or we ban you. Yeah free speech isn't something on HN. News get marked as hidden every single day, that have many comments and/or high votes, and the two mods never found any evidence and always said "it's the users faults, they flagged it", yeah right, not.

Re: REST is the new SOAP

#280
REST and SOAP are in fact the exact opposite.

SOAP was designed to be a "fit all cases" solution. and that turned out to be an over complicated over engineered solution that pretty much everybody hated.

REST grew organically from people using HTTP and liking it and thinking "hey I could actually make an API from http calls and that would be pretty neat". Sure it's not great for a lot of cases, but it gets the job done and is the natural way to query a server with a browser. So I f I can make a website and the API at the same time, then that's that much less work for me.

This is exactly the same type of rant we get about node.js, electron or Python. When people chose these technologies they know it's crap. Writing a server in an interpreted, dynamically typed language is pretty dumb. Running a desktop app as a local web service rendering in an embedded browser is somewhat less than ideal. And using one of the least efficient language for data processing is somewhat counter intuitive...

The point is: people like working with these. Get over it.

Post reply on HN