plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
235 stars 182 forks source link

Support Distributions to be built on top of Plone #3854

Open ericof opened 7 months ago

ericof commented 7 months ago

PLIP (Plone Improvement Proposal)

Responsible Persons

Proposer: Érico Andrei [@ericof]

Seconder: Timo Stollenwerk [@tisto]

Abstract

Over the years, the Plone community has developed numerous "distributions" of the Plone CMS, even without official support from the core codebase. These include SENAITE, Quaive, Portal Modelo, Portal Padrão, CastleCMS, and ioComune. These distributions often require patching Plone or necessitate manual steps to create a customized Plone site. This PLIP aims to establish a clear protocol for creating and managing new Plone distributions, including the incorporation of example content during site creation.

Talk about plone.distribution at the Plone Conference 2023

Motivation

As one of the creators of Portal Padrão and a contributor to Portal Modelo, I have experience in modifying the Plone site creation process to include additional steps and customize the resulting site. However, each distribution, including Quaive and CastleCMS, has its unique implementation. The absence of a standardized approach and official support can lead to compatibility issues when changes occur in core packages like Products.CMFPlone.

Assumptions

We assume that the existing options in Plone’s Add Site page are basic distributions. Their content creation processes need unification to ensure consistency and ease of use.

Proposal & Implementation

We propose the development of an API to streamline Plone site creation. This API will facilitate site creation through Python code and RESTAPI, enabling the development of frontends for default Plone or SaaS offerings. A standardized method for importing content into new websites will also be introduced to enhance user experience and consistency across distributions.

Deliverables

Risks

Supporting Plone 6.0 necessitates that plone.distribution duplicates content from plone.volto and plone.app.contenttypes. It also requires the implementation of a unified site creation function and RESTAPI services, ideally situated in Products.CMFPlone and plone.restapi, respectively.

Participants

sneridagh commented 7 months ago

+1 to the proposal. I subscribe to every single line.

Maybe it's worth to add the i18n limitation and that we need to find a good way to overcome it.

@ericof maybe you can also point to your Plone Conference talk this year, talking about them? I think there are really good points in there and it does expose the whole picture in an extraordinary way.

tisto commented 7 months ago

@plone/framework-team since this is a PLIP that covers both Classic UI and Volto I guess we need to schedule a call, or at least have a vote if we think that this is a good idea. Since I am seconding this idea, I am +1.

mauritsvanrees commented 7 months ago

I obviously like this idea and would love to have this in Plone 6.1.

Some details are not yet clear to me though, especially around the dependencies, and possibly circular dependencies:

ericof commented 7 months ago

@mauritsvanrees Excellent points.

Dependencies

My original vision was to move site creation logic to Products.CMFPlone and keep a slim plone.distribution focusing on high-level API to register new distributions and provide a UI and rest endpoints.

Of course, we would need to address how to handle plone.distribution with Plone 6.0 and the code-duplication we would have until 6.1 is out.

Export / Import

I would love to see Products.CMFPlone (or GenericSetup) shipping with a default way to serialize and deserialize content to JSON and collective.exportimport, focusing on handling all possible edge cases and conversions used in migrations.

I want to discuss implementing this and where it should be done.

@pbauer, opinions here?

MrTango commented 7 months ago

+1 for the whole idea could you please explain this point a bit more in detail:

Implements basic content distributions, mirroring the content in plone.volto and plone.app.contenttypes, until these packages provide their distributions.

ericof commented 6 months ago

@MrTango, In Plone 5.2 and 6.0, we have the example content being implemented by setuphandlers in plone.volto and in plone.app.contentypes. To support plone.distribution being usable in Plone 6.0, we need to mirror the content created in plone.volto and plone.app.contenttypes, but for Plone 6.1, both packages should replace their setuphandlers implementation by distributions.

ericof commented 6 months ago

@mauritsvanrees, @fredvd, @pbauer : After some digging, it seems the plone.restapi serializers and deserializers would be very hard to be refactored into another package. Any opinions?

mauritsvanrees commented 3 months ago
jensens commented 2 weeks ago

I added a PLIP configuration to buildout.coredev - @ericof please check the branches!

run buildout -c plips/plip-distributions.cfg in coredev