If this is the first time you have ever heard of Plone, should you use it? If so, how would you start and get a feel of what it can do?
Plone is a content management framework built on top of Zope. It is the most popular application using Zope. Plone continued to use Zope 2 and did not migrate to Zope 3 application server as the migration cost was considered too high. Zope community also realised that it was better to enhance Zope 2 with the new component architecture features, which were the core of Zope3 architecture. This has enabled projects to enhance their applications without having to redesign or rewrite the whole system. As a result, Plone 4 finally is using the current release of Zope. It is also using Python 2.6 instead of Python 2.4.
The Plone community has also made it relatively easy to migrate from Plone 3 to Plone 4 in spite of the major changes in it. However, the focus of this article is that if you were starting afresh with Plone 4, how would you get started?
A major concern with a complex application, which is built on top of many components, is to ensure that all the pieces fit and just work. An upgrade in one component may break the system. Hence, it is desirable to work with a known set of versions. Installation technique used by Plone is the Zope Buildout. Zope Buildout uses a list of specified Python egg versions to build and install a local Plone environment. It builds Python 2.6 environment by default so as not to depend on the distribution to provide a supported version.
You will need to download the current release of Plone's unified installer, version 4.1 at the time of writing. You will find the installation instructions in README.txt, but the simplest option is to run
$sudo ./install.sh standalone
You will find that the installation in /usr/local/Plone directory, with sub-directories: buildout-cache, Plone-docs, Python-2.6 and zinstance. The role of the first three directories is pretty clear. This leaves zinstance, which must then contain the Zope instance of the Plone application. The installer also creates a user plone, which will be used to run the Plone server.
You will be woking in /usr/local/Plone/zinstance for running Plone related commands and altering Plone configuration files. Start the Plone server by
$sudo u=plone bin/plonectl start
You can now browse the site at http://localhost:8080. The start up page offers you a button to create a Plone site (Fig 1). Once you have done that, you will want to create one or more users of the site. You need to select Site Setup option from the upper right corner, which will give you the option of Users and Groups. You may create a user named writer, who will be adding content to the site. This user need not be a member of any of the suggested groups. However, you will want to add the role of a Contributor in addition to the role of Member.
Plone organises the content in Folders much like the desktop paradigm. Hence, as an administrator, create a folder, Articles. You can do this on the home page using the Add New ... option.
The newly created folder will be shown and its state would be Private. You should change it to Published.
Now sign in as the user writer. You will notice that the options available to the user are fewer. You can add a page in the Articles folder tab. You may enter the content using a visual editor. If you like writing html text by hand, you have the option to do so as well! Create your first article. Its state will be private and you will notice that you may submit the article for publication but cannot publish it. Do so and the state changes from Private to Pending Review (Fig 2).
Publishing can be done by a user with the role of Reviewer. The administrator has all the privileges, so at present you may use the administrator account to publish the article.
Clicking on Articles will display items within the folder. This is normally not very attractive. Hence, you may choose the Display option to 'Select a content item as default view'. Try it and see the difference.
A great capability of Plone has been to easily manage content objects based on schema definitions and not just html pages. Archetypes has been the framework for this task. Further, ArchGenXML converts your schema in UML to working Python code for Plone. See http://plone.org/documentation/kb/archgenxml-getting-started/ to get an idea of the possibilities.
However, the future seems to belong to another package – Dexterity. It is an example of an enhancement in Plone which has leveraged the Zope 3 technologies. For me, the most interesting part was that it is using the grok framework behind the scenes. So, you get a content management system which is extensible by a model driven system. Possibilities are immense. Grok, incidentally, is functionally analogous to Rails or Django.
Currently, Plone does not include Dexterity in the core. So, you will need to install it. Modifications to the buildout configurations can be confusing in the beginning. In the zinstance directory, you will find a number of cfg files. The key file is buildout.cfg.
You need to tell buildout about a suitable set of versions needed for Dexterity. You can find the latest set at http://good-py.appspot.com/release/dexterity/. You should change the extends section of buildout.cfg to look like:
You will also need to include the egg for Dexterity in your Plone instance. The eggs section in your buildout.cfg will look like:
You should stop Plone and run buildout. If all is well, then start Plone.
$ sudo u=plone bin/plonectl stop
Sign in as the administrator. From the Site Setup page, choose Add-ons. You should see an option 'Dexterity Content Types - Plone Integration 1.0rc1'. Activate it. The Site Setup should now include the option “Dexterity Content Types”. Selecting it will allow you to create a new content type. Create a new type called Resume. Now edit it to add fields, e.g.:
Title – a text line, i.e. a
You can select the settings option of each field to change some of the attributes, e.g. required. In particular, you use the field name Title as it is needed by Dexterity. However, you want to store the name in it. So, replace the default label Title by Name. Select the behavior option and disable 'Dublin core metadata' to ensure that it does not show additional fields - Title and Summary.
You should now create another folder, Authors from the home page. You may notice that there is now an additional content type Resume. For the Authors, in Add new, choose Restrictions and allow only content of the type Resume to be added. Now, if you add a Resume, you will get a form.
Once the form is filled and published, all users will see a pretty decent html page for it (Fig 3).
Capabilities like customising CSS and themes for a great looking site are obviously possible. In case you need proof, have a look at the University of Washington site – http://plone.org/support/sites/university-of-washington.
Plone 4 with Dexterity enhancements based on grok makes it an even more exciting framework. It should definitely be an option considered by anyone looking at a new content management framework.
Exploring Software >