[CommonJS] Event API Proposals

10 views
Skip to first unread message

Kris Kowal

unread,
May 1, 2010, 9:56:58 PM5/1/10
to comm...@googlegroups.com
[was: Module Naming Convention [was: Strategy]]

On Sat, May 1, 2010 at 6:52 PM, jhuni <jhu...@yahoo.com> wrote:
> I agree, however, it would be nice to still be able to have some
> events to listen to synchronous operations.

http://wiki.commonjs.org/wiki/Events/A
http://wiki.commonjs.org/wiki/Events/B

> Also I think it would be
> nice to use object literals in there somewhere.

A multi-observe method would be a nice convenience. But, again,
buying only what you need, it should be an option to only observe one
event.

Kris Kowal

--
You received this message because you are subscribed to the Google Groups "CommonJS" group.
To post to this group, send email to comm...@googlegroups.com.
To unsubscribe from this group, send email to commonjs+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/commonjs?hl=en.

Kris Kowal

unread,
May 1, 2010, 10:01:45 PM5/1/10
to comm...@googlegroups.com
On Sat, May 1, 2010 at 6:56 PM, Kris Kowal <cowber...@gmail.com> wrote:
>> I agree, however, it would be nice to still be able to have some
>> events to listen to synchronous operations.
>
> http://wiki.commonjs.org/wiki/Events/A
> http://wiki.commonjs.org/wiki/Events/B

Correction, there are presently four proposals and no convergence presently.

http://wiki.commonjs.org/wiki/Events

Links to the relevant discussions appear not to have been cataloged.
That'll have to be rectified, but please search for them in the
interim.

jhuni

unread,
May 1, 2010, 10:39:55 PM5/1/10
to CommonJS
This is interesting... What I am wondering is how these things relate
to method modifiers. Joose lets you do before, after, around,
override, and augment...

http://code.google.com/p/joose-js/wiki/MethodModifiers

It would be nice to use a similar thing on events as a way of
"observing before another observer" like in Events/A

Wes Garland

unread,
May 2, 2010, 9:22:28 AM5/2/10
to comm...@googlegroups.com
Kris:

Multi-observe methods, like, registering two callbacks for the same event?

That is *SO* handy I would really really support it as a base level interface. It's also easy to implement.

SO handy -- great way, for example, to write a debugging layer for a mis-behaving daemon build with Node's net API.

Wes
--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
Reply all
Reply to author
Forward
0 new messages