incubator-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <P...@ThoughtWorks.net>
Subject Re: [Ftpserver] Comments on the new code
Date Fri, 23 Sep 2005 02:03:36 GMT

> The package ftplet is the basic API required to add
> custom user specified ftplets. The server needs
> slightly modified version of these APIs. Ftplet API is
> somewhat fixed but server API may get changed in
> future. This is the reason behind this difference. The
>  following two hierarchy will clarify this.
>
> FtpConfig <- IFtpConfig <- FtpConfigImpl
> FtpStatistics <- IFtpStatistics <- FtpStatisticsImpl
>

OK, if we're keen about Dependency Injection, we'd need to change a  
lot.  The basic FtpConfig component should have little knowledge of  
UserManager (and others), and no coupling to it...

   class XStreamFtpConfig implements FtpConfig { }

   class FooUserManager implements UserManager {
     FooUserManager( FtpConfig c ) {
       // whatever
     }
   }

   class SomethingComponentThatRequiresUserManager {
     SomethingComponentThatRequiresUserManager( UserManager um ) {
       // whatever
     }
   }

Also, for the record, a reusable component should not make a logging  
framework choice :-)
Better would be a Monitor and an adapter to one of a number of  
Logging Framework implementations.

- Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@incubator.apache.org
For additional commands, e-mail: general-help@incubator.apache.org


Mime
View raw message