[Mailman3-dev] list manager control

Barry Warsaw barry at python.org
Mon Apr 19 17:40:59 EDT 2004


On Mon, 2004-04-19 at 14:12, Richard Barrett wrote:

> Do you see this as being a form of inheritance hierarchy and is 
> composition going to be:
> 
> either: a one-shot computation process in  which given super-style is 
> derived from the then current state of its components at a particular 
> time and then left in that state unless and until a re-computation of 
> it is specifically called for.
> 
> or: a computed composite rule for the super style saying how to derive 
> from the values defined in the components (presumably recursively) 
> which dynamically delivers the value of a particular attribute whenever 
> it is required, so that changes in components flow continuously through 
> the hierarchy.
> 
> In either case, traceability of how a given attribute is derived for a 
> given "style" is an issue. Some form of "is affected by changes in X"  
> AND  "changes in X have these consequences" analysis seems desirable if 
> surprise is not to be the order of the day when undertaking maintenance 
> of sub-styles. Particularly if the second way of composing I suggest 
> above is adopted, the "changes in X have these consequences" analysis 
> may be quite useful.

IIUC, closer to the former than the latter.  Thinking of my straw man
implementation might help: we define a function that takes a single
MailList object argument.  The function is a "style".  When the list
object created, we pass it to the style function and it sets various
attributes as it sees fit.  Composition then, is simply an ordering of
multiple functions to call on the MailList object after its initial
creation.

This is pretty simple for on-disk styles; the question is whether we can
some how safely translate that to thru-the-web style creation.  The
alternative is that the site admin adds new styles by adding new
functions, and exposing them to list creators (and possibly list admins)
to pick and choose from.

This model means that styles are one-shot affairs, applied to lists at
creation time.  Or possibly applied to lists some time later, via a
manual step.  A change to a style function therefore has no effect on
existing lists and there's no reference from the list object to the
style functions that were applied to it.

That may not give us everything we'd want from a style system, but it
probably passes the 80/20 rule and will be fairly simple to implement
and document.

-Barry





More information about the Mailman3-Dev mailing list