3

Promises in Mojito

Hi,

Mojito uses callbacks for its asynchronous methods (for example in mojito.models.getData() and MojitProxy.invoke()).

I know YUI is developing Y.Promise and Y.Deferred at the moment (following the Promises/A spec). Could you consider doing the same for future releases? I know it involves rewriting a lot of code, but it makes mojito-projects structured in a much better way.

Thx, Marco

2 Replies
  • Hi Marco,

    This is an interesting idea. I'll bring it up with the team. In general, we're trying to evolve Mojito to make more/better use of YUI, and I think your suggestion fits in with that.

    Drew

    5
  • Andrew: yes please do.

    I would really appreciate. I find myself working with deep nested callbacks (mojito.models.getData() which make a call to MySQL multiple times) of their own. The code gets complicated this way. Promises would help.

    Thx, Marco.

    0

Recent Posts

in Yahoo! Mojito