Architecture: packages and dependencies#
This chapter describes the architecture of Plone's packages and dependencies.
Motivation#
Over the years, Plone has developed many indirections in its packages and dependencies. The goal in the long run is to untangle them and get a simple dependency graph. This document shows the current state, as an orientation to its architecture.
Overview#
There are multiple level of dependencies:
package level (
setup.py
/setup.cfg
/pyproject.toml
)Python level (imports)
ZCML level (includes)
testing (need for layers, such as functional testing)
Circular dependencies at the package level have now been resolved. Nevertheless, there is indirection on all other levels. Since Plone consists of a lot of packages, it is complex to untangle those.
Mental model#
This section describes a mental model that organizes Plone 6.1 packages into three groups separated by two packages that define the borders between these groups.
Borders#
In Plone 6.1, there are two packages that serve as dividing lines.
Products.CMFPlone
and all packages below it define the Plone core. Everything in here depends on theplone.base
.plone.base
is the border between the Application Server and Content Management Framework (CMF) with its dependencies.
Main components#
The following points describe the mental model.
Foundation:
Zope
core and its dependencies is the application server,the Zope component architecture (ZCA) framework and
some additional packages from the wider Zope ecosystem.
Then there are generic, standalone Plone libraries,
plus various other Python libraries.
Products.CMFCore
provides very basic content management features on top of Zope on which Plone relies.plone.base
defines several interfaces as contracts for the component architecture on which Plone is built. Additionally, it provides some base classes and utility functions that Plone often uses. It also depends onProducts.CMFCore
, and thereforeZope
. Additionally, it depends on generic functionality provided byplone.dexterity
,plone.behavior
, andplone.registry
.The space of many
plone.*
,plone.app.*
, and their related libraries defines the core of Plone.On top of this core, depending on these packages, is
Products.CMFPlone
, which is the package to depend on if the basic Plone core is referenced.On top of
Products.CMFPlone
are the following.The core APIs
plone.api
andplone.restapi
.There is distribution support in
plone.distribution
and specific distributions, currentlyplone.volto
andplone.classicui
.Core add-ons include Working Copy Support from
plone.app.iterate
, discussion support (plone.app.discussion
), and other add-ons.plone.app.upgrade
is the package to upgrade between Plone versions.
If you want to depend on the whole Plone with everything, you should depend on the package
Plone
. This meta package without any code depends on all other packages. It is what you want to install if you don't care about the details and get "batteries included".
The space on top of Products.CMFPlone
#
Add-on developers and integrators primarily interact with the dependencies on top of Products.CMFPlone
.
The following diagram visualizes this part.
You can zoom in on the diagram.
Detailed view of the architecture#
The following diagram provides a more detailed view of the whole architecture of Plone. You can zoom in on the diagram.
Packages in detail#
Looking deeper into those packages, there are more subdivisions which fall into three groups.
Above Products.CMFPlone
#
Plone
plone.api
plone.app.iterate
plone.app.upgrade
plone.restapi
plone.volto
Products.CMFPlacefulWorkflow
Between Products.CMFPlone
and plone.base
#
collective.monkeypatcher
plone.app.caching
plone.app.content
plone.app.contentlisting
plone.app.contentmenu
plone.app.contentrules
plone.app.contenttypes
plone.app.customerize
plone.app.dexterity
plone.app.discussion
plone.app.event
plone.app.i18n
plone.app.intid
plone.app.layout
plone.app.linkintegrity
plone.app.locales
plone.app.lockingbehavior
plone.app.multilingual
plone.app.portlets
plone.app.querystring
plone.app.redirector
plone.app.registry
plone.app.relationfield
plone.app.textfield
plone.app.theming
plone.app.users
plone.app.uuid
plone.app.versioningbehavior
plone.app.viewletmanager
plone.app.vocabularies
plone.app.widgets
plone.app.workflow
plone.app.z3cform
plone.browserlayer
plone.cachepurging
plone.contentrules
plone.formwidget.namedfile
plone.formwidget.recurrence
plone.i18n
plone.namedfile
plone.outputfilters
plone.portlet.collection
plone.portlet.static
plone.portlets
plone.protect
plone.resourceeditor
plone.rfc822
plone.schemaeditor
plone.session
plone.staticresources
plone.stringinterp
plone.theme
plonetheme.barceloneta
Products.isurlinportal
The foundation below plone.base
#
Plone world#
borg.localrole
plone.alterego
plone.autoform
plone.autoinclude
plone.batching
plone.behavior
plone.caching
plone.dexterity
plone.event
plone.folder
plone.indexer
plone.intelligenttext
plone.keyring
plone.locking
plone.memoize
plone.registry
plone.resource
plone.rest
plone.scale
plone.schema
plone.subrequest
plone.supermodel
plone.transformchain
plone.uuid
plone.z3cform
Products.DateRecurringIndex
Products.ExtendedPathIndex
Products.MimetypesRegistry
Products.PlonePAS
Products.PortalTransforms
Products.statusmessages
Zope ecosystem#
Chameleon
diazo
five.customerize
five.intid
five.localsitemanager
icalendar
Products.CMFCore
Products.CMFDiffTool
Products.CMFDynamicViewFTI
Products.CMFEditions
Products.CMFUid
Products.DCWorkflow
Products.ExternalMethod
Products.GenericSetup
Products.MailHost
Products.PluggableAuthService
Products.PluginRegistry
Products.PythonScripts
Products.Sessions
Products.SiteErrorLog
Products.StandardCacheManagers
Products.ZopeVersionControl
repoze.xmliter
webresource
z3c.caching
z3c.form
z3c.formwidget.query
z3c.objpath
z3c.relationfield
z3c.zcmlhook
zc.recipe.egg
zc.relation
zodbverify
zope.copy
zope.intid
zope.keyreference
Zope core#
AccessControl
Acquisition
AuthEncoding
beautifulsoup4
BTrees
DateTime
DocumentTemplate
ExtensionClass
Missing
MultiMapping
Persistence
persistent
Products.BTreeFolder2
Products.ZCatalog
Record
RestrictedPython
transaction
zc.lockfile
ZConfig
zdaemon
ZEO
zExceptions
ZODB
ZODB3
zodbpickle
Zope
zope.annotation
zope.app.locales
zope.browser
zope.browsermenu
zope.browserpage
zope.browserresource
zope.cachedescriptors
zope.component
zope.componentvocabulary
zope.configuration
zope.container
zope.contentprovider
zope.contenttype
zope.datetime
zope.deferredimport
zope.deprecation
zope.dottedname
zope.event
zope.exceptions
zope.filerepresentation
zope.globalrequest
zope.hookable
zope.i18n
zope.i18nmessageid
zope.interface
zope.lifecycleevent
zope.location
zope.pagetemplate
zope.processlifetime
zope.proxy
zope.ptresource
zope.publisher
zope.ramcache
zope.schema
zope.security
zope.sendmail
zope.sequencesort
zope.site
zope.size
zope.structuredtext
zope.tal
zope.tales
zope.testbrowser
zope.testing
zope.traversing
zope.viewlet
Zope2
Libraries#
attrs
cffi
cssselect
decorator
docutils
feedparser
future
importlib_metadata
jsonschema
Markdown
multipart
Paste
PasteDeploy
piexif
Pillow
pycparser
PyJWT
pyrsistent
python_dotenv
python_gettext
requests
roman
sgmllib3k
simplejson
soupsieve
Unidecode
urllib3
waitress
WebOb
WebTest
WSGIProxy2
zipp