avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject RE: Fresh Outlook: (was RE: [desperate plea] RE: The need for 'hints')
Date Wed, 26 Jun 2002 13:26:16 GMT
> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 
> This is exactly the point.
> I'm used to requesting components, not managers.
> It's in the name: ComponentLocator, not ComponentManagerLocator.

Nicola, your problem is in your loose definition of component.
Not all objects are components.  The SocketManager is a component.
The Socket is an object.

*ALL* components have the following attributes:

1) Separate interface from implementation (Socket fails here)

2) No argument public constructor

3) Distributed in binary form (aka jar file)

*GOOD* components have the following going for them:

1) Represent logic or service--not information

2) Proper abstraction so as not to force implementation details
   and remain easy to use.

A Socket is a type of information.  It represents a way to
communicate with the outside world.

It does not make a component, much less a good component.  You
would have to have a new "component" for each location you want
to connect to.  A SocketManager gives you one point of access
and lets you connect to any external server--and provides the
ability to enforce sitewide security constraints over which
servers the sytem is able to connect with.  Something you would
not be able to do with your previous approach.

If you don't want to write a SocketManager, use someone else's.
This is COP, and you aren't the only one writing components.

The one thing that gets to me is the overuse of the word component.
Commons is the most guilty party of this confustion.

This formula should clear things up:

API != Component

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message