[Zope] Zope products, ZClasses, Database rows, XML or what?
Dylan Reinhardt
Dylan@DylanReinhardt.com
Sat, 19 Oct 2002 15:42:31 -0700
You raise an excellent point that ZClasses and CMF is going to be a much
quicker way of going in many cases. Just learning Python is probably
enough to take on for starters. :-)
>Zope product development often does not favor idioms of
>the GoF suggestions, such as favoring composition to inheritance.
I'm not really sure how that's true. What is Zope itself, but an example
of composition on a grand scale?
At the product level, design is left almost entirely up to the individual
programmer. If you are so inclined, you can create a library of small,
flexible classes that can be imported and instantiated at
will. Voila! Composition. About all you really *need* to inherit are the
stuff that allows you to hook into the Zope roles, acquisition, and
persistence systems.
In any event, I was thinking a bit more generally about the larger benefit
of reading Design Patterns, not really about the degree to which Zope
implements specific ideas. Design Patterns may not have been written with
Zope in mind, but it's a great tool for putting yourself in an OO frame of
mind. But it isn't light reading, and if you're looking for quick results
instead of personal growth, you may be far better off going right to the
ZClasses and CMF.
Dylan
>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 )