[Zope] Web pages as Object Classes
Paolo Losi
paolo at hypersonic.it
Mon Feb 2 05:17:00 EST 2004
Hi all,
here you have another newbie :-)
I'm studying Zope and looking for a clever way
to use all its power.
I've been using recently the quixote application server
and using that framework I've been able to structure
my sites as a collection of HTML pages classes.
The idea is to have an "abstract" superclass which
defines the basic structure of the page:
- look and feel (via css for example)
- basic container structure (I get a menu on the left,
a login status on the right top...)
A very easy example just to get the idea could be:
class MySitePage():
def render(self):
self.header()
self.menu()
self.login_status()
self.content()
self.footer()
Each method must output HTML and can/must be specialized
in subclasses...
The thing that I appreciate about this approch is
the flexibility you get from inheritance.
I try to go a little bit further that separation
between content and presentation. I try to design
presentation in a OO way...
From what I've seen PTL is not flexible enough
to implement this approach... am I wrong?
Is it better to look into ZClasses?
Thanks for the help!
Paolo
More information about the Zope
mailing list