[Zope-dev] HiperDOM & xmlc

Lalo Martins lalo@hackandroll.org
Fri, 15 Sep 2000 15:42:08 -0300


On Fri, Sep 15, 2000 at 08:21:21AM -0400, Paul Everitt wrote:
> 
> I'm surprised that no one responded to this.  (Or maybe people did and
> our continual email server problems have lost it.)

Me too.

> I'd like to congratulate Hiperlogica, because they have (ding ding ding)
> the _right answer_! :^)

Thank you :-) We feel good about this answer too.

> Seriously, we at Digital Creations have been quietly formulating a
> proposal on this since Amos put up the template proposal in
> dev.zope.org.  I floated some trial balloons at EuroZope and it's clear
> there's some consensus.

Glad to know that.

> Our "XHTML Templates Proposal" is at:
> 
>   http://dev.zope.org/Wikis/DevSite/Proposals/XHTMLTemplatesProposal

It is not linked on the Proposals FrontPage...

--

Anyway, at least for HiperDOM I feel comfortable with the word
"template" because that's what it is about. The two primary
motivations for the design are:

* You can create the layout with any XML-compliant editor; if
the template is xHTML, you can use a XHTML-compliant WYSIWYG
tool. Or, thanks to the modern XML technology, you can use a
WYSIWYG HTML tool and pass it trough a SGML->XML filter to get
xHTML.

  Using specialized webdesigners with Zope project has been one
of the biggest pains in Zope development; we have to take the
sometimes ugly code generated by the tools they use, usually
clean it up, then insert the DTML tags in it. Making changes to
the design is a nightmare.

* The template looks like the rendered page; if you don't want
to fire up Zope, or if the application logic is not yet
finished, you can preview the layout by simply loading the
template in a browser.

These goals are similar, but not identical to the ones in the
proposal. Still, some parts of the proposal felt like extracted
rigth out of my mind :-)

I don't feel good about calling the layers "document" and
"view" or "presentation" and "data" because the "view" is not
strictly presentation code; invariant (static) parts shared by
all pages rendered with that template can be in the template.
As much as we all like to talk about "Web Applications", this
is not exactly like "normal" application design, where you can
draw a clear line between presentation and data (or model/view).

--

The only thing I _don't_ feel good about this kind of template
is that, in practice, we will probably lose the benefits of
things like <dtml-var standard_html_header> - meaning, when you
want to change the header of your site, you'll have to edit all
your templates.

Of course a site where this is a problem still _can_ use
"includes" like standard_html_header, but I believe most won't.

[]s,
                                               |alo
                                               +----
--
          Hack and Roll  ( http://www.hackandroll.org )
            News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo           mailto:lalo@hackandroll.org
         pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)    ---     http://zope.gf.com.br/BroDar