What's the difference between a Component and a Service?
Usually not much.
[begin Avalon flash-back...]
In the beginning there was the Excalibur Component Manager (ECM) which was a basic Avalon container. All the components had to implement a marker interface named Component This often made it difficult to migrate existing applications to Avalon. So, an effort was made to update the framework to allow normal Java Objects to be handed by a container, not just object which implemented the Component interface.
[fast-forward to today...]
The ServiceManager and Serviceable interface allow newer Avalon containers to handle normal Java Objects, not just Components. This is the only real difference between a ServiceManager and a ComponentManager. Consequently, the words "service" and "component" have often been used interchangeably. Since the change, service has sometimes been used to refer to the interface (or role) and component refer to the implementation, but in general, the two terms mean the same thing.
For more information see the ContainerStory
[Return to FrequentlyAskedQuestions]