[Objectbridge-developers] Object Identities
Brought to you by:
thma
From: Dixon-Peugh, D. <Dav...@tp...> - 2000-11-14 14:32:24
|
I was poking around with the idea of Object Identities yesterday, and think I may have come accross some nice features. First off, it is not necessary that we build the Identity object from the database. It should be possible to build an Identity object by hand, from an XML document or from an HTML form. This is important as it should not be possible to create the actual object from any place asside from its source. If a persistent object already exists, then you want to get it from the source to ensure that it is complete. Secondly, the introduction of Identities provides us with a nifty implementation of the ODMG collections. We could build the internal collection with lightweight identity objects, and when references are made to "getObject" or what have you, we could return the actual object the identity represents. Why would we want to use Identities instead of the actual objects? First, all of our collections that we manage would be of the same type. Second, as we provide the implementation of the Identity, we can do things to make it easier. (Like provide Comparable interface to the Identities.) Thirdly, we get all the benefits that Thomas has brought up. It allows lazy retrieval of the information. Thoughts, comments? Any chance we can get ObJectBridge into CVS so I can check in some code? Thanks, David. |