8 messages in com.freebase.developersRe: [Developers] Using the Freebase.c...
FromSent OnAttachments
Will MoffatMar 26, 2008 10:06 am 
Alec FlettMar 26, 2008 10:35 am 
brendanMar 26, 2008 10:36 am 
Will MoffatMar 26, 2008 4:13 pm 
John GiannandreaMar 26, 2008 4:25 pm 
Will MoffatMar 26, 2008 4:45 pm 
John GiannandreaMar 26, 2008 7:04 pm 
brendanMar 27, 2008 10:16 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [Developers] Using the Freebase.com client as an IFRAME your own web appActions...
From:brendan (bren@metaweb.com)
Date:Mar 26, 2008 10:36:11 am
List:com.freebase.developers

agreed, except this part:

Since the mwLastWriteTime cookie isn't set, re-running the MQL query won't give the latest data.

- user brings up the modal dialog for a topic and edits something - freebase.com last write cookie set (though they will be asked to login, inline, if not already logged in) - user closes the dialog and refreshes the mjt/js app browser window - ajaxy mqlread is issued, freebase.com last write cookie is used and observed, cache is invalidated

right? archiportal doesn't proxy anything, if the user is signed in, the browser freebase.com cookies are used and subsequent mqlreads use the same cookies.

that said, Zak and I tried having the archiportal screen refresh automatically whenever a user returns from using the modal iframe. It sucked because, as you've pointed out, even if the user doesn't do a write, now you have to wait around for all the freebase and google api calls to be made which takes several seconds.

I'd like to see a solution for this too because I think this kind of pattern is pretty sound, dare I say "lazy in a good way?". Writes are more difficult to implement and aren't done that often by the user, so it allows someone to build a mashup spending their time coding the part that is used the most. Also, on the read/write side, as the architecture schema is extended, the freebase.com client automatically keeps up.

Brendan

On Mar 26, 2008, at 10:07 AM, Will Moffat wrote:

Hello,

I've seen a few Javascript developers (including myself) go through this process:

* write a cool Javascript Freebase app (like Zak's
http://dev.mqlx.com/~zak/arch/) * decide to give users the ability to edit data * decide you can't be bothered to re-implement the features of the Freebase.com client (and learn mqlwrite + setup an api proxy) * Take the path of least resistance and use a modal dialog IFRAME to display the topic in Freebase

This Freebase-in-IFRAME approach has two problems:

* How do we know if the user changed data? (We want to avoid rebuilding the state of a complex AJAX app if possible) The mwLastWriteTime cookie may have been updated, but it's inaccessible since the app isn't on freebase.com

* How do we get this changed data? Since the mwLastWriteTime cookie isn't set, re-running the MQL query won't give the latest data. You need to resort to cache-busting techniques like incrementing limit'

Any ideas about how to solve these problems? cheers, --Will