I am going to dig into this over the weekend. One question I have is why seperate the API from the Impl... I understand from the standpoint that if you plan on having multiple implementations, then this is simpler. But what if you only expect to have a single implementation? Doesn't that mean you are making life more complex? Maybe this is more of a general design question versus usage with merlin question...
A pragmatic answer is that java proxies work only for interfaces; this means that if you want to be able to proxying on all your components, you need all your components to have (complete) work interfaces.
A theoretical answer is that it helps enforce "design by contract": the work interface is the encoding of the contract between client component and providing component, in java code (and usually some javadocs).
And the last comment I'll make is that you should always plan for unexpected needs. It doesn't matter if *you* plan to have a single implementation; there might very well be someone who would like to re-use your interface but not the implementation.
As to complexity....as a component developer, you're forced to provide an interface, which is a little more typing (or clicking if you have an "extract superinterface" option in your IDE), and defining a correct interface requires you to think hard about what part of the component API is public. Which is good, because it improves the component quality. But why is it more complex?
Finally, with regard to packaging...most of the same comments hold, but the granularity is simply different. Most places where your project depends on avalon-framework, you should be depending only on the framework API (the exception is where your writing or customizing a container), and you shouldn't care about where implementation classes come from. You can ensure that by depending on the avalon-framework-api jar.
regards!
- Leo
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
