[okfn-labs] Blog post about PyBossa speedups

Gregor Aisch gregor.aisch at okfn.org
Thu Dec 13 21:49:05 UTC 2012


As far as I know it's not implemented in the example apps yet, but it's implemented in this app:
https://github.com/PyBossa/app-lobbyfacts

I think making this the default is a great thing, but I would go one step further and improve the whole app development.

As described in my post, there're essentially two hooks the user need to plug into: loadTask and presentTask. In loadTask, or more precisely, taskLoaded, the app gets a task object that has just been loaded (or pre-loaded) along with a deferred. Then you can load data from additional APIs or fetch some images, and as you're ready you resolve the deferred. Same with presentTask, in which you get a task and a deferred, update your UI, set your event handlers and eventually resolve the deferred as the user has come up with a solution.

The entire rest of the magic should be handled by pybossa.js, without any line of code in user apps. pybossa.js would ensure that tasks are pre-loaded, that the url hash for the task is updated, the answers are submitted etc.

Will forward this discussion to Github.

-Gregor


Am 13.12.2012 um 22:33 schrieb Tom Morris <tfmorris at gmail.com>:

> On Thu, Dec 13, 2012 at 3:43 PM, Gregor Aisch <gregor.aisch at okfn.org> wrote:
> Hi,
> 
> Accidentally almost simultaneously with Stefan I pushed a blog post about how to speed up PyBossa apps by pre-loading upcoming tasks while the user is solving the current one.
> 
> http://okfnlabs.org/blog/2012/12/12/speeding-up-pybossa-apps.html
> 
> 
> Background task loading should be the default.  Is this implemented in the example apps so people who just do a simple minded copy get it?
> 
> Other keys to fast and efficient working include:
> - Undo always available
> - Keyboard shortcuts (e.g. arrow keys) for all voting actions 
> 
> Tom 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20121213/18b43070/attachment-0002.html>


More information about the okfn-labs mailing list