Zope
Encyclopedia
Zope is a free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 and open-source, object-oriented Web
World Wide Web
The World Wide Web is a system of interlinked hypertext documents accessed via the Internet...

 application server
Application server
An application server is a software framework that provides an environment in which applications can run, no matter what the applications are or what they do...

 written in the Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

. Zope stands for "Z Object Publishing Environment", and was the first system using the now common object
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 publishing methodology for the Web. Zope has been recognized as a Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 killer app, an application that helped put Python in the spotlight.

Over the last few years, the Zope community has spawned several additional Web frameworks with disparate aims and principles, but sharing philosophy, people, and source code. Zope 2 is still the most widespread of these frameworks, largely thanks to the Plone content management system
Content management system
A content management system is a system providing a collection of procedures used to manage work flow in a collaborative environment. These procedures can be manual or computer-based...

, which runs on Zope 2. BlueBream (earlier called Zope 3) is less widespread but underlies several large sites, including Launchpad
Launchpad (website)
Launchpad is a web application and website that allow users to develop and maintain software, particularly free software. Launchpad is developed and maintained by Canonical Ltd....

. Grok
Grok (web framework)
Grok is an open-source Web framework based on Zope Toolkit technology. The project was started in 2006 by a number of Zope developers. Grok has since then seen regular releases...

 was started as a more programmer-friendly framework, "Zope 3 for cavemen", and in 2009 BFG
BFG (web framework)
Pyramid is an open source web framework written in Python and is based on WSGI. It is a minimalistic web framework inspired by Zope, Pylons and Django....

 gained popularity in the Zope community as a minimalistic framework based on Zope principles.

History

The Zope Corporation was formed in 1995 in Fredericksburg, Virginia
Fredericksburg, Virginia
Fredericksburg is an independent city in the Commonwealth of Virginia located south of Washington, D.C., and north of Richmond. As of the 2010 census, the city had a population of 24,286...

 under the name Digital Creations, as a joint venture with InfiNet (a joint newspaper chain venture). The company developed a classified advertisement engine for the Internet, then in 1997 became an independently owned private company. The company's software engineers are led by CTO Jim Fulton. PythonLabs, creators of Python, became part of the company in the year 2000. Python founder Guido van Rossum
Guido van Rossum
Guido van Rossum is a Dutch computer programmer who is best known as the author of the Python programming language. In the Python community, Van Rossum is known as a "Benevolent Dictator For Life" , meaning that he continues to oversee the Python development process, making decisions where necessary...

 left Zope Corp in 2003.

What is now known as Zope 2 began with the merging of three separate software products – Bobo, Document Template, and BoboPOS – into the Principia application server. At the behest of its largest investor, Opticality Ventures, Principia was re-released as free software under the name Zope in 1998. Bobo, and therefore Zope, was the first Web object
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

 publishing solution.

In November 2004, Zope 3 was released. Zope 3 is a complete rewrite
Rewrite (programming)
A rewrite in computer programming is the act or result of re-implementing a large portion of existing functionality without re-use of its source code. When the rewrite is not using existing code at all, it is common to speak of a rewrite from scratch...

 that preserves only the original ZODB object database. It is directly intended for enterprise Web application development using the newest development paradigms. Zope 3 is, however, not compatible with Zope 2, so you cannot run Zope 2 applications on Zope 3. It was originally intended to introduce a backwards-compatibility layer so that Zope 2 software would run on Zope 3. Instead a module known as Five introduced the new Zope 3 paradigms into Zope 2, although full compatibility isn't possible that way either.

The existence of two incompatible Web frameworks called Zope has caused a lot of confusion. In response Zope 3 was in January 2010 renamed "BlueBream".

Technical features

A Zope website
Website
A website, also written as Web site, web site, or simply site, is a collection of related web pages containing images, videos or other digital assets. A website is hosted on at least one web server, accessible via a network such as the Internet or a private local area network through an Internet...

 is usually composed of objects in a Zope Object Database, not files on a file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 as is usual with most other Web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

 systems. This allows users to harness the advantages of object technologies, such as encapsulation
Information hiding
In computer science, information hiding is the principle of segregation of the design decisions in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decision is changed...

. Zope maps URL
Uniform Resource Locator
In computing, a uniform resource locator or universal resource locator is a specific character string that constitutes a reference to an Internet resource....

s to objects using the containment hierarchy of such objects; methods are considered to be contained in their objects as well. Data can be stored in other databases as well, or on the file system, but ZODB is the most common solution.

Zope provides two mechanisms for HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 templating: Dynamic Template Markup Language (DTML) and Zope Page Templates (ZPT). DTML is a tag-based language that allows implementation of simple scripting in the templates. DTML has provisions for variable inclusion, conditions, and loops. However, DTML has major drawbacks: DTML tags interspersed with HTML form non-valid HTML documents, and careless inclusion of logic into templates results in very unreadable code. ZPT is a technology that fixes these shortcomings. ZPT templates can be either well-formed XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 documents or HTML documents, in which all special markup is presented as attributes in the TAL (Template Attribute Language
Template Attribute Language
The Template Attribute Language is a templating language used to generate dynamic HTML and XML pages. Its main goal is to simplify the collaboration between programmers and designers...

) namespace. ZPT offers just a very limited set of tools for conditional inclusion and repetition of XML elements, thus the templates are usually quite simple, with most logic implemented in Python code. One significant advantage of ZPT templates is that they can be edited in most graphical HTML editors. ZPT also offers direct support for internationalization
Internationalization and localization
In computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...

.

Zope 2 underlies the Plone
Plone (content management system)
Plone is a free and open source content management system built on top of the Zope application server. In principle, Plone can be used for any kind of website, including blogs, internet sites, webshops and internal websites. It is also well positioned to be used as a document publishing system and...

  content management system
Content management system
A content management system is a system providing a collection of procedures used to manage work flow in a collaborative environment. These procedures can be manual or computer-based...

, as well as the ERP5
ERP5
ERP5 is an open source ERP based on Python and Zope. It has the particularity of being based on an unified Model to describe its implementation.- Unified Model :...

 open source enterprise resource planning
Enterprise resource planning
Enterprise resource planning systems integrate internal and external management information across an entire organization, embracing finance/accounting, manufacturing, sales and service, customer relationship management, etc. ERP systems automate this activity with an integrated software application...

 system.

Zope 3 / BlueBream

Zope 2 has proven itself as a useful framework for Web applications development, but its use revealed some shortcomings. To name a few, creating Zope 2 products involves copying a lot of boilerplate code – "magic" code – that just has to be there, and the built-in management interface is difficult to modify or replace. Zope 3 was a rewrite of the software that attempts to address these shortcomings while retaining the advantages of Zope that led to its popularity. BlueBream is based on a component architecture that makes it easy to mix software components of various origins written in Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

. Although originally intended as a replacement for Zope 2, the Zope Component Architecture has instead been backported to Zope 2 starting with Zope 2.8. Also many Zope platforms such as Plone are going through the same type of piece by piece rewriting. The first production release of the new software, Zope X3 3.0.0, was released on November 6, 2004.

Zope Toolkit

As a result of the development of Zope 3 / BlueBream, there are now many independent Python packages used and developed as a part of BlueBream, and although many of these are usable outside of BlueBream, many are not. To make it clearer which ones are independently usable, and also improve the re-usability of the packages the Zope Toolkit (ZTK) project was started. Thus the Zope Toolkit works as the base where each of the Zope-world frameworks builds on. Zope 2.12 is the first release of a Web framework that builds on Zope Toolkit, and Grok
Grok (web framework)
Grok is an open-source Web framework based on Zope Toolkit technology. The project was started in 2006 by a number of Zope developers. Grok has since then seen regular releases...

 and BlueBream are set to have releases based on the ZTK during 2010.

Grok

In 2006 the Grok
Grok (web framework)
Grok is an open-source Web framework based on Zope Toolkit technology. The project was started in 2006 by a number of Zope developers. Grok has since then seen regular releases...

 project was started by a number of Zope 3 developers who wanted to make Zope 3 technology more agile in use and more accessible to newcomers. Grok has since then seen regular releases and its core technology (Martian, grokcore.component) is also finding uptake in other Zope 3 and Zope 2 based projects.

Zope Page Templates

As mentioned previously, Zope Page Templates are themselves XHTML documents, which means they can be viewed and edited using normal HTML editors or XHTML compliant tools (a big advantage compared to other template languages used for Web applications). Templates can also be checked for XHTML compliance so you can be fairly confident that they will automatically expand into proper XHTML.

However, these page templates are not meant to be rendered as is. Instead they are marked up with additional elements and attributes in special XML namespaces (see below). This additional information is used to describe how the page template should ultimately be processed.

Here are some basic examples. To conditionally include a particular element, like a div element, simply add the tal:condition attribute to the element as follows:





To control what appears inside an element, use the tal:content attribute like this:



...


Finally, to introduce or replace values of attributes use the tal:attributes attribute as follows:
The power of python could also be utilised to dynamically alter the href at runtime.


...


This is a very cursory explanation of Zope Page Templates. The behavior of Zope Page Templates is almost completely described by a template language, fixed on TAL, TALES, and METAL specifications:
  • Template Attribute Language
    Template Attribute Language
    The Template Attribute Language is a templating language used to generate dynamic HTML and XML pages. Its main goal is to simplify the collaboration between programmers and designers...

     (TAL),
  • Template Attribute Language Expression Syntax (TALES
    Tales
    Tales can refer to:*the plural of tale*Tales , a series of role-playing games*Tales , an album by Marcus Miller*Tales of Silversleeve, an album by Cathy Davey*Tales of the Unexpected , an Anglia television series...

    ),
  • Macro Expansion Template Attribute Language (METAL
    Metal
    A metal , is an element, compound, or alloy that is a good conductor of both electricity and heat. Metals are usually malleable and shiny, that is they reflect most of incident light...

    ).

See also

  • Content management
    Content management
    Content management, or CM, is the set of processes and technologies that support the collection, managing, and publishing of information in any form or medium. In recent times this information is typically referred to as content or, to be precise, digital content...

  • Django
  • web2py
    Web2py
    Web2py is an open source web application framework. Web2py is written in the Python language and is programmable in Python. Since web2py was originally designed as a teaching tool with emphasis on ease of use and deployment, it does not have any project-level configuration files. Web2py was...

  • ERP5
    ERP5
    ERP5 is an open source ERP based on Python and Zope. It has the particularity of being based on an unified Model to describe its implementation.- Unified Model :...

  • Plone
  • Web content management
  • Zope Content Management Framework
    Zope Content Management Framework
    The Zope Content Management Framework is a series of free software tools for Zope that forms a framework providing many of the key services a content management system would need. The CMF can be used as a standalone product, or it can be built on top of, for example in Plone's or Nuxeo CPS's...

  • Zwiki
    Zwiki
    Zwiki is a wiki engine written in Python and based on the Zope web application server. It was developed by Joyful Systems and contributors from around the world, and is free software released under the GNU General Public License....


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK