If compared with J2EE, could we say components in
Avalon is similiar with J2EE conceptually? For
example, if we have a Avalon version of Pet store
compared with J2EE version, should we design most of
the entities such as ShoppingCart, Product, Customer,
etc. as components?

Dennis.


--- Stephen McConnell <[EMAIL PROTECTED]> wrote:
> 
> 
> Dennis Kang wrote:
> 
> >Is there any design principle when to use
> components
> >and when to use general classses?
> >
> 
> I tend to view things in less absolute terms:
> 
>   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]>
> 


__________________________________________________
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]>

Reply via email to