[Zope] Web pages as Object Classes
Paolo Losi
paolo at hypersonic.it
Mon Feb 2 13:27:25 EST 2004
Johan Carlsson wrote:
> There are better Design Patterns than inheritance for doing the same
> thing. (I am using a dekoration pattern myself where the dekor is a
> template with a number of views).
Is decoration pattern a Carlsson's "trademark" or something "well
known"? I couldn't find anything interesting with google...
> Zope it self uses the concept of run-time inheritance (e.g. acqusition).
>
> Your base class would be your root-object, index_html in the root object
> is the base implementation of render() and it can call header, menu,
> login_status, content, footer. The sub-classes are object futher down
> the hieracy and every thing can be overriden in it.
> The problem with this approach is of course that implementation,
> data and hierarcy gets mixed up in an unfortunate combination.
Another problem is that i cannot use parameters with PTL or apply some
logic to them but... again... I would probably be mixing content and
presentation again :-)
> This problem has been taceled in many product, such as portal_skins (in
> CMF) or the template system in EasyPublisher or by proxy/repository
> implementations.
>
> IMHO I think you would be better of understanding the power of Zope
> first and than look at what archtecture/patterns would suit you.
You're right. But I feel that trying to understand how to use features
while you're learning makes you learn faster! :-)
> That's my 25.cents anyway :-)
>
You've been very kind and helpful
Ciao
Pao
More information about the Zope
mailing list