Updates
Latest Tweet
What's New?
Check out for latest innovation, a computer based training video collection
Like this Page
Data Access Patterns: Database Interactions in Object-Oriented Applications Review by Ron Cox
Great book on persistence theory
I'm in the middle of developing yet another persistence framework for a client, having done it a couple of times before. Each time I refine my ideas about how to do it. I must say that this book has a thorough examination of issues and certainly food for thought as well as answers to a couple of questions I've had.
However, I wouldn't say it's a complete design (which it doesn't claim to be). I still found myself picking and choosing which patterns to use as is, which to modify to my liking, and which to discard.
Also, I was left with the impression that the book didn't give enough coverage to handling collections of objects. The material is mostly geared toward working with a single object, which is understandable. I just think it would have been helpful to have more discussion about handling collections. For example, what should happen when you request to load an object, but the criteria you passed to the loading mechanism results in data for more than one object being retrieved from the database? Hand back the first object? Raise an exception? If it's covered in the book, I missed it.
Further, I would like to see more discussion about WHEN to refresh an object from the underlying database and when to save to the database. I always struggle with that timing issue. Having studied EJB, I like how entity beans keep your bean in synch with the underlying database. But the EJB container intercepts calls and makes those things happen. When coding the persistence layer myself, that's not an option. So, again, this is something I'd like to see some light shed on.
Overall, though, a great book if you're interested in reading up on persistence layer patterns.