On Monday, 31 October 2011 at 13:56, Scott Sauyet wrote:
> Rob Griffiths wrote:
> > @Scott: What about when the library also needs to inject some management 
> > before the user gets given control?
> 
> I'm not sure I'm following what you mean here. But since the promises
> constructor implementation is presumably centralized, you could
> instrument it however you need.
In the example of an ajax request, my library does some manipulation of the 
response before handing control to the users callback, is it safe to assume 
that I could do a similar thing with promises?

> > Do we think that promises are not far different from an event manager? If 
> > it is far different, which is best?
> 
> Although, as I said, the constructor is centralized, the promises
> instances are not centralized, so I don't think it would have much in
> common with an Event Manager. Can you explain why you juxtapose the
> two?
Again in the case of an ajax request, there are only really 2 things happening, 
a success and failure. These are 2 callbacks that could be better served as 2 
events perhaps?

-- 
Rob Griffiths
Twitter: @bytespider
Github: https://github.com/bytespider

bytespider.euSent with Sparrow (http://www.sparrowmailapp.com/?sig) 

-- 
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