[Twisted-Python] Twisted vs jQuery Deferreds (was Re: RPC design questions)

Tobias Oberstein tobias.oberstein at tavendo.de
Wed Aug 24 20:20:18 EDT 2011


Jasper, Allen, Richard,

thanks all for the pointers. I am confused now;)

No, seriously, I need to _test_ those libs, to see what they actually do.

I.e. I suspect the "new Dojo Deferreds" with "then" return something
different than the broken "then" in jQuery 1.5.

This is all messy, personally, I want the Twisted semantics in JS, but want
to choose something "mainstream" to make it easy for users to adopt.

Well. I'll give me an hour tomorrow to look into Dojo and Mochikit.


On 25.08.11 02:01, "Richard Wall" <m-lists at the-moon.net> wrote:

On 25 August 2011 00:30, Tobias Oberstein <tobias.oberstein at tavendo.de> wrote:
<snip>
> I am still wondering why they called the other stuff "then()" when it's not
> then, but "also()"
> and "pipe()" is the real <then> ;)

I agree. I had the same frustration a few months ago and various
Twisted people pointed out missing features in Jquery deferred:
 * http://twistedmatrix.com/pipermail/twisted-python/2011-June/024146.html

Mochikit is the best (and original) JS port of deferred..Dojo and
Google Closure both credit Mochikit (and Twisted) in their source
code. I'm planning to revert back to it.

I guess it would be useful / constructive to compile a list of the
weaknesses in the jquery / commonjs deferred API and the reasons and
use cases for the Twisted deferred API.
Perhaps they can be persuaded to evolve towards the Twisted API in time.

-RichardW.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110824/80b1f982/attachment.htm 


More information about the Twisted-Python mailing list