Skip to main content

Giving it a REST


I don’t remember deciding that I was a fan of REST APIs, but I found myself in that position for a lot of years. I was really only getting to the point as a developer that I was even thinking about APIs around the time when REST was already on the scene, and especially was getting more popular among the Python community and among the Web developer communities, the two places I drew most of my social influence from in the are of programming.

SOAP was not a disaster that I had really much experience in, save for a couple very brief encounters. One of my first small programming contracts was actually wrapping a SOAP service into a RESTful endpoint. The main business model of my client was reselling another service because developers would prefer to use this improved API that much more that the small premium would be worth it. I was young and impressionable and looking back, I don’t know if the SOAP API I had to work with directly for this job was actually as bad as it was made out to be or if it was me picking up the tone of the job. And, I think, interacting with SOAP services probably is different in different languages, and maybe doing it in Python from scratch and entirely by hand was definitely more painful than some more strict languages with heavier SOAP tooling in their ecosystems.

So these ideas I’ve held for so long about how great REST is and how awful SOAP was are not ideas I can really trace back to experience or education. They’re things that I largely picked up socially. SOAP was always the poster child for the wider idea of RPC (Remote Procedure Call) APIs, but the negative tone was definitely equally applied to any similar system (which was almost always XML based, of course).

A tale I’ve heard about an experiment involving social pressure and monkeys goes like this. The scientists had a cage with a bunch of monkeys and they had a ladder in the center that let them to some treat up at the top. Immediately the monkeys tried to get there, but when they would try someone would spray them with a hose and get them off the ladder and repeat this until none of the monkeys would even try. When all of the monkeys had learned this lesson, they removed one monkey and replaced him with a new monkey, who didn’t know about the ladder and tried to get the treat. The hose was used again, and all the monkeys were punished. The monkeys were replaced like this, one by one, until they learned to self police and stop any new monkey from trying to climb the ladder. The hose wasn’t even needed. Eventually, none of the monkeys in the cage had ever even seen the hose, but they all knew what to do when someone climbed the ladder.

Some times I feel like we’re all the monkeys and RPC is that treat at the top of the ladder. And maybe, in this scenario, SOAP is the actually ladder? The point is, I feel like we all avoid this thing we don’t really understand and we do so based on the experience of others we’ve gleaned from, about something we don’t actually understand beyond the surface fear of.

At this point I feel like I don’t know what I missed or left behind, and I’m not just abandoning REST (nor could I, as it is inescapable in the current landscape) but I want to recognize that learning more about alternatives is something I’d like to do. I know SOAP enough to know I don’t want to get to know it better, but I also feel like tooling is a missing piece here. I want to understand, with the right tooling in place, how much less might I care about the protocol being used and what else might I value in that protocol?

Comments

Popular posts from this blog

Respect and Code Reviews

Code Reviews in a development team only function best, or possible at all, when everyone approaches them with respect. That’s something I’ve usually taken for granted because I’ve had the opportunity to work with amazing developers who shine not just in their technical skills but in their interpersonal skills on a team. That isn’t always the case, so I’m going to put into words something that often exists just in assumptions.
You have to respect your code. This is first only because the nature and intent of code reviews are to safeguard the quality of your code, so even having code reviews demonstrates a baseline of respect for that code. But, maybe not everyone on the team has the same level of respect or entered a team with existing review traditions that they aren’t acquainted with.
There can be culture shock when you enter a team that’s really heavy on code reviews, but also if you enter a team or interact with a colleague who doesn’t share that level of respect for the process or…

CARDIAC: The Cardboard Computer

I am just so excited about this.


CARDIAC. The Cardboard Computer. How cool is that? This piece of history is amazing and better than that: it is extremely accessible. This fantastic design was built in 1969 by David Hagelbarger at Bell Labs to explain what computers were to those who would otherwise have no exposure to them. Miraculously, the CARDIAC (CARDboard Interactive Aid to Computation) was able to actually function as a slow and rudimentary computer. 
One of the most fascinating aspects of this gem is that at the time of its publication the scope it was able to demonstrate was actually useful in explaining what a computer was. Could you imagine trying to explain computers today with anything close to the CARDIAC?

It had 100 memory locations and only ten instructions. The memory held signed 3-digit numbers (-999 through 999) and instructions could be encoded such that the first digit was the instruction and the second two digits were the address of memory to operate on. The only re…

How To Care If BSD, MIT, or GPL Licenses Are Used

The two recent posts about some individuals' choice of GPL versus others' preference for BSD and MIT style licensing has caused a lot of debate and response. I've seen everything as an interesting combination of very important topics being taken far too seriously and far too personally. All involved need to take a few steps back.

For the uninitiated and as a clarifier for the initiated, we're dealing with (basically) three categories of licensing when someone releases software (and/or its code):
Closed Source. Easiest to explain, because you just get nothing.GPL. If you get the software, you get the source code, you get to change it, and anything you combine it with must be under the same terms.MIT and BSD. If you get the software, you might get the source code, you get to change it, and you have no obligations about anything else you combine it with.The situation gets stickier when we look at those combinations and the transitions between them.

Use GPL code with Closed S…