You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2009/11/19 11:09:08 UTC
Re: [jira] Commented: (CAY-1312) Allow lifecycle callbacks on ROP client
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
Re: [jira] Commented: (CAY-1312) Allow lifecycle callbacks on ROP client
Posted by Andrus Adamchik <an...@objectstyle.org>.
I think this is a somewhat parallel task. I.e. I have no problem with
2 sets of listeners (server and client) in the Model, just not more
than that.
Andrus
On Nov 19, 2009, at 12:20 PM, Andrey Razumovsky wrote:
> If so, it also means we should get rid of two sets of classes at
> first step
>
> 2009/11/19 Andrus Adamchik <an...@objectstyle.org>
>
>>
>> On Nov 19, 2009, at 12:09 PM, Andrus Adamchik wrote:
>>
>> 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
>>>
>>
>> To stress this point, this is similar to why you'd have inheritance
>> and
>> composition in an OO language - you don't want all possible
>> scenarios to be
>> addressed in a single class (or file), with a long chain of if/else.
>>
>> Configuration (model) reuse is facing the same problems.
>>
>> Andrus
>>
>>
>
>
> --
> Andrey
Re: [jira] Commented: (CAY-1312) Allow lifecycle callbacks on ROP
client
Posted by Andrey Razumovsky <ra...@gmail.com>.
If so, it also means we should get rid of two sets of classes at first step
2009/11/19 Andrus Adamchik <an...@objectstyle.org>
>
> On Nov 19, 2009, at 12:09 PM, Andrus Adamchik wrote:
>
> 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
>>
>
> To stress this point, this is similar to why you'd have inheritance and
> composition in an OO language - you don't want all possible scenarios to be
> addressed in a single class (or file), with a long chain of if/else.
>
> Configuration (model) reuse is facing the same problems.
>
> Andrus
>
>
--
Andrey
Re: [jira] Commented: (CAY-1312) Allow lifecycle callbacks on ROP client
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 19, 2009, at 12:09 PM, Andrus Adamchik wrote:
>> 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
To stress this point, this is similar to why you'd have inheritance
and composition in an OO language - you don't want all possible
scenarios to be addressed in a single class (or file), with a long
chain of if/else.
Configuration (model) reuse is facing the same problems.
Andrus