>> The design I us works like this:
>> - for each logical item of data write a trivial class with all the
>>   get/set methods (the Entity class).
>
>If we have any XSLT gurus in our midst, this sounds like it is something
that
>could be auto-generated from an XML-based description of the "logical
item", no?

I'm not familiar with XSLT (apart from recognizing the acronym) so I'm not
aware of what it actually does. What is a recommended reading on this ?

To answer your question:
yes, I think it should be possible to automate the process. At least I know
how I'd do it using PERL scripts.

>> - for each such trivial data class write a likewise trivial class that
>>   does know how to map a ResultSet to the Entity class. Some SQL-Stmt
>>   merging code is added as well to tune the query (the Retriever class).
>
>As above, could such a "trivial" class be auto-generated?

I assume the answer would be "yes" again.

>> - for each logical query add a more or less trivial class that does the
>>   actual JDBC stuff (the Controller class).
>>
>
>The EJB analogue for this would be to add a finder method that implemented
>the logical query.

Now that you mention it: it is more or less that.

>I'd like to see design patterns like this available to the Struts community
--
>*especially* if we can create some tools that reduce the tedium of creating
>"trivial" classes.

I'll check on copyright (and in the worst case generate some code that does
not infringe any existing copyrights).

Best,
Michael

Reply via email to