Wednesday, May 20, 2009

If you're developing a KiokuDB based application then you probably already know about KiokuX::User. Here is a useful technique to keep your model flexible when you use it: instead of consuming the role in your high level user class, consume it in a class that models identity:

Oh, and if you do need to wrap them, use delegation, not subclassing. There are actually 3 different concrete set types depending on their materialization state (Transient, for sets that were created by the user, Deferred for lazy loaded sets created by the linker, and Loaded for vivified sets created by the linker. Deferred and Loaded behaviors are swapped by reblessing).