Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E98E975EE for ; Thu, 1 Dec 2011 21:49:19 +0000 (UTC) Received: (qmail 40487 invoked by uid 500); 1 Dec 2011 21:49:19 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 40434 invoked by uid 500); 1 Dec 2011 21:49:19 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 40426 invoked by uid 99); 1 Dec 2011 21:49:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 21:49:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gtanner@gmail.com designates 209.85.161.47 as permitted sender) Received: from [209.85.161.47] (HELO mail-fx0-f47.google.com) (209.85.161.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 21:49:14 +0000 Received: by faaa19 with SMTP id a19so1681399faa.6 for ; Thu, 01 Dec 2011 13:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=uJkfGDFqJ2GVzzwAEPryEXvy0eaQdydVC4GhmCeL9P8=; b=r6w9H9DImHQIAmFQ0bxYkF2HmXArv6/W6+d3HeLeOO0ffXqSQg2dFaPdSV1RdfsOs0 mnPZaAtGk2rJiqPuGRWQvzYBVvIlmDd6fVDH2BDr8zRe5UNLTtpyFjUiv5EXR1Px8yCz W0H9fA3aZ23r3Q23neD15OKBfndVE1xVxwNWg= Received: by 10.180.102.233 with SMTP id fr9mr6003297wib.40.1322776130448; Thu, 01 Dec 2011 13:48:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.86.195 with HTTP; Thu, 1 Dec 2011 13:48:29 -0800 (PST) From: Gord Tanner Date: Thu, 1 Dec 2011 16:48:29 -0500 Message-ID: Subject: [DISCUSS] Switching out Channel's in callback-js for an event module To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d04451a275f6b8704b30ed12e --f46d04451a275f6b8704b30ed12e Content-Type: text/plain; charset=ISO-8859-1 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 --f46d04451a275f6b8704b30ed12e--