As promised I now started to work on event handling in slide. It's not easy to find the right approach to fire as many events as desired. I've implemented vetoable events for the different helpers (ContentEvent, MacroEvent etc), but this is very fine grained. (BTW: It's interesting to see, how ofter some methods are called, there seems to be much room for performance enhancements). There may also be events on level of each webDAV method but I've the strong feeling it is better to handle event on slide core level only. Next steps: - Make the events to be fired configurable (per helper?) - Collect events that are fired inside transactions and distribute them asynchronously to all listeners after commit (for this the stores might need to be extended so that events can be stored to ensure that no event gets lost). This can e.g. be used to trigger search index updates. - event en-/decoding to XML - Implement webdav-like method to get all events since... (time in millis) for client that want to pull events - Implement pushing events to remote clients listening on a specified port (webdav-like method needed to register clients on a given port) Any comments are welcome! Daniel
Am Mittwoch, 3. Dezember 2003 13:27 schrieb Daniel Florey: > Hi, > I'd like to open a new thread to share my thoughts on event handling in > slide. I would like to start working on this issue at the beginning of the > next year. My basic thoughts are: > - Events should be fired for every operation that could be of interest for > any recipient. > - There should be two types of events: Evens that are fired inside > transactions (vetoable events) and events that are distributed as a bundle > at the end of a transaction. So events should be able to replace > interceptors (that are currently not transaction-aware). > - The events that are fired should contain a reference to the content that > it belongs to. So it should be possible to check the content of a document > inside a transaction if the vetoable write event occurs and deny it if > needed. Btw: There should be a way to read the stream of a resource without > confusing slide (so that slide can read from the stream again to write the > resource). > - The events should be extendable so that custom events can be fired and > distributed in the same way as "core" events. > > The events should be able to connect parts of slide without coupling them > too tightly. Think of some kind of presentation layer with caching, > integration of lucene or a workflow engine. > In a first step events are fired inside the VM, maybe some event listeners > could be used distribute them via JMS later to enable clustered > environments. I'd like to use naming conventions that are similar to swing > events (events, listeners, adaters...) because everything should sound > familiar and I think swing/awt is the place where events are used most > frequently. > > Daniel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
