Comment Cayenne Solution [Re:Java Data Objects are nice..] (Score 1) 165
- Use bytcode "enhancements" (JDO)
- Use reflection
- Use common superclass
Personally I am in favor of (3). This allows to solve a problem mentioned by the parent - tracking object changes - with as little overhead as possible, and still keep your system clean OO. This is how Cayenne O/R Framework works:
http://objectstyle.org/cayenne/
This allows to track changes to objects as they occur, instead of doing a blanket analysis of all objects on commit. And in general this allows a better control of objects persistence behavior by the framework. There is another (commercial) product that uses the same approach: NeXT/Apple's WebObjects. The downside of (3) is that you must have a common superclass for all your business objects, but I still have to see the case when this is undesirable.
Andrus
Disclaimer: I am personally involved with Cayenne and therefore not impartial