Itamar Shtull-Trauring <itamar@maxnm.com>
Zope is a web application environment developed by Digital Creations - DC for short.
This document is not going to tell you why you should use Zope. Instead, it intends to point out resources that will allow you to learn how to use Zope. For an introduction on how Zope works, visit http://www.zope.org/WhatIsZope. In this document I describe the different levels of knowledge using terms I borrowed from Advogato http://www.advogato.org - Apprentice, Journeyer and Master. As you advance in your knowledge you will advance in your category, until at last you are a Master, and you to answer Newbies' questions.
If I refer to a file, unless I state otherwise this refers to a subdirectory of $ZOPEHOME/lib/python/. For example, If Zope is installed in /home/zope, then the file OFS/Image.py can be found in /home/zope/lib/python/OFS/Image.py.
I assume Zope is installed on your local machine, so that Zope can be accessed at http://localhost:8080.
Before you start using Zope, you're going to need to learn a few things which will help you understand how it works.
Python is the programming language in which Zope was written. Knowledge of Python is a must if you intend to start developing serious Zope applications, and will also help in understanding DTML and other basic parts of Zope. Zope currently uses Python 1.5.2, but in the future will be upgraded to use Python 2.x.
The main resource for Python is http://www.python.org. The documentation section at http://www.python.org/doc/ has most or even all of the info you need to learn Python, starting with the Tutorial http://www.python.org/doc/current/tut/tut.htmland moving onwards from there.
There a number of books written about Python -- there's a complete list at http://www.python.org/psa/bookstore/. I especially liked Python Essential Reference (http://bn.bfast.com/booklink/click?sourceid=10922&ISBN=0735709017) which as the title says, is an essential Python reference.
There's an introductory talk on Python at http://shell.rmi.net/~lutz/talk.html.
The Python development team's homepage is http://www.pythonlabs.com, and the Python CVS, bug reporting system is at http://python.sourceforge.net.
A nice tutorial on how the web works can be found at http://www.stud.ifi.uio.no/~lmariusg/download/artikler/HTTP_tut.html.
The main way to communicate with Zope is via the HTTP protocol, and it gets its arguments via the CGI protocol. Some knowledge of both can be indispensable for debugging certain problems.
You can find the basic info for HTTP at the W3C http://www.w3c.org. See RFCs 2616, 2617 and 1867. You can find nice HTML versions of the RFCs at http://community.roxen.com/developers/idocs/, and the HTTP 1.1 RFC (2616) at http://www.w3.org/Protocols/rfc2616/rfc2616.html.
You can learn about cookies at http://home.netscape.com/newsref/std/cookie_spec.htmland RFCs 2109 and 2965.
The main reference for the way CGI works can be found at http://Web.Golux.Com/coar/cgi/.
OK, you've installed the latest version of Zope (http://www.zope.org/Products/Zope). Now what?
The single most complete resource for newbies is the upcoming Zope book from O'Reilly, by Amos Latteier and Michel Pelletier. The book has not yet been published, but you can read the existing text at http://www.zope.org/Members/michel/ZB/. While not totally finished, the existing text contains major amounts of useful information, and it's getting better every day. All the resources I mention in the Newbie section probably have equivalent info in the Zope book, so check there first.
Another great resource is Zope's online help - this can be accessed by clicking the Help button in any management screen, or at http://localhost:8080/HelpSys. It includes help for management screens, an API reference for DTML developers, and in newer versions of Zope (2.2.3 and later) a DTML reference as well.
Other useful resources for newbies:
The ZCatalog is Zope's built in indexing and searching engine, used to catalog Zope objects. You can learn about it at:
Now that you've mastered Zope basics, its time to move on, and learn more about how Zope works internally.
In order to work with Zope's internals, you need to know its APIs. In addition to the public ones documented in Zope's online help, you can find more info about Zope's internal APIs by:
Extending Zope by adding Products is the standard way of creating advanced Zope applications. There are two main references for this:
ExtensionClass is a Python package that allows developers to create, in C, classes for Python that can be subclassed in Python. It's used for the Acquistion and Persistence support in Zope.
ZODB is Zope's built-in object database. Objects that are stored in it must inherit from the Persistence class (an ExtensionClass). ZODB is a transactional database.
DTML allows you to create your own custom tags. Check out the Mailhost product's <dtml-sendmail> tag in Products/MailHost/SendMailTag.py in your Zope install for an example, and also the MIMETools products (Products/MIMETools).
There's a Howto that explains how: http://www.zope.org/Members/z113/1.
ZCatalog and ZSQL searches can use ZClasses or Python classes as pluggable brains, to give some ``intelligence'' to the returned records. You can learn about them at http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.4.6.4.html.
Having mastered the knowledge required of a Journeyer and Apprentice, you are now a Zope Master. That doesn't mean there's nothing left fro you to learn - quite the opposite in fact. This is just an overview of the different topics you can look into in more depth.
Keeping up with the latest Zope developments is very important.
The ZODB is usually stored in a FileStorage type storage, in a file called Data.fs. However, you can store it in other types of storage as well:
ZEO extends ZODB by turning it into a distributed object database. This lets you serve the same Zope database from different machines, test development code on the same database as your live site, and other uses. Find out more at http://www.zope.org/Products/ZEO.
There are two sorts of caching - internal Zope caching and HTTP caching. For info on HTTP caching, check out http://www.mnot.net/cache_docs/. You can see of an example of how Zope implements these headers in OFS/Image.py in the FILE class. Some information on using caching headers in Zope can be found at http://www.zope.org/Members/htrd/howto/caching?pp=1.
The next version of Zope (2.3?) will contain a Caching Manager that will allow internal caching: http://dev.zope.org/Wikis/DevSite/Projects/CacheManager/.
There a number of different products implementing discussion abilities for Zope. The two main ones are Squishdot (http://www.squishdot.org) and ZUBB (http://www.zope.org/Members/BwanaZulia/ZUBB).
ZPatterns is an advanced development framework for Zope, including an event model, generic data providers, and lots of really complex, cool stuff you'll really love once you figure out how to use them. Which can take a while. http://www.zope.org/Members/pje/ZPatternshas the product and some documentation.
Zope by default only lets you store users in the ZODB and authenticate using Basic HTTP Authentication. If you want to store your users in a SQL database, get them off LDAP, or authenticate using cookies, you need an alternative to Zope's User Folder.
The most advanced alternative is LoginManager (http://www.zope.org/Members/tsarna/LoginManager), that lets you plug-in different authentication methods and user sources. Getting users off SQL/LDAP/Windows/passwd is very easy, you just need to write the correct methods: http://www.zope.org/Members/jok/SQL_based_LoginManager is an example of how to use SQL. You can find other, less general, methods of getting users at http://www.zope.org/Products/user_management.
The Membership Product (http://www.zope.org/Members/Bill/Products/Membership) gives you support for membership - allowing users to join, choose a password, set their preference, etc..
PTK has everything you'd expect of a portal, and allows you to develop your own custom ones. The best example is of course http://www.zope.org, which is running an ancient version of the PTK. You can find out more at http://www.zope.org/Products/PTK.
Scheduling events in Zope can be done in two ways:
Zope has extensive XML support, including access to the ZODB using the DOM API. The next version of Zope will have support for XSLT and better XML and DOM support. You can find out more at the XML Wiki: http://www.zope.org/Wikis/zope-xml/FrontPage.
Zope can be accessed not only using HTTP, FTP and WebDAV, but also by RPC mechanisms such as XML-RPC.
The next or maybe next-next version of Zope will contain built-in session management (http://dev.zope.org/Wikis/DevSite/Projects/CoreSessionTracking/). Until then, you can choose from a number of different session Products:
There are a number of ecommerce products for Zope.
Yes, you can use Perl from Zope! http://www.zope.org/Wikis/zope-perl/FrontPageis the place.
SiteRoot is a nifty product that allows you to mess around with the way Zope thinks about its base URL. It allows you to do virtual hosting from Zope, and some more dangerous and useful stuff: http://www.zope.org/Members/4am/SiteAccess2.
There a number of products for internationalisation and localisation. You can find them at http://www.zope.org/Products/internationalization. The next version of Zope will contain some support for skinnable management screens - see http://dev.zope.org/Wikis/DevSite/Projects/SkinnableAndLocalizableObjects/
At some point, you're going to get stuck. That's when you need to ask someone for help. There's always someone nice on the mailing-lists or IRC who'll help you, so feel free to ask.
You can get commercial support for Zope from a number of companies, including of course Digital Creations: http://www.zope.org/Resources/ZSP.
Zope has a number of busy mailing-lists, on a number of topics including ecommerce, PTK and internationalization. For a full list of lists and instructions on subscribing visit http://www.zope.org/Resources/MailingLists. There are nice searchable archives of some of the lists at http://zope.nipltd.com/public/lists.html.
There's a busy #zope channel on irc.openprojects.net. Recent topics included bouncing sheep and LYX. Sometimes we even discuss Zope. Logs can be found at http://charizard.blazingfast.net/~irclord/zope-logs/.
Think you've found a bug in Zope? Submit it at http://www.zope.org:8080/Collector.