On 28.01.2008 20:41:22 Simon Pepping wrote:
> Thanks for your extensive reply.
> 
> On Fri, Jan 25, 2008 at 10:48:52PM +0100, Jeremias Maerki wrote:
> > On 25.01.2008 21:57:46 Simon Pepping wrote:
> > > Why does a user need to be able to write his own broadcaster, with his
> > > own event producers, besides his own listeners? Why is it not enough
> > > to let him write his own listeners?
> > 
> > I guess you're referring to my choice to split the broadcaster into
> > interface and default implementation. In the normal case, I don't expect
> > anyone to implement another EventBroadcaster but maybe someone finds a
> > reason to subclass DefaultEventBroadcaster, for example to do filtering.
> 
> Indeed, the interface and the name 'Default...' made me think so. Why
> do you not call them IEventBroadcaster and EventBroadcaster?

Mainly because we don't usually use the "I" Pattern for naming
interfaces in this project. Plus, for my taste, "EventBroadcaster" is
too near to "IEventBroadcaster" and suggests to be the one and only
implementation when it's really just the "default" implementation that
will work for most users.

> > I want to leave that possibility open. Furthermore, the interface is
> > better readable than the implementation. Normally, it should be enough
> > to implement a listener. Basically, I somewhat designed this whole thing
> > to be reused outside the FOP domain as nothing in there is really
> > FOP-specific. The naming of FopEvent somehow bugs me in this regard but
> > I haven't found a better name, yet, to distinguish the event object from
> > java.util.EventObject. Suggestions welcome.
> 
> Why do you not just call it Event? The name is qualified by its
> package.

That's a good idea. I'll do that.


Jeremias Maerki

Reply via email to