I previously posted about Google AJAX Search API’s easy of use. It does come at a cost though. The cost is that it is difficult to use the API server side. This is because it is designed to work with javascript from a specific url (including port and directory). This cripples the API for stand alone application and server side developers. I am not omnipresent (yet), but I am sure this was Google’s intent. This way they can make it unpleasant to data mine Google programatically.
On the flip side, making it Javascript lowers the barrier to entry. In order to use the API, a web developer only needs to know one language. I think that was a driving force for introducing the API, but that doesn’t explain Google’s decision to deprecate their soap API.
In some applications it pays to serialize state to the database. What if you want remember what locations users searched for? What if you want to do analysis on users searchs to better focus your site? All of this requires you to do a “Google Ajax” search and then make an “Ajax” call to your site to store any data you need. Tedious, but not a terrible.
What is really terrible is the fact that they call it an “AJAX” search. I think we can all agree that Ajax isn’t an acronym. According to Anne Zelenka, in her 6 myths on Ajax article:
> AJAX is an acronym. It stands for “Asynchronous JavaScript and XML.” Capitalize all the letters or you’ll look like a dork
I really think that google should have known better on this one. As Anne suggests, it might be dorky to be in “the know” on this but, it is inexcusable for Google (Valhalla to us geeks) to miss this one. First off they don’t use XML. And more importantly they use Javascript On Demand instead of XmlHttpRequest to get around cross site scripting issues.
The fact that there are numerous people concerned about the security of this API, is probably a good reason not to draw attention to the fact that it uses “On Demand” techniques. Under the current browser security model, I believe this is the only way you could write a javascript ONLY api that works cross domain. Personally, I am not that concerned about the security aspect of the API, but I think it is a mistake to use the improper AJAX, as opposed the more widely accepted Ajax.
All that being said I still love how easy it integrates with google maps. I guess if you need to do something server side you could always fail-over to Yahoo’s Restful API. I still believe it is a great time to be a web developer with so many companies playing nice with their data, allowing you to make special applications useful at low cost.
[...] I’m sure most readers have gathered the fact that I am a developer. Not a great writer, or a great thinker, or a futureist. But, I think it is obvious that Javascript Apis will give access to more and more data. I was critical of some of Google’s decisions in their AJAX Search API, but despite my nit pickery they are exposing their entire database and it couldn’t be easier to use. Obviously, they couldn’t send you their entire database, instead they send you a small amount of js to get you started. Then when you ask for more, they happily send what you ask for. [...]
[...] I am not a developer who is easily worried. But when you have a company who is consistently lowering the barriers to entry into the world of web development, maybe I should. I am of course talking about the juggernaut that is named google. Despite their obvious, to me, naming debacle, they have once again knocked an API out of the park. [...]
[...] I have created two SimpltryBlogPost instances. In the first instance, I took all the default options. In the second instance, I overrode the style option, because when I was posting about Google Ajax Search, I was editorializing. Both posts were about javascript, so the subjectMatter option wasn’t overridden. [...]
[...] That is why it was semi surprising when Google quietly announced their new server-side AJAX API would be JSON only. At first it made very little sense to me, but after some thought, it makes reasonable sense. I declared that 2007 was going to be the year of JavaScript Only APIs (I am a tech blogger not a futurist), because Google released their AJAX Search API as JavaScript only. But now I see it is much more about supporting only one output format, JSON. Whether it is consumed by you, me, Google or Google AJAX JS API. They realize their data is valuable enough, if you want it, you will write: [...]