On Nov 19, 2009, at 11:50 AM, Andrey Razumovsky wrote:
I'm not sure I understand. DI can help to set EntityListenerFactory but how would it help in this common case: to map listeners for usage on client?
I guess the point is not so much DI, but rather registering listeners via API in some form. (Although client-side DI may also be beneficial in general).
This should be done in modeler without any extra code and configuration
In a modularized application, the model and associated DataObjects are created once and then reused in many (possibly unexpected) scenarios. So my first solution to this was to allow extra DataMaps to be merged with the main reusable DataMap, overriding/adding listeners (so in this case we'll need to support "override ObjEntities" in the Modeler).
My second solution is to do this via API. It is possible to do it now as well. DI container will just make it more centralized in each application module.
The only reason that I am more in favor of a second solution is that I want minimize modeling effort (same reasons why I want an Eclipse plugin - want all the project pieces in a single environment). I guess we just need to try and play with API and see if we can make it easy to use (and then comprehend your configuration) in a modularized app environment.
Andrus
