Welcome to Zope.org
Copyright O'Reilly, 2000. All rights reserved.
This is an early draft chapter from a forthcoming book on Zope, to be
published by O'Reilly & Associates. The material has not been through
O'Reilly's editorial process, nor has it been reviewed for technical
accuracy. O'Reilly & Associates disclaims responsibility for any
errors in this draft and advises readers to use the information
contained herein with caution.
O'Reilly & Associates grants readers the right to read this material
and to print copies or make electronic copies for their own
use. O'Reilly & Associates does not grant anyone the right to use this
material as part of a commercial product or to modify and distribute
it. When O'Reilly & Associates publishes the final draft of this book
in print form, the content will be made available under an open
content license, but this chapter is not open content.
If you have any comments on the material in this chapter, you should
send them to the authors, Michel Pelletier and Amos Latteier, at
docs@digicool.com.
Preface
About This Book
This book is about Zope, the Open Source application server that
is fundamentally changing the way people think about web
information.
What Is Zope?
Like all good breakthrough software, defining Zope can sometimes
be hard. We'll make it easy by starting with the cookbook
definition.
Zope is an Open Source application server, focusing on content
management, portals, and custom services. Zope specializes in
rapid deployment of rich services to diverse audiences.
There are three key ideas in Zope: more power for more people, all
tiers as managed content, and web components.
More Power For More People
Zope was originally designed for a newspaper business model,
where the Zope customer (the ISP) had many customers
(newspapers) that in turn had many customers (the newspaper
customers). To scale in this environment, Zope had to embrace
the idea safely delegating control at each stage to customers
below you in the website.
Safely delegating control came to require many things. First,
you had to present information in a way people could understand.
Most people think of clicking on folders, not issuing SQL
statements, so Zope got a hierarchical object database that felt
like a filesystem. Giving crude, admin-intensive, command-line
logins wouldn't work, so all of Zope became managed through a
web browser. You don't want your customers to shoot you in
the foot, so Zope got an undo facility to let people recover
from any change they made.
These and innumerable other features made Zope a
highly-differentiated environment for programming and authoring
web content. Releasing Zope as Open Source provided the power
for business decision makers to know they were in control of
their technology decisions.
Thus, more power for more people is the key values statement
for Zope.
All Tiers As Managed Content
Classic web applications have a common approach. For example,
let's use the common "three tier" model, where an application
has a presentation tier, a logic tier, and a data tier.
Most websites have the presentation material in one place on a
filesystem, managed by one class of users. The logic is managed
using other tools in another place on the filesystem. Finally,
the data are managed in another place, usually a relational
database server.
This model cleanly enforces the logical separation of tiers.
However, it means there are three tools, two storage locations,
two sets of user information, two facilities to cluster, etc.
Worse, none of management of those three tiers is particularly
web-friendly.
In Zope, all tiers are managed content that get a common set of
services: security, web-based management, cataloging, workflow,
clustering, syndication, etc. By representing all tiers as
"objects" in the Zope framework, new models and consistent
services can be applied.
All tiers as managed content is the architectural key idea in
Zope, and is a tremendous differentiator.
Web Components
The Web is now the platform. That is, the web has evolved
enough standards and APIs that creators of services, products,
and technology can think in terms of the web as the
architectural model.
Evidence of this is sprouting up in many locations. Microsoft's
".NET" architecture envisions a world of web components running
on remote systems, providing specific services to any
application in the world. People sitting in front of browser
wouldn't be the only use of the web.
Tim O'Reilly also discusses this vision, posing the question
"Should Amazon have an API?" In this model, a website allows
itself to be used in ways never predicted beforehand by
publishing connectors other programs can use in new ways.
Zope is uniquely positioned for this future model. In Zope,
"programs" have URLs that can be used just as if the program was
being run locally. The facilities used for this are the same
standards in the vision of "web components".
This model of web components is the vision key idea for Zope.
While the model is compelling and gathering steam, at this point
it is still forward-looking.
Who Is Zope For?
It takes a lot of people working together to create web services:
Consumers use the site to locate and work with useful content.
Business Users create and manage content in the site.
Site Designers administer the look and feel.
Site Developers program the services in the site.
Administrators keep the software and environment for the site
running.
Information Architects make the decision for the platform and
keep track of the big picture.
Zope is a platform in which Site Developers create rich services
to be turned over to Site Designers and Business Users.
As a platform, Zope can host Zope products that are focused on
different audiences. For instance, Squishdot is a popular weblog,
written in Zope, that is useful "right out of the box". Squishdot
users might never realize Zope is underneath. Other Zope
products, such as Digital Creations' content management system,
take the same approach to covering audiences not targeted by Zope.
What Do You Need Zope for?
- Dynamic Content
You want to your web site to tailor its
presentation to its users, integrate information in databases and
provide users with searching. You'd also like to make your web
site automate and facilitate your business processes. Can your web
site react intelligently to visitors to provide a compelling
experience?
- Web Site Management
A small web site is easy to manage, but a
web site that serves thousands of documents, images and files
needs to provide you with powerful management tools. Can you
manage your site's data, business logic and presentation all in
one place? Can you keep up with your content, or is it getting out
of hand?
- Security
When you deal with lots of web users, security becomes
very important. It is crucial to organize users and be able to
safely delegate tasks to them. For example folks in you
engineering department need to be able to manage their web pages
and business logic, designers need update site templates, and
database administrators need to manage database queries. Can your
system handle thousands of users, perhaps linked to your existing
LDAP or other databases with flexible security rules?
- Network Services
Right now most web sites serve users, but soon
web sites will need to serve remote computer programs and other
web sites. For example, you'd like to make your news items
automatically available to wire service web sites. Or maybe you
want to make products for sale on your site automatically
searchable from a product comparison site. Can you leverage your
existing data and business logic to create network services or
will you have to start over from scratch?
- Integration
Your content is strewn all over the place,
relational databases, files, web sites, FTP archives, XML; can you
unify your data into one coherent application? Does your system
support web standards so that you can integrate content from
legacy systems and new systems that you will add in the future?
- Scalability
So you struck it rich and now your getting more
hits then you ever imagined. Now you need to handle a thousands of
times more traffic than before. Can you move your site to a
different database and server platform and spread the load across
multiple servers? Can your web site grow to handle your success?
What Zope Gives You
- Management Environment
The first thing you'll notice about Zope
is that it lets you manage your site's data, logic, and
presentation right in your web browser. This means that Zope is
easy to use and is remotely administrable. Zope lets you
collaborate with others to interactively develop your web site.
- Built in Tools
Zope comes with site management tools, a web
server, a search engine, database connectivity, security and
collaboration services, and more. Out of the box Zope gives you
everything you need to build a powerful web site.
- Standards Support
Zope excels at gluing together diverse data
because of its support for open standards. Zope supports Internet
- Open Source
With Zope you don't just get an application, you
get the source and a community. Since Zope is open source you are
not held hostage by a single vendor; your are free to use
distribute and adapt Zope to fit your needs. Zope also benefits
from an active user and developer community which improves Zope's
support, audits Zope's security, fixes bugs, and adds features.
- Extensibility
Zope can be extended in many directions. Third
party applications can be easily created and distributed. The
Zope community has produced hundreds of Zope add ons for
everything from credit card processing to web discussions.
Zope History
In 1996 Jim Fulton, the CTO of Digital Creations, had to give a
class on CGI programming. On the way back from the class, Jim
considered what he didn't like about traditional CGI based
programming environments. From these initial musings, Zope was
born.
Jim and Digital Creations went on to release three open source
software packages to support web publishing, Bobo, Document
Templates, and BoboPOS. These three components have evolved into
core components of Zope.
Back then, Digital Creations had developed a commercial
application server based on their three open source components.
This product was called Principia. Spurred by far-sighted
investor Hadar Pedahazur, Digital Creations open sourced Principia
in November 1998 and renamed it Zope.
Zope Community
Zope was one of the first tools of its kind to become open source.
Since opening up the code to Zope, the user base has grown
tremendously.
The Zope community consists of Zope users and developers. Many of
the community members are professionals, investing their time and
money into supporting Zope, others are just curious hackers,
learning how to use a cool new tool. The community gets together
occasionally at conferences but spends most of its time discussing
Zope on the many Zope mailing lists and web sites.
How the Book Is Organized
Part I
Chapter 1: Using Zope
The first part of the book covers the most important Zope concepts
and gets the reader up and running with Zope. By the end of this
part the reader should be able to use Zope to create and manage
simple but powerful web applications.
Chapter 2: Building Applications with Basic Objects
This chapter introduces "objects", which are the meat of Zope. It
covers what an object is in general and then goes on to introduce
the basic Zope objects: folders, DTML document, DTML method, file
and image. It should stress examples of how to use Zope objects and
how they work together to form basic applications.
Chapter 3: Dynamic Content and Scripting with DTML
This chapter introduces DTML, Zope's tag-based scripting language.
It describes DTML's use for templating and scripting and its place
in relation to other methods of scripting Zope. It covers DTML
syntax and the three most basic tags, var, if and in.
Chapter 4: Security
This chapter looks at how Zope handles users, authentication,
authorization, and other security related matters. Security is
central to Zope's design and should be central to web applications
that Zope users create.
Part II
Chapter 5: Advanced DTML Scripting
This chapter takes a closer look at DTML. It covers DTML security
and the tricky issue of how variables are looked up in DTML. It
also covers advanced uses of the basic tags covered in chapter 3
and the myriad special purpose tags.
Chapter 6: Scripting Zope
This chapter covers scripting Zope with more powerful tools than
DTML. This chapter covers how to write business logic in Zope. It
discusses the idea of methods in Zope, and focus on Python and
Perl methods. It describes how to write Zope methods and covers
method binding and security. Different methods (including DTML
Methods) are contrasted.
Chapter 7: Relational Database Connectivity
This chapter describes how Zope connects to external relational
databases. It covers the objects needed to connect to and query
databases along with Zope's features which allow you to treat
relational data like normal Zope objects. Also covered are
security and performance considerations.
Chapter 8: Searching and Categorizing Your Zope Site
This chapter shows how to index and search objects with Zope's
built-in search engine, the Catalog. It introduces indexing
concepts and discusses different patterns for indexing and
re-indexing. It covers using ZCatalog to index and search. Finally
meta-data and search results are covered.
Part III
Chapter 9: Application Design
This chapter looks at Zope application design. It covers issues
and solutions for building and maintaining large web
applications. It focuses on issues of management and scalability.
Chapter 10: Extending Zope
This chapter covers extending Zope by creating your own classes of
objects. The chapter does not cover Python Products. It discusses
ZClasses, and how instances are built from classes. It describes
step by step how to build a ZClass and the attendant security and
design issues. Finally it briefly discusses creating Python base
classes for ZClasses and describes the base classes that ship with
Zope.
Copyright O'Reilly, 2000. All rights reserved.
This is an early draft chapter from a forthcoming book on Zope, to be
published by O'Reilly & Associates. The material has not been through
O'Reilly's editorial process, nor has it been reviewed for technical
accuracy. O'Reilly & Associates disclaims responsibility for any
errors in this draft and advises readers to use the information
contained herein with caution.
O'Reilly & Associates grants readers the right to read this material
and to print copies or make electronic copies for their own
use. O'Reilly & Associates does not grant anyone the right to use this
material as part of a commercial product or to modify and distribute
it. When O'Reilly & Associates publishes the final draft of this book
in print form, the content will be made available under an open
content license, but this chapter is not open content.
If you have any comments on the material in this chapter, you should
send them to the authors, Michel Pelletier and Amos Latteier, at
docs@digicool.com.
|