[Zope] Re: ColdFusion Vs. zope

Michael Bernstein mbernstein@profitscape.net
Wed, 10 Nov 1999 10:55:07 -0800


J0N47H4N 5Y wrote:
> 

> I gotta admit that the CFML language is really easy to learn, however it
> doesn't have very good inheritance structure like Zope does, it uses an
> INCLUDE statement a la C which can get quite confusing once you start to
> create multiple levels of includes.

Although ColdFusion does not have an inheritance structure, it does
support OO development somewhat through encapsulation. ie: you can
create an arbitrary bit of code that you would like to call in different
places and call it as a custom tag, with customizing properties if
needed. This is surprisingly effective, particularly if you use variable
name overloading to allow calling the code directly (through URL
parameters), form submission, or as a custom tag with attributes. By
writing a bit of additional code, you can also detect which namespace
the variable is in and customize the behaviour of your code
appropriately.

Of course, Zope lets you do essentially the same thing using DTML
methods.

Personally I never used <CFINCLUDE> for anything other than relatively
static page elements such as table structures and page headers.

Still more powerful is ColdFusion's <CFAPPLICATION>, which lets you
specify code that runs before executing every single page in it's
directory or direct subdirectories. This lets you create session and
global variables, check for the existence of cookies, etc. w/o having to
explicitely include the code in every page.

Zope can do the same thing using acquisition, although it's a bit less
intuitive. Just stick the code in standard_html_header ;^) Sessions
however, are not yet standardized, so you may have to roll your own.

HTH,

Michael Berenstein.