cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: [jira] Commented: (CAY-1312) Allow lifecycle callbacks on ROP client
Date Thu, 19 Nov 2009 10:09:08 GMT

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




Mime
View raw message