[Zope] <% ... %> ?

Paul Everitt Paul@digicool.com
Fri, 11 Jun 1999 13:54:34 -0400


Jules wrote:
> Has it been suggested that the SSI-type syntax of Zope isn't the most
> readable thing in the world? Is this even the right list to 
> suggest this
> heresy or should I strap on the asbestos underwear and wander 
> over to zopedev?

I'll comment first on the multiline statement.  Let me reinforce the
idea that The Zope Way is to separate presentation and logic.  While we
should have some kind of object that better deals with logic, I don't
think there will be much sympathy for creating something that looks like
ASP or PHP.

Let me limit the conversation back to your subject line: <% vs. <!--#

The latter was originally chosen to be like the dominant syntax at the
time (SSI) and to be "legal HTML".  I think the latter has proven to be
total bunk, as almost no DTML Documents are valid (they get nearly
everything from the fragments of standard header and footer).

What are some reasons to consider changing from the SSI syntax?

  o It's hideous, cumbersome, and everybody hates it

  o No tools support editing it

  o It isn't conformant with the direction of HTML

  o Any others?

Let's evaluate the situation in light of these.

It's Hideous
------------

Yes.

Tool Support
------------

The SSI syntax just happens to enjoy nearly zero support out there.
Things like Netscape Composer, Dreamweaver, and Emacs HTML Mode just
can't be convinced to handle it nicely.

Does anyone view this issue as important?

Future of HTML
--------------

What role does SSI play in the future of HTML?  Zero.  Of course,
neither do any of the alternative syntaxes mentioned previously.

Thus, I'd like to list some requirements for a future syntax:

1) Within reach of "content managers".  I won't budge on this one.  I
think XSL will have a role in Zope, but *NOT* as a DTML replacement.

2) Reasonably close to DTML.  The current DTML accomplishes some level
of functionality.  While some small amount might not be permitted in
some change, or might be permitted in a clumsy way, there should be a
reasonable match.

3) Coherent with the HTML future.  We have a choice: invent a syntax
and, one by one, support every web authoring tool.  Alternatively, we
can stick to standards and wait for them to support it.

Proposal
--------

_If_ these were the requirements, then I think a reasonable proposal is
XHTML:

  http://wdvl.com/Authoring/Languages/XML/XHTML/

  http://www.w3.org/MarkUp/#future

XHTML reworks HTML as an XML-compliant language.  Most imporantly, you
can extend it with new namespaces (like Zope instructions) without
breaking the DTD, as is the case with ColdFusion et al.

Why?

1) Alledgely it is the future of HTML.

2) Becoming well-formed means the authors can be given hints before
saving changes, and Zope can do smarter things with structured data on
the server.

Why Not?

1) A number of differences with HTML might drive people off.

2) It isn't here yet.

3) Zope syntax might not be mappable into XML.

At any rate, I'd love for someone in the Zope community to march off and
take a look at this, then make a proposal for how things should be
changed.  As always, patches are accepted. :^)

--Paul

Paul Everitt       Digital Creations
paul@digicool.com  540.371.6909
-----------------------------------------
The Open Source Zope application server
http://www.zope.org/
-----------------------------------------