[Zope] Zope and Frontier Comparison

Michael Bernstein mbernstein@profitscape.net
Tue, 13 Jul 1999 14:34:14 -0700


You've misunderstood how Zope acquisition works, I'll try to explain as I go
through your posting.

Kam Cheung wrote:
> 
> > Zope uses acquisition, which is a pretty powerful concept, but not
> > exactly template oriented (it can use any object, including Document
> > Templates).  Perhaps you can give us an overview of how Frontier does
> > this?
> 
> Actually, the way how a Zope object acquires properties (or atrributes) is
> very similar to Frontier. The part that I feel Frontier is more advanced is,
> I don't need to put in the <!--#var abcHeader--> and <!--#var abcFooter-->
> in Frontier. It's much easier to illustrate it by an example. Let's say we
> have a site like this:

<stuff deleted>

> In Zope, inside the html objects, I will need to put in:
> 
>     <!--#var pageHeader-->
> 
>         Bodytext goes here!!!
> 
>     <!--#var pageFooter-->
> 
> Also, the pageHeaders and the pageFooters in FOLDER_A and FOLDER_B will be
> different, since FOLDER_B will acquire SITE_ABC.pageHeader and
> SITE_ABC.pageFooter, while FOLDER_A has its own pageHeader and pageFooter.
> 
> However, the object "template" here is useless. You can even say that the
> html object PLUS the header, footer, and other object that you put into the
> html object BECOME a template by itself. You can of course, built a
> index_html object that will read data from object on other part of the site.
> But it's up to your own to do that, Zope doesn't do this.

Ok here goes for the stuff you've overlooked:

If you know that you want the header and footer inserted into every document and
combined with bodytext, then all you have to do is define index_html in the site
root like this:

<!--#var pageHeader-->
<!--#var Bodytext-->
<!--#var pageFooter-->

and just insert a Bodytext method or document into the various folders, with
overriding pageHeaders and pageFooters where appropriate. You only need to place
index_html into a folder when your template changes. 

After this point you start to explain how frontier does this too, and how it's a
pity that Zope doesn't do this, so I'll just skip that. 

The point is, DTML documents and methods can be used to both hold content and
act as templates, it's up to you to decide how you want to factor your sites
functionality, layout, and content into the Zope object heirarchy.

HTH,

Michael Bernstein.