4 messages in com.googlegroups.google-ajax-search-apiRe: Just give me the data| From | Sent On | Attachments |
|---|---|---|
| John Tantalo | 28 May 2008 15:57 | |
| jgeerdes [AJAX APIs "Guru"] | 28 May 2008 18:41 | |
| John Tantalo | 29 May 2008 11:00 | |
| jgeerdes [AJAX APIs "Guru"] | 29 May 2008 11:51 |
| Subject: | Re: Just give me the data![]() |
|---|---|
| From: | John Tantalo (john...@gmail.com) |
| Date: | 05/29/2008 11:00:01 AM |
| List: | com.googlegroups.google-ajax-search-api |
Jeremy,
Thanks for your quick response. You're right that I didn't dig into the documentation, but I see now how the GSearch interface works, and it is exactly what I needed. Thanks for pointing me in the right direction.
One thing I noticed, though, is that the callback specified by the setSearchCompleteCallback method is not called according to the specification in the documentation. Instead of receiving the search object as an argument, in my experiments, it was passed a single null argument. I am able to work around this by keeping a reference to the original search object.
Also, on the topic of callbacks, although I appreciate the effort of this specification to solve the "scope" problem, the method chosen here is not an ideal solution. Any developer who writes object- oriented Javascript necessarily has an existing solution to this problem that works for them and their team. I don't think its fair to suggest developers do the same thing in two different ways just because your method signature makes it a little easier.
If you would like to supply an interface to help the casual and professional programmer simultaneously, I recommend changing the method signatures from (object, method) to (method, object). That way, I can still pass in my scope-bound methods that I use everywhere else in my code, and I don't need to pollute the call with an unused parameter.
On May 28, 6:41 pm, "jgeerdes [AJAX APIs \"Guru\"]" <jgee...@mchsi.com> wrote:
If you read the documentation, you'll find that you do not have to use the individual searcher objects within the context of a Google-defined search control. They can very easily be used separately so that you can have complete control over what data displays, layout, etc.
That said, if you really wanted, there is absolutely no reason why you couldn't draft your own version of the API that would utilize the RESTful interface. In all likelihood, though, you'd end up right back at what Google has created in the Javascript portion of the API, or at least something very similar to it; kind of like reinventing the wheel.
As for the reasoning behind the two different methods for accessing the API (direct/uds and loader/jsapi), although I can't speak for Google or the dev team, I think it's probably best to think of the two as different versions of the same thing. The uds method is the older version, which has been succeeded by the jsapi/API Loader version. Although they keep the uds version up to date with the jsapi version, the bottom line is that the jsapi offers a much more streamlined approach to utilizing the API for most average developers. Uds, then, is the legacy version, then.
Jeremy R. Geerdes Effective website design & development Des Moines, IA
For more information or a project quote:http://jgeerdes.home.mchsi.com jgee...@mchsi.com
If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX API" group.
To post to this group, send email to Goog...@googlegroups.com
To unsubscribe from this group, send email to
Goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---




