Several people have forwarded me pointers to Google's move from a SOAP-based access mechanism for search to an AJAX-based one.
The
O'Reilly coverage starts to detail what's going on, but I think there's more here than meets the eye.
I expected to see some JSON formats specified that would let me issue searches from my runtime/platform/language of choice. More or less like
their JSON over GDATA API.
Unfortunately, what I found was some HTML/Javascript example. Here's the salient code frag:
var searchControl = new GSearchControl();
// Add in a full set of searchers
var localSearch = new GlocalSearch();
searchControl.addSearcher(localSearch);
searchControl.addSearcher(new GwebSearch());
searchControl.addSearcher(new GvideoSearch());
searchControl.addSearcher(new GblogSearch());
searchControl.addSearcher(new GnewsSearch());
// Set the Local Search center point
localSearch.setCenterPoint("New York, NY");
// tell the searcher to draw itself and tell it where to attach
searchControl.draw(document.getElementById("searchcontrol"));
// execute an inital search
searchControl.execute("VW GTI");
I have no idea how to make this work in my little ASP.NET/C# based app, let alone my Ruby on Rails one.
At first I thought that perhaps Google was providing a set of convenience wrappers on top of a format/protocol-based solution. Alas, when you dereference the required script tag from that example (
In short, no discernable format that you can cons up and/or parse from arbitrary libraries or runtimes.
In my mind, this is a significant step backwards.
It's one thing to say move from SOAP to POX or even XML to JSON - the former move trades off extensibility in the spirit of YAGNI, and the latter move trades off SGML synergy for a better impedance match to most people's programming languages.
It's another thing entirely to require someone to use a specific language, runtime, and even local API to get at your service.
No matter how you define "web service," I don't think this newest offering qualifies.
I'm hoping this is just an anomaly and not a trend, lest we all fall back into the world of opaque/closed protocols.
Been there, done that.
Posted
Dec 20 2006, 01:44 PM
by
don-box