Hi,

> -----Original Message-----
> From: Andrew Harris [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 25, 2001 12:07 PM
> To: LOG4J Developers Mailing List
> Subject: RE: Revised log4j interfaces
>
>
> Send reply to:        "LOG4J Developers Mailing List"
> <[EMAIL PROTECTED]>
> From:                 "Deacon Marcus" <[EMAIL PROTECTED]>
> To:                   "LOG4J Developers Mailing List"
> <[EMAIL PROTECTED]>
> Subject:              RE: Revised log4j interfaces
> Date sent:            Fri, 24 Aug 2001 22:13:34 +0200
>
>
> > Just one small suggestion - if it makes just a little sense for
> something to
> > be an interface instead of an abstract class, in the long run
> it is almost
> > always better to make it an interface. If, under some
> conditions and/or JDK
> > versions, interfaces are noticeably slower, I'd consider it a
> design bug in
> > JDK and/or its JIT and assume they'd fix it in near future anyway.
> >
> > > Ceki Gülcü - http://qos.ch
> >
> > Greetings, deacon Marcus
>
> I'd go along with this, and suggest that the implementation class
> could be called DefaultLogger or similar. If there were to be multiple
> implementations, you could provide a BaseLogger or
> AbstractLogger (if abstract) base class - this may be unnecessary.
> Possibilities are:
>
> DefaultLogger -> Logger
> BaseLogger -> Logger
> DefaultLogger -> BaseLogger -> Logger
> DefaultLogger -> AbstractLogger -> Logger
>
> The choice depends on how much customisation should be
> provided.

Exactly. When you have interface Xxx, base/minimum implementation BaseXxx
and default/minimum-working implementation DefaultXxx you get the most
customization options and the most happy customers. Everyone can choose
whether to extend Xxx, BaseXxx or DefaultXxx, so everyone will be happy :>

> There is a problem with interfaces, where implementing code will
> break if a new method is added; this can be minimised by
> recommending that users extend the base class rather than
> implement the interface, in most circumstances.

Yes - in most circumstances. Backward compatibility is great, but not always
possible. And we have major version number for such problems.

> --
> Andrew Harris
> [EMAIL PROTECTED]

Greetings,
     deacon Marcus




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to