Hello,
I had recently a discussion with a Spring consultants. Based on this
discussion I think we should extend the dependency functionality.
We could introduce a annotation like @Component. If another component
request such a marked component the DI container could try to create an
instance of this case based on the Application Context.
For example
@Component
public classTodo {
@Inject ITodoModelService service
}
whereby ITodoModelService would be an OSGi service.
If another component, e.g. requires a Todo via @Inject then the DI
container could check if its available in the local context hierarchy and
once reached its end, it should check if the class is marked as component
and create the class (if possible via the ApplicationContext).
This would be in my opinion a very, very useful extension of the current DI
container.
Please share your opinion.
Best regards, Lars
--
Lars
http://www.vogella.de - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter
_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev