[Zope] Zope products, ZClasses, Database rows, XML or what?

sean.upton@uniontrib.com sean.upton@uniontrib.com
Sat, 19 Oct 2002 15:07:09 -0700


First, IMHO, while the GoF Design Patterns books is one of my favorite
recent reads, I think this is a bit of a misdirection for the poster's
problem at hand.  Zope product development often does not favor idioms of
the GoF suggestions, such as favoring composition to inheritance.
Frameworks such as the CMF that really attempt to go the extra mile to have
smart, component-oriented, pluggable design are a notable exception.  Zope 3
experimentation is largely based on interoperating components and
compositional patterns.

In the long term, I would take the Python product route.  The Zope Bible is
not a bad read for doing product development, though it is likely the road
to getting there will involve some mailing list questions...

In the short term, I'd at least use the CMF as a starting point, and even
consider ZClasses for your initial prototyping.  My approach to this problem
domain would start with the CMF and end with hybrid storage patterns, and a
few custom content types for the items of a book "catalog."  I would then
extend those content types with skins that decorate that content using ZSQL
methods as skin methods to keep related tabular material in a relational
database, keyed off of the path/identifier of the content item in the CMF.
In the simplest case, if the book entries themselves are the center of your
universe, make them CMF content stored in portal folders in the ODB and add
actions/skin-methods around them that decorate them with associated content
in an RDB.

This may involve using ZClasses as a prototyping tool for CMF content, using
the FAQ example on cmf.zope.org as a guide.  But once you can create this,
the rest of your work in primarily in skins and RDB work (setup databases,
do your ZSQL methods, etc), which can be done entirely though the web, with
very little need to get into anything really ugly.

Sean

-----Original Message-----
From: Dylan Reinhardt [mailto:Dylan@DylanReinhardt.com]
Sent: Friday, October 18, 2002 10:05 PM
To: zope@zope.org
Subject: Re: [Zope] Zope products, ZClasses, Database rows, XML or what?


My $.02:

Obviously, whatever you feel comfortable in is going to be the best 
solution for you.

Even so, Zope is clearly the superior choice.  :-)

If you want to do anything moderately interesting, my very best advice 
would be to get to work learning Python and start making products.  As nice 
as Zclasses are for getting going quickly, products are where the real 
power of Zope is.

That said, making effective products involves not only understanding Zope, 
but Python and OO programming.  Some books I'd recommend:

Learning Python, Mark Lutz
Python Standard Library, Fredrick Lundh
Design Patterns, Gamma et al.

OK, so Design Patterns isn't exactly light reading.  But if you really want 
to see the logic behind how Zope is set up, it's all in there.  Zope and 
Python are very heavily engineered environments and understanding the 
theory is a great way to get going in them.

There are also at least five books on Zope out there, a couple of which 
give some pretty thorough treatment to products.

HTH,

Dylan

At 12:32 AM 10/19/2002 -0400, you wrote:
>Hi,
>
>After having studied Zope for about a month (in my spare time) and
>having read this list's messages during that time, I'm still
>ambivalent as to what to use for a website I'm developing.
>
>For example, several of the pages in the website will each be
>dedicated to an individual author. Each page will feature a short
>bio, a list of books authored, possibly a list of articles
>authored, and links to interviews and other interesting web
>sites/pages about or by the author. Each book in a list could
>have information about when it was published, ISBN, any awards
>received, links to reviews, links to one or more sources where
>the book can be purchased, and other interesting details. In some
>cases, the book could have a link to its own detailed page, within
>the website. (No, it's NOT Amazon II ;-)
>
>Prior to discovering Zope I had been working on implementing this
>with PHP, possibly combined with a relational database such as
>PostgreSQL and/or XML/XSL. With Zope, I have started working on
>the rendering using Page Templates. However, I'm still undecided
>as to what is the best way to handle all the data and content.
>
>Some of the recent messages indicate that ZClasses are not the
>way to go, that one should use Products, but the Zope Book
>(Extending Zope) describes products as being implemented with
>ZClasses or in Python (which I've been trying to learn too). The
>book also briefly describes support for XML but there is no
>mention of XSL, presumably because ZPT is the preferred
>mechanism for rendering different views. And of course, there
>is Gadfly and the relational DB adapters, which potentially
>would allow storing most of it in, say, PostgreSQL, my original
>preference, because this could hold lots and lots of data.
>
>I've also taken a look and installed CMF, but it doesn't
>appear to be a good match, since most of the content will not
>be long text articles, but rather short classifiable information
>about a given topic.
>
>I realize there's no single answer and that each solution has
>different costs, learning curve, future flexibility, etc.
>associated with it. I hope that input and feedback from the
>list will help in reaching a decision. Thanks in advance for
>any comments and suggestions.
>
>For reference, I've been using 2.5.1 on WinXP, but the target
>will most likely run on Linux.
>
>Joe
>
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )