Alex Romayev wrote:
I'm sort of split on this one. Would be interested in hearing other people's opinions/ideas.

There are pros and cons in doing this separation. Technically if in a typical design you would almost need to have 3 layers of beans:

1. Form Beans - used to save forms to.
2. Business Beans.
3. Data Beans -used for data persistence by say OJB or in my case Hibernate.
2. and 3. might not always be separate but yes these 3 layers are potentially always involved.

HOWEVER:

If I want to add an attribute I would need to change:
I'm assuming you mean an attribute that needs persisting.

1. Database table
can't get around this
2. Object/relational mapping
yes but can be autogenerated from 1.
3. Data bean
yes but can be autogenerated from 2.
4. Business bean
yes
5. Form bean
6. Form definition
7. Form binding
8. Potentially a betwixt mapping if you use the bean to stream out XML for you presentation
9. Various mapping methods, such as Form Bean to Business bean, etc
yes x5

Bloody nightmare!!!
There are tools out there that generate classes from datamodels (eg Middlegen) through a templating engine. You could create your own templates that spit out CForms tags/Betwixt mappings instead of the usual DAO java code.


Interesting discussion, Jorg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to