incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtan...@gmail.com
Subject Re: [DISCUSS] Switching out Channel's in callback-js for an event module
Date Thu, 01 Dec 2011 22:10:57 GMT
Correct,

Currently there is no buffering of event triggers when no subscribers exist in the module.

I wouldn't expect that to be a common use case (only saw it used once) and could it be handled
by a closured var inside the addEventListener override?
Sent on the TELUS Mobility network with BlackBerry

-----Original Message-----
From: Filip Maj <fil@adobe.com>
Date: Thu, 1 Dec 2011 14:03:29 
To: callback-dev@incubator.apache.org<callback-dev@incubator.apache.org>
Reply-To: callback-dev@incubator.apache.org
Subject: Re: [DISCUSS] Switching out Channel's in callback-js for an event
 module

Love it.

Also slightly smaller :D

I also prefer this API over the channel one. Especially the `once` or
`join` function - dependencies as FIRST argument, not last :/

One thing, though: I saw in the bootstrap there was some comment about a
hack regarding registering to an event that has already fired - this is
key in phonegap currently but I do not think is supported right now in
your implementation. Is that correct?

On 11-12-01 1:48 PM, "Gord Tanner" <gtanner@gmail.com> wrote:

>Please see reference branch here:
>https://github.com/gtanner/callback-js/tree/event
>
>One of the issues with Channel's in a module based system is that it is
>awkward to keep track to a central repository of channel objects.
>
>I coded up a quick prototype using an event module.  This gives us the
>ability to trigger and sync on events by just using a string (rather than
>an instance created before hand). It cleans up some of the code and
>doesn't
>require the pre-construction of all the channels before hand.
>
>See tests here:
>https://github.com/gtanner/callback-js/blob/event/test/test.event.js
>
>See use case here:
>https://github.com/gtanner/callback-js/blob/event/lib/bootstrap.js
>
>
>----
>Gord Tanner
>Code Poet
>RIM
>@gordtanner

Mime
View raw message