Hello.
As best as I can tell there are a couple of different conventions for naming your services:
<snip/>
Is there a best practice?
Yes and no. More info later.
It seems to me that (1) is the most commonly used, though I've used the ROLE method quite a bit myself. (3) doesn't look like a good idea, or is there a reasonable use case for it?
1 and 2 are essentially the same thing. The ROLE value is a convenience.
Did I miss any? Also if I recall, there was a question about why we use Strings
at all instead of Class objects.
The arbitrary name approach really only works for containers which only expose components to other components based on dependency declarations. In other words Phoenix and Merlin. Each component can define its own set of lookup names, and the container would map that for you. Phoenix still keeps the ROLE approach as a "best practice", but Merlin doesn't make any such claim.
For environments like Fortress and ECM, there is one lookup value for each component that is global. The only way to keep that working accross all components is to adopt the ROLE (aka interface class name) convention.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
