2007/4/16, Andrus Adamchik <andru..bjectstyle.org>:
>
>
> On Apr 16, 2007, at 3:28 PM, jerome moliere wrote:
>
> > thanks for the reply andrus...
> > so rather than imaginating factories with named configuration
> > parameters
> > (metadata) I'd put in place named queries carrying the
> > configuration ?
> > Why not.....
>
> Jerome,
>
> As it happened in the past a few times, I suspect I don't fully
> understand what you are trying to do. Use a standard query? Build a
> custom query? Something else? Could you clarify please.
I can try to be more clear... But I think that you provide me the good way
to do that in the Cayenne
spirit...
In a traditional architecture, services tier invoke dao tier to
retrieve/store data from db...
CRUD operations tainted with business experience are all present in one
tier: the dao one..
But all service operations won't invoke the same technical services in the
same manner ...
Batch operations invoked from daemons or reports won't use the same
underlying configuration for the same technical service .... A search page
against the customer database won't retrieve all customers while reports or
batches may want to retrieve the whole database isn't it ?
So I imagine to create (with a simple map) a repository of configurations (I
imagine that Metadata could have been these configurations but sounds false
after your first reply), technical services being invoked with a simple
string parameter to point to one of the configuration...
We may think that business service don't need to know such low level of
details but it's the only way to avoid copy/paste and everybody knows danger
of code duplication.. I don't want to have 2 implementations of the same
search service even if there are 2 (or more) usage contexts..
I hope to be clear...
Once again I think that your answer is perfect.... It's just a refactoring
of the code I planned to put in place...
Cheers
jerome
Andrus
>
>
-- Jerome Moliere - Mentor/J http://romjethoughts.blogspot.com/ auteur Eyrolles
This archive was generated by hypermail 2.0.0 : Mon Apr 16 2007 - 10:03:42 EDT