Dennis Kang wrote:
I tend to view things in less absolute terms:Is there any design principle when to use components and when to use general classses?
1. there are objects that have no component notions
2. there are object that leverage component notions
but are not pure compoennts (i.e. not deployable
within a particular "standard" container
3. there are pure components which are typiclly
targetted towards deployment under a "standard"
containment environment
Example of case 2:
public class MyClassLoader extends URLClassLoader
implements LogEnabled
{
Logger m_logger;
public MyClassLoader( URL[] urls )
{
super( urls );
}
public void enableLogging( Logger logger )
{
m_logger = logger;
}
public Logger getLogging()
{
return m_logger;
}
}
However, it does not take much to turn our example classloader object into a full component. All that is needed is a null argument constructor.
In reality you have
OOP -- grey zone -- COP/SOP
Being grey should not be considered a bad thing - sometime you need a little tone in life.
:-)
Cheers, Steve.
Thanks.
Dennis.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- Stephen J. McConnell OSM SARL digital products for a global economy mailto:[EMAIL PROTECTED] http://www.osm.net -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>