Hi, On Mon, Jun 1, 2009 at 11:02 PM, Tobias Schlitt<t...@ez.no> wrote: > > On 06/02/2009 12:29 AM Benjamin Eberlei wrote: >> A minor detail that i didn't like so much is the code-duplication of identity >> map decorator and the load handler, which is difficult to eliminate due to >> both >> of them being "far away" in the package structure. >> >> But considering that the 3 handlers have only been created to simplify the >> persistent object manager they still belong together somehow. Maybe it is >> time >> to abstract'ize the loader (possible the save and delete handler too) and >> make >> the identity map decorator have one implementation also that removes code >> duplication. Abstract handlers have the advantage that they help in the >> further development of PO with new features. > > Could you elaborate a bit more on how this could happen? I still don't > get the main point. >
Maybe Benjamin is partly talking about the fact that the user can't set his own handler objects to the session. IIRC this was not considered an interesting feature last time it was requested and discussed on IRC. This relates to another feature that was discussed: object->class reversal and object instantiation refactor. The big idea behind that was to encapsulate all get_class() and "new" calls into methods of the session, allowing meta programming of the model layer. This would also solve the requirements discussed when the Repository component was proposed, and might not require major changes in PersistentObject sources. Regards, James. -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components