Personal tools
You are here: Home Documentation Tutorials Best Practices for Plone development Configuration management
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Configuration management

Managing different configurations across Plone sites is important. Too many people stick configuration in the ZMI, and have no setup scripts.

pupq

Based on the talk given by Joel Burton at the Plone Conference in Vienna, this Tutorial discusses some of the best practices for Plone development. If you are doing site development with Plone and want to keep your sanity, this is a must-read. Requires some familiarity with Zope and Plone.
Page 4 of 9.

Throw out your database. It's liberating. —Kapil Thangavelu

Everyone that's worked with Zope for more than a few months has encountered "ZODB Dread": that awful, sinking feeling that you've sunk a chunk of your very life into a single, binary-format object database, with no hope you'll ever be able to remember all the scripts, skins, properties, and settings you've put into it. You konw that if this puppy ever gets badly corrupted, you're going to be in a world of hurt. This is what we want to avoid, and that's why we create setup code on the file system.

Writing Setup Code

General advice:

  • Each setup function is method that you can call independently.
  • Registry of functions.
  • Can either prevent calling twice, or delete and re-create, as appropriate.

How I Learned To Stop Worrying and Love the API

DocFinderTab
DocFinderTab gives you instant, through-the-web access to the API for any object you can get to in the ZMI. In many ways, it's nicer than looking through the source code, since you see all the methods of the base classes, and nicer that looking in the debugger, because you get things arranged by base class. This product is dead simple to install and use. There's no excuse for not trying it out today. This really should get shipped as part of Zope.
Epydoc
Epydoc is a smarter and more featureful version of the pydoc module that ships with Zope. It builds handsome, indexed API documentation for your product, or even for Zope and Plone itself. It can even generate this as a PDF, which impresses clients and saves you time in creating this kind of documentation. Plus, actually seeing your docstrings typeset is a good incentive to write better ones.
Other products' Install.py files
A great way to see how to configure things is to see how other products do it, of course. Look at the Install.py for your favorite product. For example, to learn how to install new workflows from disk, see how we do this in PloneHelpCenter (in the collective.)

CMF 1.5

Includes a XML dumper for many (but not yet all) CMFCore/Default tools
So, you can make the changes in the ZMI, quickly and intuitively, then get a snapshot of these chages. These snapshots can be checked into your version control system, diff'ed, etc. And you can restore from a snapshot, makig it easier to step back to a different setup.
Won't need to make API calls
For most things, at least.

CMF 1.5-compatibility and dumpers for our tools might land for Plone 2.1.

 
by pupq — last modified December 10, 2005 - 21:43 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by