By Ingeniweb. A Django site.
Octobre 5, 2008
» Why Plone architecture must change


I proposed a conference on this theme but it was not keeped for PloneConf2008. Here comes a short work on its, and I will hope it create a debate.

Plone is born with a goal: make Zope 2 and CMF simple. Those two are frameworks and allowed you to create a website… a so rustic website. With Plone you only needed to fill one form to have a cool site ready to use and to custom. At that time Plone was CMFPlone, an other implementation of CMFDefault.

Some new products were inserted in the bundle like GroupUserFolder in a such way that they cannot be separated from the base implementation of Plone.

The second step was the Archetypes framework: a new manner to manage object’s attributes as schema. With all informations stored in the schema,  mutators and accessors are generated on boot time and forms are generated from schema’s widgets. It was cool, but not perfect. Then the product ATcontentTypes was created to be the glue to upgrade CMFPlone as Plone: all base types from CMF are now overloaded by a type from ATContentTypes.

So came Zope 3 and Five. Five is the glue that allows Zope 2 developpers to use component architecture from Zope 3 in their code. Plone 2.5 and Plone 3 are using Five.

Another product came from Zope ‘renegades’: PluggableAuthService and its implementation in Plone: PlonePAS. It should replace the old GroupUserFolder but users and groups management templates were never refactored.

Plone 3 introduces new component in plone.app to our greatest happiness.

What part of Plone needs CMF?
Why Plone needs to know about Archetypes storage and CMFEditions strategy?
Why GroupUserFolder is always in the bundle as PlonePAS fit is API?

Now Plone is like the linux kernel: a big monolithic Plone with a lot of modules that create a base Plone 3 site. And so much glue! GroupUserFolder is always here because nobody knows and wants to work on the portal_group replacement.
If you are following Plone4Artist or PloneGov you can see that a part of these projects needs to overload Plone base configuration.

CPS 3, an other CMF-based CMS, was conceived with the thinking that components need to be independant to be reusable and maintainable:

  • CPSSchema depends only on Zope
  • CPSCore depends only on Zope
  • CPSDocument depends only on CPSSchema
  • CPSDefault depends on CPSCore and CPSSchema, and implements the CPS site.

After 2 years it was divided into platforms:

  • CPS Legacy
  • CPS Courier
  • CPS Groupware

In front of that Plone propose at single product with a lot of glue that depends on others products or components that use their own glue and so on…
There’s no plone.core and plone.default and we cannot create a plone.artistsite or a plone.govsite.
Do you think that everyone need an openid or an ldap integration in Plone ?

Plone 4 must be a reimplementation, not only a new glue with new concepts. I don’t want any new functionality in Plone 4, I want modularity and scalability.

      

Février 7, 2008
» encolpe


1. Product or framework

Harry Porter: Is Plone a framework or a product ?

Encolpe: Both, Sir.

HP: Then why I cannot see which part of Plone is a framework, and which one is the Plone product ?

E: Eh !

E: Hum…

E: I guess there’s something wrong in the architecture. But there no fatal issue.

HP: OK, then where the base content implementation ?

E: Archetypes propose schema, filed and widget implementation with some basic implementation for the content object (unit, folder too).

HP: Now what do ATContentTypes ?

E: … some advanced implementation of content objects. I guess what you want me to say: basic implementation of content object should move from Archetypes to ATContentTypes to make a real separation between how a content object is stored and how it is displayed with additional functionalities.

HP: I wasn’t thinking so deep. I suppose that replacing Archetypes by something else would be easier if you choose this design.

HP: I tested NuPlone theme product and it was cool. But why the basic Plone theme cannot be separate from the CMFPlone product ?

E: Here I guess you reach the root of the problem. CMF have two base products to separate the framework from its basic implementation: CMFCore and CMFDefault. Plone doesn’t have such a trick: the CMFPlone product does both. I guess it comes from its will to be usable out of the box with only one click. To anwser to your original question split Plone in two products will not be enough to have a specific product for the basic theme: this one must be integrated in the default Plone product implementation then other Plone theme can be relied on it.

HP: Something hurt me recently when I discovered that CMFCore contains no skins directory.

E: We reach again a design choice and you may find another examples in Plone 3. The Plone architecture design must be a critical point in Plone 4 more than what’s the new cool feature we will add.

2. Out of the box versus ready to be customized

HP: Now, imagine that I’m a newbie in web and I want my website with cool theme. Where can I find themes for Plone and how can I customize it ?

E: You want site for Plone theme ?

HP: Not really. I want interactivity. Browse themes in a site (plone.org or somewhere else), then download an archive, put it in the PMI ad finally restart Zope (do we really need this step ?). Now I can choose my theme in the PMI. I want to be able to choose and use a theme like I do with my desktop theme.

E: Wooh. And you think that should be enough ?

HP: No.

E: …

HP: I want to be able to customize it simply. Without learn python or any template language. I just want an editing tool for viewlet and for basic stylesheet properties without having to go in the ZMI or to know an hide feature.

E: Only that ?

HP: If I can only learn HTML, CSS to customize my theme it really would be cool. Imagine a theme community around Plone.
E: It’s far from big projects I lead today, but I can see the benefit for the whole Plone community.

HP: It is like having Plone translated in the 40 most important languages: the goal is to raise interest in Plone with basic stuff to finally create business.

E: But you can use Plone out of the box right now and add tons of functionalities.

HP: Finally, i’am just an user, may be something like an advanced user, of system softwares. I don’t want to know anything around buildout, it’s to low level for me. Like for eclipse plugin I want to be able to browse plonepi within the PMI and choose a functionality or a product to add. Then plone should make an easy_install for me. I don’t care if it use zc.buildout in backend. I want my customization to be transparent.

E: Oh. You want Pypi integrated in Plone.

HP: Something like that, yes.

E: And if the egg that Plone download and install for you breaks the site, what shall Plone do ?

HP: In an ideal world it should run unittests and functional tests before to install it, shouldn’t it ?

E: Yes, but test coverage isn’t the priority in lots of projects. We need some code reviewer to elect some products and something to declare possible conflicts between eggs.

HP: It’s your work, not mine.

E: I can see the point. Is that enough for today?

HP: Yes. I may have some other questions or needs tomorrow.

E: And tomorrow is an other day.