Frank W. Zammetti wrote:
So, is another way of saying what your saying is that you feel that
DTO+DAO=Something Good(tm)?
So, if instead of having:
class CustomerDTO {
public setFirstName(String);
public setLastName(String);
public getFirstName(String);
public getLastName(String);
}
class CustomDAO {
public createCustomer(CustomerDTO c);
public getCustomer(String id);
public updateCustomer(CustomerDTO c);
public deleteCustomer(String id);
}
...you instead have...
class Customer {
private String firstName;
private String lastName;
public setFirstName(String);
public setLastName(String);
public createCustomer();
public getCustomer(String);
public updateCustomer();
public deleteCustomer();
}
Is that roughly what your saying? If so, I don't think I disagree and
would be interested to hear why anyone thinks it's NOT a good idea.
My only response would be that ultimately, I still prefer to have less
coupling: with a POJO bean and a DAO it gives me one more place I can
change implementation. That said, if you added a "setDao" or whatever to
the above Customer I might bitch a little less.
I suppose that I could implement the getters/setters in a base class and
implement CRUD in subclasses, but I still prefer the cleaner separation.
But I'm weird.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]