[cosmo-dev] Putting the A back in Ajax
Travis Vachon
travis at osafoundation.org
Wed Nov 14 10:42:49 PST 2007
To clarify because there has been some confusion:
I don't think this is insanely high priority. The app is likely to
feel snappier once we get this in place, but a 0.11 target was what I
was originally thinking.
I've filed bug 11373 for this (https://bugzilla.osafoundation.org/show_bug.cgi?id=11373
). Since I've heard some enthusiasm for getting this in sooner rather
than later I'll start doing some pre-code legwork today and get a SWAG
on there asap.
-Travis
On Nov 14, 2007, at 9:42 AM, Travis Vachon wrote:
> Hi folks
>
> The recent problem on hub highlighted a flaw in our client code,
> namely our use of synchronous XHR calls. A grep for the parameter
> that makes this happen looks like:
>
> ~/Development/osaf/cosmo/git/cosmo/src/main/webapp/js/cosmo% grep -r
> -e "sync: \?true" *
> app/pim.js: var collection =
> this.serv.getCollection(params.collectionUrl, {sync:true}).results[0];
> app/pim.js: var userCollections =
> this.serv.getCollections({sync: true}).results[0];
> app/pim.js: var subscriptions =
> this.serv.getSubscriptions({sync:true}).results[0];
> service/conduits/
> common
> .js:
> {sync: true}).results[0];
> service/conduits/
> common
> .js:
> {sync: true, noAuth: true}).results[0];
> ui/imagegrid.js: sync: true,
> view/cal/common.js: { start: start, end:
> end }, { sync: true });
> view/list/canvas.js: { sync: true })];
> view/list/canvas.js: { sync: true }));
> view/list/common.js: { sync: true });
> view/service.js: var deferred =
> cosmo
> .app
> .pim
> .serv.getCollection(cosmo.app.pim.currentCollection.getUrls().self,
> {sync:true});
>
>
> As you can see, we're using synchronous calls quite a bit. This
> means that while the browser is waiting for the server to return
> data the entire program hangs, something you probably noticed if you
> signed into hub yesterday. The solution is to convert all these
> pieces of code to a callback based model and make the XHR calls
> asynchronously.
>
> I'd be happy to make this happen, but wanted to ping the list for
> comments and ideas on potential gotchas.
>
> Thoughts?
>
> -Travis
> _______________________________________________
> cosmo-dev mailing list
> cosmo-dev at lists.osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/cosmo-dev
More information about the cosmo-dev
mailing list