Hi,<br><br>I'm new to the list, so I apologize if this has been discussed before and I missed it.<br><br>I've been reading the papers by Pascal Costanza et al. and trying to get my head around ContextL. The examples in the overview paper are pretty clear, but I seldom can grasp the usefulness of employer/person/employee/address models without considering persistence.
<br><br>While this is not my strongest area, it would seem at first that the decomposition of the data model into layers is similar to decomposition into normal forms or tables in a relational model. If so, would it be possible to create a persistent mixin layer class in the layer class hierarchy to facilitate both automatic Object To Relational mappings of layered slot sets and to allow a mixture of persistent and run-time layers (such as view layers) on the same objects?
<br><br>Also if one would use direct object persistence such as that in Franz's AllegroCache, could one use the layer system and persistence simultaneously? Allegro's solution, like layers, relies on a metaclass to implement its feature. I've done a little MOP work, but haven't mixed-in two different metaclasses yet. Would it be simply creating a class that inherits from both layered-class and Allegro's persistence metaclass, then supplying the (:metaclass that-class) form in the define-layered-class (I noticed you only supply the (:metaclass 'layered-class) if a :metaclass form is not present). From the looks of the macros and what I understand of CLOS, it appears that if persistence as a part of the metaclass on any layer, then it would need to be used on all of them and all layers become persistent, right? Or maybe don't understand how it would work to have different metaclasses specified on different layers of the same object since with defclass as the underlying mechanism one is redefining the object (is the metaclass for a given layer only used to define the slots in that one layer?).
<br><br>Thanks for any help you can provide in clearing up my understanding. <br><br>Ross<br>