On Monday, 31 October 2011 at 19:30, Scott Sauyet wrote: > There are plenty of good reasons to create an event registry, > especially for larger systems, but I use them alongside Promises, and > never think twice about the Promises API. Can you suggest any reason > to switch from Promises to a registry? At the moment I understand very little about the benefits of promises, but I do understand about the event model. I'm thinking about implementing one or the other in my library so I need to understand the pros and cons of each approach. I need to weigh up what overhead and complexity there will be, or if indeed a simple callback would be best.
I can see clearly that for multiple callbacks, or callbacks that require the presence of multiple conditions promises are extremely handy. So which promise spec should we follow? and which promise libraries are worth looking at? when.js (https://github.com/briancavalier/when.js) and jQuery's deferred (http://api.jquery.com/category/deferred-object/) seem like two good approaches, both of which follow the CommonJS Promises/A spec. -- 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]
