You are currently browsing the monthly archive for April, 2007.

Just in case anyone out there reads this stuff and wonders where I’ve gone, I’ve been stolen. That is to say that due to shifting project priorities, my services have been required elsewhere for a short while.

Whilst in this other realm I have been exploring the world of web services, and have come to some definite conclusions. Thees are 1.) Web services are very exciting and open all sorts of posibilities for inclusion of content from 3rd parties, etc. and 2.) I much prefer REST to SOAP.

That is not to say that SOAP is not a solid usable system. It’s just it kind of goes against my mind set. I like things to be open, readable, accessible and simple, and although SOAP is an open protocol in that it is not owned by anyone, it just tends to wrap everything up in it’s own package, whereas as REST is more fundamental (by that I mean basic and in some senses raw) and open.

Web services are just ways of exposing bits of your data to the rest of the internet in a way that is understandable by all. They are used extensibly by Amazon, Google, Yahoo, Flickr and a host of other web big hitters. They are good for propagating the information you want diseminated beyond your own web site. In Amazons case, if you sign up with them and use their Web Service ( a REST based service I might add), then you can put adds to your favourite books on your web site using data fetched from Amazon (so you get the latest prices), link them to the web service and, when a visitor clicks them you will get a small percentage of the sale price. Amazon on the other hand gets adverts for its books out to thousands or more likely millions of web sites for no effort on it’s part.

So to compare REST and SOAP. SOAP puts it’s data in a box, it writes lots of labels on the box about what is in it, and how to use it, it even puts and advert at the Post Office counter about where to pick up the boxes and which box will contain what information. Great but, you still have to go through SOAPs mechanisms of working to get at and use the data.

REST just puts the data in a bag. If you want to know anything about the data, just open the bag and tip it out, rummage through it, keep bits, throw bits, change bits. It’s your data do what you like. Ok, if there is a problem then you’ll be responsible for fixing it, but hey, you wouldn’t just trust a third party to error check your live data would you? So you would put in error checking with SOAP anyway.

I know that lot’s of folk who are way smarter than me will shoot this argument down, but I suppose it’s just a personal thing. I like XML and the XML family and REST is just XML exposed to all, so it sits well with me, I’m just a RESTful kind of guy.