On Tue, Mar 29, 2011 at 10:16 AM, Mark McDonnell <[email protected]>wrote:

>  I did take a look at the Promises/A implementations but they were for
> server-side solutions and so tied into their own API terminology in places
> and was just confusing to follow along to.
>

Nothing about the two Promises/A libs I linked to are tied to the
server-side other than the fact that they're CommonJS modules, but that
shouldn't be much of a problem. I've used promised-io in the browser quite a
bit (it's got a fantastic HTTP client, by the way).


>
> At least with the jQuery I know the API already so I'll just have to go
> through the link you provided to their deferred script and muddle my way
> through.
>


That should be fine, but IIRC there are some deficiencies in jQuery's
promises implementation, particularly around chaining. I'll try and find the
gist.


> Thanks for the link, and thanks to everyone who posted a reply.
>
> Kind regards,
> Mark
>
> --
> Mark McDonnell
>
> On Tuesday, 29 March 2011 at 14:32, Poetro wrote:
>
> 2011/3/29 Mark McDonnell <[email protected]>:
>
> Hi Scott,
> Essentially I would like to use Promises in the same way as used by jQuery
> 1.5 (or at least how their AJAX API uses it) but I just don't have the
> first
> clue on how to implement it in actual JavaScript code?
> I understand that there are different implementations of Promises and
> looking through them it seems that jQuery's was based on Promises/A API so
> I
> guess that is the one I'd most likely want to try and implement.
> Again, I just don't understand how to implement it.
> I've found a few very basic variations...
>
> https://gist.github.com/814313
> https://gist.github.com/814318
>
> ...but I'm not sure how you would go about using these as examples?
> Regards,
> Mark
>
> --
> Mark McDonnell
>
>
> Did you look at the Promises/A implementation that are listed at
> http://wiki.commonjs.org/wiki/Promises/A#Implementations ? And also
> you can look at the jQuery implementation at
> https://github.com/jquery/jquery/blob/master/src/deferred.js .
>
> --
> Poetro
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>
>
>   --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to