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

nobody@nowhere.com nobody@nowhere.com
Fri, 20 Sep 2002 11:15:15 -0400


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/BasicObject.stx#1-0

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

  When building a web application with Zope, you construct the
  application out of objects. By design, different objects handle
  different parts of your application.  Some objects hold your content
  data, such as word processor documents, spreadsheets and images.
  Some objects handle your application's logic by accepting input from
  a web form, or executing a script.  Some objects control the way
  your content is displayed, or *presented* to your viewer, for
  example, as a web page, or via email.  In general Zope objects take
  three types of roles:

    Content -- Zope objects such as documents, images and files hold
    different kinds of textual and binary data.  In addition to objects in
    Zope containing content, Zope can work with content stored externally,
    for example, in a relational database.

    Logic -- Zope has facilities for scripting business logic. Zope allows
    you to script behavior using Python, Perl, and SQL.  "Business logic" is
    any kind of programming that does not involve presentation, but rather
    involves carrying out tasks like changing objects, sending messages,
    testing conditions and responding to events.

    Presentation -- You can control the look and feel of your site with
    Zope objects that act as web page templates. Zope comes with a tag based
    scripting language called the Document Template Markup Language (DTML)
    to control presentation.

    % Anonymous User - May 31, 2002 10:39 am:
     This three types are a bit artificial. I agree with the CONTENT. I also agree on the LOGIC section. But I am
     having some problems with the PRESENTATION layer. DTML (why did you not mention ZPT) is a mixture of LOGIC,
     CONTENT and PRESENTATION.
     After all I would say DTML belongs to the realm of LOGIC. It is a "programming" language and not "really"
     responsible for PRESENTATION. It is a means of bringing content into a site... but like HTML which mixes
     STUCTURE (<p></p> etc.) and PRESENTATION (<b></b>) it is neither fish nor flesh. CSS is an example for "pure"
     PRESENTATION.
     I read an article that said, ZOPE had a problem with the separation of CONTENT - LOGIC - PRESENTATION. To me
     it looks as if the explanation tries to show the opposite... well, it failed and creates an artifical and
     wrong separation of CONTENT, LOGIC and PRESENTATION.

    % Anonymous User - July 2, 2002 1:49 pm:
     Can somebody confirm this: DTML is going away and ZPT will play a bigger role?

     If this is the case, I don't want to learn DTML. Zope should have a section where both Zope and users can
     post any new "trend" or future changes.
     Thanks.

    % Anonymous User - Aug. 21, 2002 10:39 am:
     "...it is neither fish nor flesh." 

     Should be "neither fish nor fowl."

    % hansa - Sep. 20, 2002 11:15 am:
     Well, DTML is all of CONTENT/LOGIC/PRESENTATION, although only small chunks of CONTENT and LOGIC should be
     used and larger ones factored out.
     Templates synthesize the whole stuff into a (HTML) RESPONSE,
     so the separation of CONTENT/LOGIC/PRESENTATION is somewhat artificial.