ObjectSpaces 2
I've been a little bit too simplistic in the previous post, as Frans pointed out in his comment :-)
When you use your own objects with ObjectSpaces, physical serialization/deserialization a la .NET formatters is not taking place. What I meant, is a "logical" form of serialization in which data flows in and out of your classes.
Of course, the developer needs to know a lot about the entities involved and their relationships. A developer doesn't necessarily need to know about the names of the tables, the columns, and most physical constraints. Personally, I believe that the beauty of tools like ObjectSpaces lies just here.
I agree that the more you know about the data structure, the better you can write the code. But when dozens of developers are involved in a large project with tons of tables, are you sure you can afford this? Isn't it better using a programming paradigm that shields a large group of developers from the nitty-gritty SQL details?
I don't know how ObjectSpaces tracks changes to objects, and I'm not even sure that the current is the final solution. However, personally I would have used a common base class with a sort of base Modified property to set and reset programmatically. Perhaps a bit more complex task for developers, but hopefully a better average performance.
Comments?