[Developers] how to use freebase suggest?
Raymond Yee
raymond.yee at gmail.com
Sun Jun 21 00:44:18 UTC 2009
Hi everyone,
I'd like to incorporate "Freebase suggest" functionality into apps I'm
writing, both in Acre and outside of Acre. I'm a bit confused on the
best way to go about doing so. In looking for code that I can reuse, I
came across various implementations of this type of functionality --
some with published code:
1) http://code.google.com/p/freebase-suggest/ , which is described as a
"jQuery plugin for autocompleting on topics from Freebase.com"
According to http://code.google.com/p/freebase-suggest/source/list --
the last update was r112 on Jan 20, 2009
(http://code.google.com/p/freebase-suggest/source/detail?r=112). This
library was referenced in the freebase blog post a bout Tippify
(http://blog.freebase.com/2009/06/17/tippify-share-recommendations-the-freebase-way/).
The demo page is at
http://mqlx.com/freebase-suggest/examples/suggest_demo2.html and some
documentation on how to use it is at
http://code.google.com/p/freebase-suggest/wiki/Usage
2) http://suggest.freebaseapps.com/ -- The release notes
(http://acre.freebase.com/#app=/user/daepark/suggest&file=release_notes)
states
Freebase Suggest v2.0....
This release is a complete rewrite of the original Freebase suggest
jQuery plugin which began even before jQuery 1.0 was available. It is
not backwards compatible with the previous versions as many of the
default settings and options have changed. In fact, this release
requires the newest jQuery version 1.3.1 or greater. The suggest plugin
is also accompanied by default css. However, you may choose to supply
your own or change the default css class names through the css options
provided below.
http://suggest.freebaseapps.com/ links to two files for downloading:
http://suggest.freebaseapps.com/jquery_suggest_js and
http://suggest.freebaseapps.com/jquery_suggest_css
3) I figure that because of the "Query Assist" function in
http://cuecard.freebaseapps.com/ ,there had to be some freebase
suggest-type code -- maybe packaged in a form others can easily
reuse....However, I've not been able to figure out where exactly that
logic
is....(http://acre.freebase.com/#app=/user/dfhuynh/cuecard&file=index
makes reference to
http://labs.freebase.com/projects/cuecard/1.2/api/cuecard-api.js and
http://labs.freebase.com/projects/cuecard/1.2/index.js)
Does Cuecard use the same code as suggest.freebaseapps.com ?
4) Tippify
It seems that the key code fragment is line 72 of
http://acre.freebase.com/#app=/user/namesbc/tippify&file=index_template:
<acre:script>
var js_files = [
"jquery_suggest_js",
"jquery_form_js",
"jquery_autogrow_js",
"jquery_charcounter_js",
"/core_js",
"/recommend_js",
"/index_js"
];
</acre:script>
which ultimately causes
http://ajaxapis.fbclient.user.dev.freebaseapps.com/js/jquery/-/ui_core_js/-/jquery_blockui_js/-/jquery_suggest_js/-/jquery_jeditable_js/-/jquery_form_js/-/jquery_autogrow_js/-/jquery_charcounter_js/-/user/namesbc/tippify/core_js/-/user/namesbc/tippify/recommend_js/-/user/namesbc/tippify/home_js
to be loaded.
My questions:
1) Has http://suggest.freebaseapps.com/ superseded
http://code.google.com/p/freebase-suggest/ ?
2) Can someone tell me the best practice for loading the libraries in
http://suggest.freebaseapps.com/ -- I can certainly copy the files over
and maintain my own copy but was hoping that there would be a
centralized place for me to load them -- are those central files
http://suggest.freebaseapps.com/jquery_suggest_js and
http://suggest.freebaseapps.com/jquery_suggest_css ? Do I follow how
Tippify makes use of jquery_suggest_js?
Thanks,
-Raymond
More information about the Developers
mailing list