Eric Bréhault: Running a Plone product on Substance D

published Oct 30, 2014, last modified Nov 16, 2014

Talk by Eric Bréhault at the Plone Conference 2014 in Bristol.

Why should you want to create or run a Plone product on Substance D? Because it is fun. It might be a good experience for the future of Plone.

Substance D has all the good things from Pyramid. Plus stores data in a ZODB. It is a CMS.

Rapido is the next Plomino version. Plomino started in 2006, still based on Archetypes, stores data into CMF objects. Uses extensively ZCatalog and PythonScript.

I turned it into Rapido. Plone 5. Based on dexterity.

  • rapido.core, totally independent of Plone.
  • Storage service: rapido.souper provides a storage service based on Souper. Souper works on Plone and Pyramid, so I chose it.
  • rapido.plone, standard dexterity content types, adapts them using rapido.core, ideally uses nothing but plone.api.
  • rapido.substanced, standard substanced.content classes, uses nothing but Substance D api.

[Demo of Plone part and Substance D part.]

So how is this done?

  • TTW scripting is what Rapido is about. I could not use PythonScript, but I used zope.untrustedpython.
  • Catalog: repozo.catalog is just fine, working on both systems.
  • Content persistence: souper, created by Blue Dynamics, designed to work on both pyramid and Plone.
  • settings persistence: using annotations. Very basic, but just works. Both contents can be IAttributeAnnotatable.
  • Forms and widgets. Substance D has Deform, but it is not rich enough. Porting z3c.form to Substance D... maybe not. So: client side rendering with Angular Schema Form.
  • Access control. Both systems have a granular ACL service. Probably possible to support them both transparently, but for now I created a custom security implementation.

My experience with Substance D. Pros:

  • Fun.
  • Happy to find all the good ingredients.
  • Fast testing.

Cons:

  • Not 100 percent ZCA ready, need to call config.hook_zca(), it works fine, no problem, I am just not comfortable with the 'hook' term here. Also, we would probably need a local registry.

Conclusions for me about Plone future:

  • ZCA plus buildout plus ZODB make our identity, and we must preserve it. It sets us apart, it is something strong.
  • We can find clever approaches to avoid a full rewrite. For example do more in plone.api instead of relying on what Zope does for us.
  • Can we easily migrate to Substance D? No.
  • Should we migrate to something else? No.

Watch the video and slides of this talk.