Alex Romayev wrote:
I'm sort of split on this one. Would be interested in hearing other people's opinions/ideas.2. and 3. might not always be separate but yes these 3 layers are potentially always involved.
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.
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 tablecan't get around this
2. Object/relational mappingyes but can be autogenerated from 1.
3. Data beanyes but can be autogenerated from 2.
4. Business beanyes
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]
