From: Jackson M. <ja...@te...> - 2005-01-24 14:04:11
|
I would rather there be a mapping of events and handlers similar to how we have mapped pages to modules. That was multiple events can be handled by the same handler. This also means there is a single place where all of the application event handlers are defined. The "listener" would handle all events. This would likely be in the front controller (or called from the front controller). So, no, I don't think the observer pattern is what we are looking for here. My understanding of the observer pattern is that we would either have to load all of the event handlers on every request or we would have to wait to fire an event until we got to the component that fired the event (since HTTP is stateless). Feel free to correct me if I am wrong on that one. -Jackson On Jan 22, 2005, at 11:22 AM, Marcus Whitney wrote: > Hey, > > So, I have a question. How have events/listeners been implemented in > Axson, and would that implementation work well with CEP. Or should we > simply consider an observable interface that all overloading classes > would implement? > interface Observable { > function attach( Observer $observer); > function detach( Observer $observer); > function notify(); > } > > interface Observer { > function run( Observable $observable); > } > > Is there something more elegant? should there be more ability to > define events? I'm still figuring it all out, but pretty fast so I'm > ready to put something in place ASAP. > > Lemme know. Thanks. > > - Marcus > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Cep-development mailing list > Cep...@li... > https://lists.sourceforge.net/lists/listinfo/cep-development > |