This section of Plone content management system Developer Documentation is no longer under active maintance. The section is included as the reference for older technologies (Plone 2.x, Plone 3.x). Some of the practices described in this documents may still work, but are not recommended to be used in your active Plone development. Use at your own risk.
If you arrived at this page by a web search we recommend to also see the Plone Developer Documentation front page .
How to get started with Plone development.
Plone is developed in the Python programming language. You should master Python basics before you can efficiently customize Plone. If you are very new to Python, Plone or software development, it is suggested that you read the Professional Plone 4 Development book before you attempt to develop your own solutions.
If you quickly want to learn about current best-practices in developing with Plone you should also work through the Todo list application tutorial.
Plone runs on the top of the Zope 2 application server, meaning that one Zope 2 server process can contain and host several Plone sites. Plone also uses Zope 3 components. Zope 3 is not an upgrade for Zope 2, but a separate project.
Internally, Plone uses the objected-oriented ZODB database and the development mindset greatly differs from that of SQL based systems. SQL backends can still be integrated with Plone, like for any other Python application, but this is a more advanced topic.
It is recommended that you do Plone development on Linux or OS X. Development on Windows is possible, but you need to have much more experience dealing with Python and Windows related problems, so starting on Windows is not so easy.
See installation instructions for how to create a Plone installation suitable for development.
If you lack programming skill or resources, you can still get some things done in Plone:
By default, Plone runs in a production mode where changed files in the file system are not reflected in the served HTML. When you start developing Plone you need to first put it into a debug mode.
Plone sites can be customized by installing Plone add-ons, which add or customize functionality. You can install existing add-ons that others have developed or you can develop and install your own add-ons. Add-ons are developed and distributed as Python packages. Many open-source Python packages, including Plone add-ons, are available from PyPI (the Python Package index).
Plone uses a tool called Buildout to manage the set of Python packages that are part of your Plone installation. Using Buildout involves using the buildout.cfg configuration file and the bin/buildout command.
In prior versions of Plone and Zope, add-ons were referred to as "products" and they were installed by copying them into a special folder called products. This method is now deprecated in favor of using standard Python packages, managed by Buildout.
See the Installing add-on packages using buildout section for more details.
Since Python egg package structure is little bit complex, to get started with your first add-on you can create a code skeleton (scaffold) for it using Plone ZopeSkel code templates.
There are different scaffolds for different kind of add-ons. The most typically used are plone3_theme, archetype (create Archetypes content), dexterity (create Dexterity content) and plone (barebone Plone add-on).
Please read how to use ZopeSkel to bootstrap your first add-on.
If you want to create a package with Dexterity content types please read about creating a Dexterity project.
You never edit Plone files directly. Everything under parts and eggs folders in your Plone installation is downloaded from the Internet and dynamically generated by Buildout, based on buildout.cfg. Buildout is free to override these files on any update.
You need to have your own add-on in the src/ folder as created above. There you overlay changes to the existing Plone core through extension mechanisms provided by Plone:
Plone development always happens on your local computer or the development server. The changes are moved to production through version control system like Git or Subversion.
The best practice is that you install Plone on your local computer for development.
Plone add-ons usually:
A lot of Plone functionality is built on Zope 3 development patterns like adapters and interfaces. These design patterns take some time to learn, but they are crucial in complex component based software like Plone.
Plone must be started in the development mode using bin/instance fg command. Then
Please note that Plone development mode does not reload .py or .zcml files by default. This is possible, however. Use the sauna.reload package to make Plone reload your Python code automatically when it is changed.
Some aspects of Plone can be changed through the Zope Management Interface (ZMI). Documentation here does not focus on extending functionality through the ZMI because this method is severely limited and usually can take you only half way there.
We have a tutorial introducing the basics of Plone development.
The tutorial covers a basic form, a custom content-type, and a dynamic view. It also has detailed sections on building a development environment, installing Plone, and creating an add-on package for your development code.
Zope 2 book. This describes old Zope 2 technologies. The book is mostly good for explaining some old things, but '''do not''' use it as a reference for building new things.
The chapters on Zope Page Templates however are still the best reference on the topic.
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.
For basic information about updating this manual and Sphinx format please see Writing and updating the manual guide.