[Zope-CMF] RE: "generic" CookedBody - compound/composite docs

Jon Edwards jon@pcgs.freeserve.co.uk
Mon, 13 Aug 2001 23:38:23 +0100


> My point being, since objects have workflows, why shouldn't their Body
> methods use them for how to render?  Why have to put that bit of
programming
> outside the object?

I'm getting out of my depth here, but...

Won't the method used to render depend not only on the object's
workflow-state, but also on the context it is called from? i.e. the settings
in the compound/composite doc, the rights of the person viewing it, the
country they come from, the current date.... ?

For example, you will want some compounds to only display "published"
objects, some to display all objects whatever workflow-state, and some to
vary, depending on the permissions/role of the person viewing (or other
variables).

I'm not sure how you'd get all that logic into the content-object,
especially as it will vary so much? ...and how will it know which bit of
logic to use for different compounds in different contexts? ...you'd have to
pass it a whole load of variables/properties and it would have to have a
load of rules to cover all the different permutations?

As I said, I'm a bit out of my depth, so I'm probably missing something?

Cheers, Jon