You may remember a discussion of the mixin concept. Since then I've integrated 
the cayenne-mixin module into 2 of my projects and have been gradually 
migrating various custom-coded solutions to cayenne-mixin. This resulted in a 
few cool generic features in Cayenne core (lifecycle annotations, 
DataChannelFilter), as well as a number of new things in the mixin module. 

What we ended up with is a neat generic mechanism that I would call 
"annotations-based lifecycle and workflow management". Mixins (the ability to 
add special runtime properties to existing objects) are just one aspect of it, 
and I haven't solved any of the limitations that we discussed before. 
Nevertheless the new framework is extremely useful for higher level 
event-driven programming in Cayenne (lower level being managing per-event 
per-object lifecycle listeners).

It has a few generic concepts - UUID/Referenceable, ChangeSet, and a few 
defined "event handlers" (or "workflow handlers") for audit management, cache 
invalidation. Users can create their own business-specific extensions and their 
own lifecycle annotations (which I am doing actively in my apps).

So I am suggestion to move cayenne-mixin to the main development tree from 
sandbox (under the name "cayenne-lifecycle") and include it in 3.1 releases as 
a separate jar. This will allow our users to get the "official" builds of 
cayenne-lifecycle, and hopefully won't create release scheduling conflicts 
between the core and lifecycle.

My hope that this meta-programming facility will streamline implementation of 
many common scenarios for our users.

Comments?
Andrus

Reply via email to