[Zope-PTK] FYI: Transitioning to ZPT
Paul Everitt
paul@digicool.com
Sun, 18 Feb 2001 13:06:51 -0500
Howdy everybody. I wanted to get everyone informed on a future
direction for the CMF. (Reminder to all: PTK is changing, at long last,
to CMF, which means content management framework.)
Right now the skins use DTML snippets for all the pages in the site.
The skins facility also gives the following:
o Multiple installed skins
o User selection between skins
o Setting default skin for a site
o Each page in a skin gets a common look and feel
(from standard_html_header and standard_html_footer)
(Tres or Shane, does the skin facility allow any *logic* for the
selection of a skin during a request, such as per-browser skins? If the
portal_skins folder exposed a Python Script for this...)
As mentioned, each page in a skin is written in DTML. This will change
after the 1.0 release, but perhaps in the next three months, to Zope
Presentation Templates:
http://dev.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage
Here's the advantage from a CMF perspective. With these kinds of
templates, you don't have "snippets" of malformed, incomplete HTML.
Instead, you have full-fledged XHTML pages that can be edited in many
modern browsers. (Dreamweaver 4 apparently hates XHTML, alas.) You
also get, though, central look and feel through the equivalent of
standard_html_header and footer.
We at Digital Creations plan to move aggressively to this in our
consulting practice. Let me explain why and gather input.
Imagine you sit down with a prospective client that wants a CMS or
portal. Instead of sitting down with a blank whiteboard and saying,
"What do you want?", you start with a working portal and complete use
cases and ask, "How do you want to change it?"
With Adobe GoLive 5 (strong WebDAV and XHTML) driving a ZPT-based skin,
you open up the entire demo portal -- *live*. You start changing logos,
rearranging elements such as the toolbox, changing colors, etc. The
elements, though mocked up in GL, still retain the dynamic instructions
that allow them to work in Internet Explorer.
You also, though, start adding things that don't yet exist in the CMF.
For instance, you add a box that has a poll on the front page and a link
to poll results. You represent this with dummy HTML that will be
replaced by the ZPT when it is actually plugged into a component.
Thus, in real time, you are reskinning the site, retaining the existing
dynamicism and putting in plugin-points for to-be-developed dynamicism.
In fact, you could probably run a catalog query and find all the <div>
spots that haven't yet been finished -- that is, a to do list.
So that's a sneak peak of where we plan to take this over the coming
months and why.
ZPT is getting a *ton* of energy behind it here. Both Jim and Guido are
contributing. There's a release up now. I imagine it will be
architecturally stable in March and ready for production use in April.
If it proves itself, it will be moved into Zope and DTML will be used
much less extensively. But we might put it into the CMF before it
becomes a standard part of Zope.
We'll also encourage use outside of Zope. In fact, we hope to see ports
outside Python. For instance, PHP, Java, etc.
--Paul