Who nowadays will develop its own map service instead of using google maps or bing maps, or neglect to setup an API to increase the source of traffic and bizness opportunities ? (If your web team never talk to you about it, be very afraid).
In order to standardize this phenomenon, the W3C released in 2003 a technology called SOAP (Simple Object Access Protocol). Beside an implementation in all the programming language i know, developers didn't adopt this technology at all. A lot of critics have been said, myself have a lot to say (Why a WSDL is 100 line long and only the last 10 are really useful ? Why they forgot an easy error messaging system ?). But there are way more controversial technologies that have been well received by the developers. No, the real murderer is the foundation of internet itself: HTTP.
In my opinion HTTP (in a broader sense the REST approach) was/is preferable for the following reasons:
- Natural
- Easy to consume and implement
- Architecture-wize as beautiful as L'Albatros of Baudelaire.
Natural
What is more natural on internet then accessing an URL to get data ? Certainly not an object that the constructor take as an arguments the URL of a WSDL/XML file and then calls method.
Easy to consume and implement
As said previously where SOAP based service are not easy to use, implementing one is event a more tedious task, and debugging it the best way to get ride of people; HTTP REST approach is easy to use by anybody that know what a browser is, it's event easier to implement than a html web application and you have a proven error messaging (when you see 404 or 501, you know what the problem is).
Architecture-wize as beautiful as L'Albatros of Baudelaire
I refer to this poem because is by far the most elaborated french poem i ever rod (and wrote an essay about it). Basically there is more in this poem than a form and a meaning; This poem have a form and severals meanings. Let's make the analogy, each sentence is a URL, each word is parameter. As genius it is to use increasing tempo when the poet refer to the bird in order to emphasis the wind element and so evoke his freedom and higher mind, Isn't as poetic to call :
- http://example.com/item/123456.html to retrieve the PC HTML description page of an article
- http://example.com/m/item/123456.html to retrieve the mobile HTML page
- http://example.com/item/123456.json to retrieve the json version
- http://example.com/item/123456.xml to retrieve the xml version
- http://example.com/item/123456.jpg the product image
- http://example.com/order/123456.xml to put the item in the cart and retrieve the result in XML format
When you look at the the previous examples, you will realize that what have been written is similar to:
"SELECT * FROM item WHERE id=123456 and format='xml'". This why i do believe that HTTP have became a query language. Beside the claim and eventually the philosophical value of this statement, questions are raised:
- Did we reached the limits of HTTP ? Would the protocol support the next moves?
- What if the web was already semantic and the future of RDF, SPARQL etc.. are the same as SOAP ?
I honestly have no idea.
2 comments:
of course http handles queries, from the first place.
cf, google and other search engines:
Look at this "url":
http://www.google.com/search?q=query
But we dont need to transfer hypertext to get a result, right.
I dont want answer to always be coded in html for godsake:)
no but you can return various files in can of read queries (the queries that return a set of data). But for the write queries (the queries that push data) a 204 answer in case of success and a 4xx in case of error is way enough. So in my opinion we could merge NoSql solution like cassandra, bigTable or hadoop to a webserver we could have a really badass, fast, scalable, hight availability solution. Maybe the future of database is here.
Post a Comment