News for hackers. Stuff that matters.
Re:REST is the new SOAP by bbarn on Saturday December 16, 2017 @03:34AM (#15938508)
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.

What is with medium.com? Why is it so many links to this site are full of hateful hipsteresque opinions looking to sound smarter and more insightful than they actually are?

Re:REST is the new SOAP by DarkCrusader2 on Saturday December 16, 2017 @04:03AM (#15938584)
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 <insert a dead technology>.

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?

Re:REST is the new SOAP by jimnotgym on Saturday December 16, 2017 @05:41AM (#15938908)
Firefox reading view could have been invented for Medium! It doesn't make the articles any better though.

Personally I will keep using REST. If I ever find something is too CPU or network hungry with http/JSON I will take a look at a binary protocol.

For me REST has opened up the world of web applications to simple integrations. It is what makes simple, single use case web apps useful.

Re:REST is the new SOAP by DarkCrusader2 on Saturday December 16, 2017 @08:26AM (#15939434)
Exactly. It doesn't have to be one or the other. Why can't they both be suitable for different use cases.
Re:REST is the new SOAP by einrealist on Saturday December 16, 2017 @04:28PM (#15942233)
I have another opinion about that. Read as much medium posts aspossible, but keep a critical mind. Medium is nothing but a blog platform, not a science platform, not a news paper. Medium is important, because it makes it easy for everyone to post her/his mindset or agenda. No one has to agree with anyones opinion. But its important to know about those opinions, because it makes it easier to have a dialog.
Re:REST is the new SOAP by bogomipz on Saturday December 16, 2017 @12:21PM (#15940456)
>"And what's with the UI on their publications"

Agreed, its a content platform with a where the content fights for attention with the medium.com branding. How many people do you really "never miss a story from"? I generally avoid medium.com for this reason alone.

I'm further puzzled when I see companies using medium for their company blog as well. All I can figure is it must be recommended in some user guide to "growth hacking."

Re:REST is the new SOAP by peshooo on Saturday December 16, 2017 @05:13AM (#15938806)
I use the stylish add-on for Firefox and remove the bars.

https://userstyles.org/styles/browse?search_terms=medium.com

Re:REST is the new SOAP by unexistance on Saturday December 16, 2017 @07:02AM (#15939164)
alternatively, use a bookmarklet to remove floating div... name the such as '1. rm float'

then, it's only alt-B -> 1 away, in Firefox

Re:REST is the new SOAP by dgelks on Saturday December 16, 2017 @05:35AM (#15938888)
Thanks for this - Stylish add-on for chrome also works nicely too!
Re:REST is the new SOAP by yongelee on Saturday December 16, 2017 @11:57AM (#15940319)
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.
Re:REST is the new SOAP by capitalsigma on Saturday December 16, 2017 @10:27PM (#15943892)
Who are these people who think that writing on Medium gives you clout?
Re:REST is the new SOAP by shintakezou on Sunday December 17, 2017 @05:06PM (#15947954)
Isn't it just a content container? I mean, saying "I avoid medium" sounds like saying "I avoid wordpress" or "I avoid blogspot", speaking of content quality and not look&feel. About this one, I'm logged in, so I have to suppose your % (25% and 10%) don't apply to the logged-in case, also because as soon as I scroll down, all those frills disappears and there's only the text.
Re:REST is the new SOAP by detaro on Sunday December 17, 2017 @05:14PM (#15947987)
It's a content container. A content container that for some of us is now stereotyped as "content in here is often low-quality", which means that in the vast amount of content on offer each day we're more likely to skip links leading to medium.com. If people regularly spread bad blogspot links around, blogspot would have the same reputation. (I'm sure there is tons of spam on blogspot, but when people share blogspot links in my circles they usually are blogs by people that have been at it for ages and care more about content than appearances, so for me blogspot is a high-quality signal)

Being in a known content container is great if you don't have your own "brand" and as long as people associate the container with good content. If they don't, or if your content is way above average, it pulls you down (which provides motivation for below-average writers to write on them, hiding in the crowd, and motivation for good writers to leave)

Re:REST is the new SOAP by mrisoli on Sunday December 17, 2017 @06:28PM (#15948262)
It is a centralized content container, which makes click-bait titles like this one better material. So you can create a controversial opinion on a subject, get views, make it an entertaining even if exaggerate read and it gets featured among other pieces especially if you use the right popular tags, then your post is on people's medium app and newsletter subscription.

WordPress, on the other hand, is open source software you can host it yourself and thus you can't just slap some tags on it and get featured on top of a newsletter. This is also why some authors prefer medium, easy to setup and easier to get an audience, but then you have to resort to these marketing techniques to drive your views up.

Disclaimer: I have written some medium posts with catchy/controversial titles to test said techniques, call me part of the problem.

Re:REST is the new SOAP by kasbah on Saturday December 16, 2017 @06:15PM (#15942830)
I use the "Make Medium Readable Again" extension for when I _am_ interested in the content.

https://github.com/thebaer/MMRA

Re:REST is the new SOAP by marklgr on Saturday December 16, 2017 @06:15AM (#15938996)
I happen to have worked with the system author coded/maintained. We're not in touch and I'm not here to defend him, but he's no hipster. Rather, he had to integrate a lot of heterogeneous services, as that system was acting like a hub between many departments in the company, with various tech skills and resources. If anything, I suspect he's more kind of unsatisfied by changes that he deemed unnecessary.

As a note aside, the xmlrpc endpoints of the aforementioned system worked fine and saved us time.

Re:REST is the new SOAP by regularfry on Saturday December 16, 2017 @07:26AM (#15939247)
Xmlrpc is incredibly underappreciated.
Re:REST is the new SOAP by Marazan on Saturday December 16, 2017 @07:29AM (#15939256)
Xmlrpc is simple and it works.

Xmlrpc is soap without the bullshit.

I built lots of personal apps that were flash/flex front ends that talked to python backends over xmlrpc to quickly whip up his for my python aps

Re:REST is the new SOAP by 0x445442 on Saturday December 16, 2017 @10:26AM (#15939914)
Having implemented many web service APIs in both SOAP and REST I have the same opinion.

XMLRPC or JSONRPC seem to be the happy middle ground.

The posted article hit home with me as I had to re-implement working SOAP services in REST because you know, management buzzwords and new shiny.

I quickly found, as the article articulates, as soon as you enter the land of verbs and workflows REST starts to stumble and becomes very network chatty. And when that network chattiness is backed by other network chattiness the grumblings of why the hell you can't just return a deep object graph of data from an endpoint ensue.

Re:REST is the new SOAP by 3pt14159 on Sunday December 17, 2017 @06:43PM (#15948327)
But you can with REST. Most of this conversation is a strawman against REST. Creating or changing resources can impact other resources. It's obvious / logical. Responses can include the things that they impacted along the way. Much of this thread amounts to "I used this shitty REST API once" or similar for RPC.
Re:REST is the new SOAP by 0x445442 on Sunday December 17, 2017 @07:33PM (#15948533)
Well, it depends on how you reckon REST. I can assure you the real world issues I've run into don't have anything to do with the frameworks used. The impedance mismatch between what one would consider a sane API that could just as easily be implemented as a compiled library and the mappings of that API to HTTP verbs and what is considered proper REST were where the problems were.

My question would be, outside of convenience to SPA developers, what do you see as the specific advantages to REST over XML/JSON RPC or SOAP?

Re:REST is the new SOAP by 3pt14159 on Monday December 18, 2017 @06:27AM (#15950911)
I don’t really remember SOAP since that was over a decade ago, but what I like about REST is that it harmonizes the front end and backend structures of the application and it makes things predictable. It also puts up some guardrails against obviously dumb behaviour like deleting records via a GET and with JSON API, makes it possible for things to snap together once you’ve got the structure right. Ember Data + Rails set up to follow JSON API is just unbelievably productive. Pagination, filtering, optionally including other resources, linking (both to the related resource itself and to the relationship itself) it’s really fast, consistent, powerful, flexible, and secure. It’s not always performant, but when performance is important I make one little RCP or nonstandard REST endpoint (say return a link to a big TSV blob) and I move on with life.
Re:REST is the new SOAP by corg890 on Saturday December 16, 2017 @11:21AM (#15940164)
It lacks conventions thoug so every api is more quirky and even sloppier than a bad REST api. At least with REST there’s some existing structure and it’s not completely up to the imagination of someone in a hurry.
Re:REST is the new SOAP by dboreham on Saturday December 16, 2017 @09:07AM (#15939581)
btw SOAP was supposed to be "xmprpc standardized"

I remember well the meeting when things started to go off track...

Re:REST is the new SOAP by goliatone on Saturday December 16, 2017 @10:07AM (#15939835)
Im actually curious now that you mention it but don’t expand on it. Was the road to hell really paved with good intentions?
Re:REST is the new SOAP by dboreham on Saturday December 16, 2017 @09:08PM (#15943553)
I don't remember the history prior to the meeting well enough today to give an authoritative version. So for fear of getting some of it wrong I will say nothing. However, I'll say that the answer to your question is "no".
Re:REST is the new SOAP by jgalt212 on Saturday December 16, 2017 @12:37PM (#15940543)
I agree.

If you control client and server and the server's functionality will for the foreseeable future is limited in scope, xmlrpc is the boss.

We had a django/rest based internal microservice. Was a pain to build and maintain. Switched to xmlprc (it's in Python stdlib), removed tons intermediary code, and wrote only a few bits of new code.

This talk by Jonas Neubert opened my eyes to how xmlrpc can be the glue for Python (which is already glue).

https://www.youtube.com/watch?v=cEyVfiix1Lw

Re:REST is the new SOAP by cptskippy on Saturday December 16, 2017 @10:48AM (#15940018)
> that SOAP pain

The pain you're referring to is relative to the language you used and when you touched it. SOAP is a comprehensive and we'll defined specification and when implemented properly you forget it's there because it just works.

After about 2003 major vendors had their implementations locked down pretty well. In Visual Studio you just implement a basic controller and the remainder is configuration. If you wanted to consume something from Biztalk, PeopleSoft, any Oracle Product, or any other Enterprise product you could just add a service reference to a WSDL URI and a tool would generate your interface classes and DTO classes for you in your language of choice.

In the Open Source world things were very different. Whenever I would provide a service to be consumed by a vendor, I would provide reference implementations in C#, JAVA, Python, and PHP. I would spend about 15mins on C# and JAVA, then the rest of the day fiddling with Python and to a lesser extent PHP.

PHP and Python have had SOAP libraries for a decade but they require considerably more effort to even consume SOAP. I have never tried to stand up a SOAP Service with them but I can't imagine it's any good.

Around 2012 I remember working with a partner company that was using RAILS for their platform. It was an absolute nightmare for them to integrate with our existing SOAP service layer. SOAP protocol libraries were the least of their issues. No client certificate authentication in their HTTP libraries. No serious XML support. They wrote their own implementation from scratch.

Re:REST is the new SOAP by oneplane on Saturday December 16, 2017 @07:09PM (#15943059)
Well, that's actually where the SOAP pain is: it used to be that you couldn't make any good use of it unless you were using walled-garden vendor software. A lot of people dislike Windows, Visual Studio and anything else made by Microsoft. Same goes for Oracle. So then you are left with everything else, which basically means: everything without SOAP, Enterprise editions of runtimes, service buses and the likes.

There are a lot more developers out there not working for an enterprise and not using those tools. Especially the developers doing open source work or doing small scale work.

While nowadays it's fairly easy to make a Java Spring Boot application consume and serve SOAP, with automated WSDL imports and all the WS-* specifics, this wasn't pretty much never the case with anything new and free (as in speech).

Re:REST is the new SOAP by bvrmn on Saturday December 16, 2017 @10:53AM (#15940048)
> I have never tried to stand up a SOAP Service with them but I can't imagine it's any good.

Python has decent SOAP server implementation with one-to-one request/response schema modeling https://github.com/baverman/dropthesoap

Re:REST is the new SOAP by karmajunkie on Monday December 18, 2017 @01:54PM (#15954229)
> when implemented properly you forget it's there because it just works.

I think that's the link missing for most developers. SOAP was intended to allow machine-generated SDKs to remove all of the sharp edges of dealing with it, and in that regard it was largely successful. What brought it down was the advent of non-"enterprise" web development—development happening outside of a .Net or Java IDE that generated code for you. If you ever had to handroll a wrapper for a SOAP endpoint though, god help you. I honestly believe SOAP was the thing that made XML seem uncool by comparison to JSON and REST. JSON still doesn't solve data representation problems as well as XML, we've just learned to accept "good enough" in its stead.

Re:REST is the new SOAP by collinmanderson on Monday December 18, 2017 @11:19PM (#15957723)
> PHP and Python have had SOAP libraries for a decade but they require considerably more effort to even consume SOAP. I have never tried to stand up a SOAP Service with them but I can't imagine it's any good.

I've tried suds and zeep. They both didn't really work in my specific cases. My strategy from now on is to write a bit of code in Visual C#, then analyze the xml traffic, and then generate that same XML using Python/PHP. The SOAP protocol is actually pretty simple once you know how it works.

SOAP has a lot of problems, but it's pretty amazing that you don't need a client side library to use it in Visual C#.

Re:REST is the new SOAP by bvrmn on Saturday December 16, 2017 @08:59AM (#15939552)
> Why is REST so popular?

REST is not popular, there are only a few RESTful public API in the wild. The rest (unavoidable pun, sorry) are simple HTTP APIs with JSON serialization which maps with various degree of coupling to internal data layer.

The main cause you don't need REST limitations to achieve same goals.

OP has strong opinion about why we need to reimplement rpc over http every time for every application and write clients for every popular platform to be able to consume it.

Every time I use REST from any google cloud api, my hair is moving and you definitely will have nightmares if you look into their python client code.

Re:REST is the new SOAP by Cyphase on Saturday December 16, 2017 @05:15PM (#15942488)
> The rest (unavoidable pun, sorry) ...

The remainder.

Re:REST is the new SOAP by BerislavLopac on Saturday December 16, 2017 @05:49PM (#15942695)
Good name for a REST library. ;-)
Re:REST is the new SOAP by karmajunkie on Monday December 18, 2017 @01:58PM (#15954256)
This is the no-true-scotsman fallacy applied to REST. In point of fact, if REST has been around for nearly 17 years and there are so few of these APIs in the wild, then its been incredibly unsuccessful in its aims.

The truth is that these sites are, in fact, RESTful and that REST is just mediocre at what it professes to do. The requirement to treat all operations as resources + HTTP verbs is the primary leaky abstraction that everyone seems to want to gloss over.

Re:REST is the new SOAP by goostavos on Sunday December 17, 2017 @05:33PM (#15948059)
Link to these "actual" RESTful public APIs?

I've been curious to see one (for years). Everyone talks about how this REST service is being done wrong, but few will link to services being done "right".

Re:REST is the new SOAP by thinkpad20 on Saturday December 16, 2017 @10:00AM (#15939797)
The article laid out a detailed explanation of shortcomings of REST. You might not agree with everything in it, but you offer no real rebuttal, instead dismissing it as a “hateful hipsteresque opinion,” without acknowledging any of the actual criticisms the author gave. This strikes me as unfair, haughty and lazy.
Re:REST is the new SOAP by mistermann on Saturday December 16, 2017 @12:12PM (#15940398)
There's quite a "circle the wagons" mentality common in programming nowadays, following politics lead I suppose.
Re:REST is the new SOAP by thehardsphere on Monday December 18, 2017 @06:47AM (#15951000)
Nah, that was in programming well before politics.

They can have the same root cause though: someone's identity feeling threatened.

Re:REST is the new SOAP by tie_ on Saturday December 16, 2017 @06:18PM (#15942841)
> ...having been through that SOAP pain it's being compared to, I'd say there's not even a comparison

OK, that is indeed the most usual response to "Why REST?". The main reason why people like REST is "because SOAP". It's a false dichotomy that the industry has fallen for.

Oh, yeah, and you can run the GETs directly in your browser/cURL. I like that part too, but it only gives you so much.

REST is more of a philosophy, than a standard. Hence everyone does it differently, and you have no chance to use the same library to talk REST with multiple different services (unless you make that library an overcomplicated beast).

XMLRPC? It's a universal standard, that is just a few pages long and everyone can grasp it in their lunch break. Nobody would complain that your API is not "XMLRPC enough". It works (almost) the same way everywhere. You can get the XMLRPC library that's been built in since Python 2.2 and be reasonably sure that you are going to be able to talk to a random modern XMLRPC API. You'd have other such libraries for every major language. Ditto for JSONRPC, if XML sounds too scary (though it doesn't really matter much - it's a mostly transparent implementation detail).

I'd wish people would stop bringing up SOAP as an excuse for REST. Yes, it was worse, but that does not mean that REST is particularly good.

Re:REST is the new SOAP by dsego on Sunday December 17, 2017 @08:28AM (#15945682)
It's an architectural style.
Re:REST is the new SOAP by nickbauman on Saturday December 16, 2017 @11:52AM (#15940294)
REST allows you to make decisions about the http interaction out-of-band, where SOAP provides (and often requires) the ability to describe all decisions about types and parameterization and exception cases in-band.

The REST way allowed one to get started with something small and simple that people could agree to just by talking it over together. With SOAP you had to make all those decisions up front and put it in the specification. I believe SOAP is so complex that it's an analog to CORBA/IDL.

REST is (at least initially) simpler and less specific than SOAP. That's its strength.

Re:REST is the new SOAP by karmajunkie on Monday December 18, 2017 @02:28PM (#15954600)
> I believe SOAP is so complex that it's an analog to CORBA/IDL.

SOAP was intended to facilitate the same programming model but more loosely coupled. So that's not at all far off. And for what it intended to be—a specification for machine-generated bindings and SDKs—it was quite successful. It just didn't make the usability leap over to web development that happens outside an IDE.

Re:REST is the new SOAP by stevekemp on Saturday December 16, 2017 @12:53PM (#15940661)
CORBA? That's a term that gave me a sudden flashback to debugging nightmares in the 90s.
Re:REST is the new SOAP by andrei_says_ on Saturday December 16, 2017 @03:55AM (#15938562)
I think “hipsteresque opinions looking to sound smarter and more insightful than they actually are” is a very good definition for much of Medium’s content.

It may have to do with the platform being used by individuals trying to create a brand of themselves, resulting in a high percentage of sensationalist and controversial posts. Along with the necessity to write on a regular basis.

Re:REST is the new SOAP by speedplane on Saturday December 16, 2017 @04:04AM (#15938591)
Programming Paradigm Becomes Popular B/C it gets stuff done -->

left: it gets stuff done because it's smarter

right: it's bad for you, it's actually getting less done

middle: didn't read all that stuff, busy getting stuff done.

Re:REST is the new SOAP by ern on Saturday December 16, 2017 @05:40AM (#15938904)
didn't read all that stuff, busy getting stuff done.

I agree with this. When I end up on a new project and I'm not the lead, and there is a lead who is pedantic regarding how they want their URLs crafted (or wants to implement a complicated query pattern, or introduce an extra layer of objects to satisfy an abstract notion of purity), I'll just go with the flow. Accidental complexity, pattern seeking and cargo-culting are personality traits of many programmers, and I've come to the conclusion that its best to accept this, and get on with the job of actually delivering value.

Re:REST is the new SOAP by nine_k on Saturday December 16, 2017 @09:17AM (#15939617)
The problem becomes evident when you return to the results so the flow a year later to change something, and wish you were more mindful when getting things done.

Cargo cults are not good. Finding and adhering to regular patters that logically underlie what you do saves time and mental effort, while also preventing certain classes of errors. (No, these are not GoF design patterns.)

Re:REST is the new SOAP by ern on Saturday December 16, 2017 @09:34AM (#15939687)
I’m certainly not advocating spaghetti code, balls of mud, or a thoughtless lack of architecture. What I’m specifically referring to is wilful anti-pragmatism that betrays a sort of insecurity...it’s hard to define but easier to recognize.

Finding the balance between pointless over-engineering and rigidity on one hand, and good software design on the other, consistently, is what seems to distinguish great programmers I’ve worked with, from those who are “just” very good.

But, like I said, it often isn’t worth the trouble fighting about these things, even when we see them, and getting on with the job is more important than ensnaring oneself in religious debates on projects.

Re:REST is the new SOAP by Yokohiii on Saturday December 16, 2017 @06:37AM (#15939067)
Interesting viewpoint. But I am concerned that my mental capabilities can contain every brainfart that a misguided but smart person has.
Re:REST is the new SOAP by seanp2k2 on Saturday December 16, 2017 @02:01PM (#15941179)
You might like http://jsonapi.org which defines a standard that is fairly sane.
Re:REST is the new SOAP by w0utert on Saturday December 16, 2017 @06:34AM (#15939051)
Couldn’t agree more. I guess this is one of these insights that come with experience ;-)
Re:REST is the new SOAP by Yokohiii on Saturday December 16, 2017 @06:35AM (#15939061)
left: optimist right: sceptic middle: opportunist

Having shitty paradigm is certainly better than having none at all. But at some point we have to evolve.

Re:REST is the new SOAP by LaGrange on Saturday December 16, 2017 @08:48AM (#15939502)
me: already groaning at the thought of fixing stuff after that one who didn't "read all that stuff," the "left", and thankfully the right was too busy pontificating to do anything so there's no fixing to be done.

Read. The. Damn. Stuff.

Re:REST is the new SOAP by speedplane on Friday December 22, 2017 @03:32AM (#15986057)
Much easier to fix other people's code if they never got the chance to write it in the first place.
Re:REST is the new SOAP by coldtea on Saturday December 16, 2017 @10:33AM (#15939945)
>Why is REST so popular? Because it's easy to implement and works for lots of use cases.

Could have given the exact same non-argument for SOAP -- which in its time dominated corporate services.

Whether it's "easy to implement and works for lots of use cases", it's a moot point if there would be something even easier to implement and worked even better for real use cases.

Why stop at "easy" when you can have easier AND more coherent?

Besides, REST is anything like easy. Case in point, almost nobody ever correctly implemented the original REST spec -- that's why everybody calls their implementations "REST-ful", they are some loosely inspired deviations that cargo cult a lot of useless junk.

Supposedly the "real illuminated REST" (like real communism) doesn't even concern HTTP, it's a philosophy beyond web services. And yet's it's all the web related garbage part of the introductory examples that everybody follows (or tries to).

Re:REST is the new SOAP by parasubvert on Saturday December 16, 2017 @01:00PM (#15940721)
“Real illuminated REST”? The REST spec?

It’s an architectural style defined by Roy Fielding’s thesis (who also was the editor of HTTP/1.1 RFC). It attempted to describe the Web’s architecture in neutral terms and how it was derived by combining previous styles.

Some people took this and crafted a quasi religion out of it, but that’s partly because vendors in 2002 were all lined up trying to replace the web with a CORBA equivalent and then almost succeeded with SOAP/WS-*. People got strident to fight the dollars that were lined up. It’s easy to forget there was no powerful web/internet community with social media and blogging platforms in those days, it was all mailing lists and a couple of conferences vs. Marketing budgets, sales teams, and agenda-wielding engineers on standards bodies from Microsoft, IBM, BEA, Sun, HP, etc.

All RESTful means is that something is attempting to conform to the style. There never was a spec.

Re:REST is the new SOAP by jack9 on Saturday December 16, 2017 @06:18PM (#15942843)
Re:REST is the new SOAP by coldtea on Saturday December 16, 2017 @02:09PM (#15941234)
>It’s an architectural style defined by Roy Fielding’s thesis (who also was the editor of HTTP/1.1 RFC). It attempted to describe the Web’s architecture in neutral terms and how it was derived by combining previous styles.

It's application for what are essentially RPC needs is which I consider cargo cult.

Re:REST is the new SOAP by jimnotgym on Saturday December 16, 2017 @10:43AM (#15939990)
> What is it with Medium.com

The people you describe used to have blogs with crappy Wordpress themes that barely got noticed by Google, now they are on a big site so get discovered I guess?

Re:REST is the new SOAP by sergiotapia on Saturday December 16, 2017 @10:11AM (#15939851)
It's full of click-bait because of the opportunity for articles to go viral. Spread is built into the platform, so you have people writing the most click-bait articles possible.
Re:REST is the new SOAP by nakovet on Sunday December 17, 2017 @02:52PM (#15947302)
I don't get why the main thread is an attack to the blogging platform instead of a discussion on the topic.

IMHO REST is not easy to implement, it's easy to say "oh... okay I think I've got it... let me try" but it's very hard to implement RESTful APIs and the author mention a few valid pain points.

Simple use cases like: a user forgot their password, what the proper way of handling this case? A PATCH for a User based on ID? If the ID is a integer ID then you have to query user by email or username before you are able to request a new password, if the PATCH handles this case what other cases does it handle? Can a user request a new password and change their age at the same time, is this a valid case? How you structure your controller to route to these special cases, do you create a custom endpoint thus making your API less restful?

One thing I like about GraphQL is this idea of mutations, in many cases they are analogous to RPC calls, `userForgotPassword(usernameOrEmail) -> forgotPasswordResult`.

Re:REST is the new SOAP by mariocesar on Saturday December 16, 2017 @07:42AM (#15939288)
Because there is no "booo" button. Every post in medium just have Likes or none, you can like or comment just that, making a critical comment is to much for most of the users that just want to say "I disagree"

If medium has some kind of down vote, it will regulate itself a lot more, and users that disagree will not have to go to make a comment and expose themselves being critical.

Right now is full of "Content Hackers" trying to make reputation.

Re:REST is the new SOAP by mannykannot on Saturday December 16, 2017 @08:18AM (#15939408)
So long as an article makes a reasonable attempt to present a viewpoint, downvoting does not add anything to the issue. If you disagree, upvote those replies that you agree with (unfortunately, Medium makes that more complicated than is should be.) If no-one can be bothered to say what's wrong with the article, maybe there isn't much wrong with it.

For example, xmlrpc has been recommended in comments as alternatives to consider. Maybe what's wrong with Medium is that the informative replies are on HN... (to be fair, grpc is mentioned on Medium.)

Re:REST is the new SOAP by prepend on Saturday December 16, 2017 @08:56AM (#15939536)
Hate gets more clicks than producing.

Twist on “easier to destroy than create.”

Re:REST is the new SOAP by carc on Monday December 18, 2017 @01:28PM (#15953923)
> Why is REST so popular?

You think this guy is a hateful hipster, but most of what he says probably resonates with most software vets. To me, it's mostly against the REST zealots who demand REST is done in a very particular manner. I've seen companies with a very stable, robust RPC framework that had a small faction of REST zealots who were extremely against it because it didn't do things according to REST. It didn't matter to them how stable it was or how well it worked.

Also, REST is relatively not popular - what percentage of the world's APIs use REST do you think?

TBH, you're the one coming off like the hateful hipster to me.

Re:REST is the new SOAP by chiefalchemist on Sunday December 17, 2017 @08:59AM (#15945770)
> "Everyone seems to want to find a reason to dislike product/technology/feature X..."

Furthermore, and it's been this way for as long as I can remember, too many want a tool to be the perfect fit for every problem.

That is, they pick up a screwdriver and then are shocked that it's not good for driving nails.

There is no OSFA technology.

Re:REST is the new SOAP by chisleu on Sunday December 17, 2017 @12:51AM (#15944404)
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 by felipelemos on Saturday December 16, 2017 @04:33AM (#15938671)
And REST is easier to debug. This make a huge difference when you have a big and complex system.
Re:REST is the new SOAP by barrkel on Saturday December 16, 2017 @06:28AM (#15939039)
GET / POST RPC is just as easy to debug, IMO, and with less righteous orthodoxy.
Re:REST is the new SOAP by mseebach on Saturday December 16, 2017 @07:58AM (#15939345)
The orthodoxy (aka "standard") is there for a reason. It's very easy to shoot yourself in the foot.

If you're only doing small-scale internal interop, especially where you control both ends of all connections, you don't need standards, just do whatever works, but if you have scale dreams, thinking about the rules (What is 'state'? How is it represented? Where?) and why they are there will save you from a lot of headache going forward.

Re:REST is the new SOAP by barrkel on Saturday December 16, 2017 @10:02AM (#15939808)
You need a standard within the ecosystem you play in, if only to reduce the amount of work integrating bits and pieces.

For example, I work on an application that has reasonably tight integration between pagination on the front end and parameters / headers on the back end. Works quite well, particularly since we can control both ends. It's not completely ad-hoc - we chose one specific idiom for pagination that had reasonable support, but not necessarily the most widespread - and then extended it slightly when we needed a few operations that had no direct support (e.g. multi-delete, multi-update).

But if you're integrating from everywhere, there's no upside on a unifying standard because any unifying standard will either have so many wrinkles, complexities and caveats to cover every special use case that nobody will implement it correctly or understand it correctly; or it will be ill-suited to many domains, forcing a poor mental model, increasing the probability of bugs and reducing extensibility.

Re:REST is the new SOAP by ams6110 on Saturday December 16, 2017 @10:17AM (#15939875)
Some http clients can only do GET and POST. If your API demands PUT, PATCH, or DELETE it may be less useful.
Re:REST is the new SOAP by lfischer on Saturday December 16, 2017 @05:30AM (#15938869)
How exactly do you think REST is easier to debug and what alternatives are you comparing it to?
Re:REST is the new SOAP by ivan_gammel on Saturday December 16, 2017 @05:52AM (#15938939)
Crafting REST request with JSON payload is significantly easier than doing that with SOAP (or, rest it in peace, CORBA).
Re:REST is the new SOAP by ern on Saturday December 16, 2017 @06:11AM (#15938985)
I don't mind a loose JSON REST-ish API, where everything is a GET, POST or (maybe) a PUT, with explicit endpoints to resolve ambiguities.

Once people start exhibiting excruciating pedantry in designing their APIs, I'll switch off somewhat.

Re:REST is the new SOAP by deeringc on Saturday December 16, 2017 @07:23AM (#15939239)
The author was comparing REST to json-rpc. Nowhere in the article does he propose that people use SOA or CORBA.
Re:REST is the new SOAP by ivan_gammel on Sunday December 17, 2017 @03:39AM (#15944845)
There's no difference between debugging REST and JSON-RPC over HTTP, so there's no point to compare them. The other alternatives, that I've mentioned, are less easy to debug.
Re:REST is the new SOAP by mamon on Sunday December 17, 2017 @11:29AM (#15946351)
Have you ever seen SoapUI tool[1] ?

It takes just a few clicks to generate complete set of requests from WSDL (set, as in "one request per each operation"). I think it's much better user experience than hand-crafting json to use with curl.

[1] https://www.soapui.org/

Re:REST is the new SOAP by 0x445442 on Saturday December 16, 2017 @10:31AM (#15939925)
That is highly dependent on the language you are using.

Many languages support auto generation of consumer and producer code based off of WSDLs.

And AFAIK, most languages that don't have the auto gen tools do have XPATH libraries for easily manipulating templated SOAP requests.

Re:REST is the new SOAP by ivan_gammel on Sunday December 17, 2017 @03:36AM (#15944835)
It's still much faster to run curl with JSON, than to run auto-gen tool and write a whole test program to call an API.
Re:REST is the new SOAP by gozur88 on Sunday December 17, 2017 @05:34PM (#15948063)
The nice thing about SOAP was it had a full-fledged type system built in. REST is certainly easier to debug, but it's also more likely you'll be required to debug it, since many of the problems you'll run into in a REST interface would have been caught at compile time with SOAP.

SOAP's big problem, IMO, was the crazy insistence on URI formatted namespaces, which took a simple XML message and turned it into something bloated and confusing.

Re:REST is the new SOAP by harryf on Saturday December 16, 2017 @05:12AM (#15938796)
And caching is easy to implement independently of the API using a proxy
Re:REST is the new SOAP by dajt on Monday December 18, 2017 @10:36PM (#15957528)
I don't follow links to medium.com for that reason. I'm getting old and grumpy and medium.com posts seemed authored specifically to irritate me.

I'm not part of the new world so I guess I don't feel at home there.

Re:REST is the new SOAP by qaq on Saturday December 16, 2017 @04:49AM (#15938726)
Because they drive traffic ?
Re:REST is the new SOAP by Dowwie on Saturday December 16, 2017 @06:38AM (#15939070)
You're probably spending too much time reading tech blogs.