[Framework-Team] Re: plone.app announcement

Martin Aspeli optilude at gmx.net
Thu Aug 3 22:27:23 UTC 2006


Sorry about delay... draft 2:

Hello all,

The Plone Framework team has, in consultation with the wider developer 
community, made an executive decision. :)

Going forward, there is consensus that we should use Zope 3 style 
programming practices whenever possible. One part of that is that things 
that don't need to be Zope 2 products shouldn't live in in 
$INSTANCE_HOME/Products/ - instead, they should be simple Python 
packages, living in $INSTANCE_HOME/lib/python or somewhere else on the 
PYTHONPATH that Zope is given when it starts up.

In doing so, we would like to impose the following guidelines for code 
that is part of Plone core.

  I. Generic components without specific Plone dependencies live 
directly under the top-level 'plone' namespace. A good example is the 
the Zope3-style 'plone.i18n' (http://svn.plone.org/svn/plone/plone.i18n).

It is desirable to factor out generic interfaces and code into such 
packages whenever possible, to foster re-use.

Packages should have as few dependencies as possible. Thus, if 
plain-Python will do, that is better than plain-Zope 3, which is better 
  than code that depends on specific facets of Zope 2.

  II. Extensions of such general components (or separate components) 
that provide a tighter integration with Plone-the-application should 
live in the secondary namespace 'plone.app'. See for example 
'plone.app.i18n' (http://svn.plone.org/svn/plone/plone.app.i18n).

Components that *need* to be Zope 2 products will most likely continue 
to live in $INSTANCE_HOME/Products still, at least for now. If possible 
(which it may not be), however, you should try to not depend on 
components being Zope 2 products.

  III. Packages in the svn repository should follow modern Python 
guidelines and provide the necessary information to be packagable as eggs.

The easiest way of achieving this is to use the ZopeSkel paste deploy 
script, as follows.

  1. Download ez_setup.py from

http://peak.telecommunity.com/dist/ez_setup.py

  2. Run ez_setup.py in Python:

   $ python ez_setup.py

This will install the 'easy_install' program, normally to the Place 
where the Python binary is found. Look in the log messages of the 
installation script to see where they land. For more information, see

http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install

  3. Install ZopeSkel:

   $ easy_install ZopeSkel==dev

This will install Paste Deploy and the 'paster' script in the same 
location as easy_install (again, watch the terminal output) and some 
Zope skeletons to use with this tool. To see them, run:

   $ paster create --list-templates

  4. To create a basic Plone package, run:

   $ paster create -t plone

It will ask you a number of questions and then generate the basic 
package layout. When asked for a project name, use the dotted name of 
the package, e.g. 'plone.i18n'.

To create a plone.app package instead, run

   $ paster create -t plone_app

When ready, import the package to the Plone svn repository.

To learn more about setuptools, see

http://peak.telecommunity.com/DevCenter/setuptools

in particular, see

http://peak.telecommunity.com/DevCenter/setuptools#development-mode

Should you have any questions, please ask on the plone-developers list.

Thanks!

Martin & the rest of the Framework Team





More information about the Framework-Team mailing list