Say I use a simple frontend for information passed on by a DAO that uses JDBC (without ORM). In other words, the class would have no attributes to speak of. Would this considered as a valid approach? What issues could it potentially cause and how could a class be designed to avoid them?
+2
A:
It sounds like you are referring to the data transfer object pattern. So long as the pattern fits your needs, it is a valid approach. I'm not aware of any pitfalls as such.
btreat
2010-07-10 01:11:52
I'm using simple business objects. As a DAO already returns these, the model can get return values directly from the DAO and modify them if necessary.
James P.
2010-07-10 12:48:29