On 2010-09-29 18.48, Stanislav Muhametsin wrote:
Ahh, I see. I guess that's a working strategy, since you haven't
probably encountered any problems which would stop development. I hope
this same principle holds in any general case (something else than web
app), it seems to put a lot of responsibility for injector. Because, in
that case, injector has to know the rule that tells that for context X,
for role Y, in case there are many candidates for Y, pick specific one
of them. The logic in selecting this one has to be in injector, or
expressed by some rule to injector.

In my own API there's a RoleMap with either set(Object) or set(Object, RoleClass). If a specific RoleClass is used, then the map knows exactly which object to use, otherwise it picks any that implements the given role.

2. Drop the 'context'-sub-package, and add RoleMap from streamflow. It
seems that all contexts always have RoleMaps, so it would be nice to
have some generic implementation for it, and it would make framework a
little more worthy DCI-wise.

WDYT?

Me and Niclas have been talking off-list about moving the DCI code in Streamflow into Qi4j for the next release. I need to complete the refactoring I'm doing first though, with the separation between REST and the actual contexts.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to