[Sugar-devel] Calling async callbacks always async

Manuel Quiñones manuq at laptop.org
Mon Mar 10 10:27:38 EDT 2014


2014-03-10 8:18 GMT-03:00 Daniel Narvaez <dwnarvaez at gmail.com>:
> Hello,
>
> Code pointed out a good explanation of why we should be always calling async
> callbacks async in sugar-web. We have been doing it, but I was never able to
> produce good rationale/example for it :)
>
> http://blog.osteele.com/posts/2008/04/minimizing-code-paths-in-asychronous-code.html

good post.

we should also prevent going too deep on callbacks nesting, also known
as "callback hell" or "christmas tree".

http://callbackhell.com/

this is a library that helps with async handling:
https://github.com/caolan/async

a very different approach to async is with promises, here is a recent
post about them:
http://dailyjs.com/2014/02/20/promises-in-detail/

Side note, I am looking at data-binding and observable variables to
get inspiration for web UI
http://www.ractivejs.org/
http://js.jidesoft.com/

-- 
.. manuq ..


More information about the Sugar-devel mailing list