[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Using Basic Zope Objects

webmaster at zope.org webmaster at zope.org
Sat May 29 23:33:31 EDT 2004


A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/BasicObject.stx#3-15

---------------

      Both ZPT and DTML are fully supported in Zope, for now and in
      the future.  Because ZPT and DTML have an overlapping scope,
      many people are confused about whether to choose one or the
      other for a given task.  A set of "rules of thumb" are
      appropriate here:

       - ZPT is the "tool of choice" if you have a mixed team of
         programmers and nontechnical designers.  Design tools like
         Macromedia Dreamweaver do not "stomp on" ZPT embedded in a
         page template, while these tools *do* "stomp on" DTML tags
         embedded in an HTML page.  Additionally, any given ZPT page
         template is typically viewable in a browser with "default"
         (static) content even if it has commands embedded in it,
         which makes it easier for both programmers and designers to
         preview their work "on the fly".  Dynamic DTML content, on
         the other hand may not be "previewable" in any meaningful way
         until it is rendered.

       - Use DTML when you need to generate non-XML, non-HTML, or
         non-XHTML-compliant HTML text.  ZPT requires that you create
         pages that are XHTML and/or XML-compliant.  ZPT cannot add
         dynamicism to CSS style sheets, SQL statements, or other
         non-XML-ish text.  DTML excels at it.

       - DTML may be easier for some programmers to write because it
         provides greater control over "conditionals" ("if this, do
         this, else, do that") than does ZPT.  In this respect, it
         more closely resembles languages such as PHP and ASP-based
         scripting languages than does ZPT, so it's typically a good
         "starting place" for programmers coming from these kinds of
         technologies.

       - DTML code can become "logic-heavy" because it does not
         enforce the "separation of presentation from logic" as
         strictly as does ZPT.  Embedding too much logic in
         presentation is almost always a bad thing, but is
         particularly bad when you are working on a "mixed" team of
         programmers and designers.  If you're a "separation of
         presentation from logic" purist, you will almost certainly
         prefer ZPT.

        % Anonymous User - May 29, 2004 4:03 am:
         "Somebody" likes their "quotation marks" a "little" too much

        % Anonymous User - May 29, 2004 11:33 pm:
         People like making stupid comments in the documentation too much.



More information about the ZDP mailing list