Dito! Steve. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of > Charles Benett > Sent: Wednesday, 16 May, 2001 22:25 > To: Avalon Development > Subject: Re: [Proposal] Should we introduce a new idiom for Components? > > > Seems like a good idea. > Charles > > Berin Loritsch wrote: > > > > I am specifically thinking about the Excalibur components. In > order to enforce > > the Role names being correct, I am proposing that we augment > the work interface > > with the following idiom: > > > > interface DataSourceComponent { > > String ROLE = > "org.apache.avalon.excalibur.datasources.DataSourceComponentSelector"; > > > > Connection getConnection(); > > } > > > > That way when we wanted to use the Component, we can take > advantage of the > > fact that we already have the interface imported: > > > > manager.lookup(DataSourceComponent.ROLE); > > > > For systems that like to have one interface to collect all the > role names can use: > > > > interface Roles { > > DATASOURCES = DataSourceComponent.ROLE; > > } > > > > It greatly reduces errors when typing, > > Good point! > > > and places the responsibility for fixing > > a role name in one place. If the role name changes for some > reason, impact is > > similarly reduced. > > > > The reason that I am proposing it is because it > > 1) has little to no impact on API > > 2) because I want to document the idiom should we choose to adopt it. > > > > --------------------------------------------------------------------- > > 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] >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
