> From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] > > > 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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
