Running a Plone product on 
Substance D 
Éric Bréhault - PloneConf 2014
Let's be specific about it 
"running" is not "migrating".
Why would we do that? 
No obvious reason.
Why would I do that? 
I have free time. 
It sounds fun. 
It might be a good experiment for the future of 
Plone.
Good things in Substance D 
All the good things from Pyramid 
PLUS 
stores data in a ZODB, 
provides a management interface (the SDI), 
"Substance D owes much of its spirit to the 
Zope application server" (sic)
Good things in Substance D 
The D initial! 
"So it still lives... The will of 
D."
First attempt to integrate Plone 
$ pcreate -s substanced ./plone 
Make sure to load everything in __init__.py: 
config.load_zcml("plone-d.zcml") 
DEMO!
The real experiment case: Rapido 
Rapido is the next Plomino version. 
It is a complete rewrite.
Plomino 
It is an old Plone product (started in 2006). 
Still based on Archetypes. 
Stores data into CMF objects. 
Uses extensively ZCatalog and PythonScript.
Rapido 
(Originally) it is a Plone 5 product. 
Based on Dexterity.
Rapido structure 
rapido.core 
totally independent on Plone 
provides adapters able to produce the 
expected behaviors 
requires a storage service
Rapido structure 
rapido.souper 
provides a storage service based on Souper 
(Souper does work on Plone AND Pyramid)
Rapido structure 
rapido.plone 
standard Dexterity contents 
adapts them using rapido.core 
(ideally) uses nothing but plone.api
Rapido structure 
rapido.substanced 
standard Dexterity substanced.content 
classes 
adapts them using rapido.core 
uses nothing but plone.api Substance D API
DEMO (the real one)
How does that work 
In core, only use components working in both 
Plone and Substance D.
TTW scripting 
TTW scripting is what Rapido is about. 
(more globally, a rich TTW experience is vital to 
any CMS) 
PythonScript ➜ zope.untrustedpython
Catalog 
Substance D has its own catalog, and Plone too... 
➜ repoze.catalog is just fine.
Content persistence 
souper
Settings persistence 
Sharing schemas between Plone and Substance D 
sounds scary. 
➜ Annotations!! 
Both Plone and Substance D contents can be 
IAttributeAnnotatable.
Forms & widgets 
Deform is not rich enough. 
I did not considered running z3c.form on 
Substance D. 
➜ client-side rendering!! with Angular Schema 
Form
Access control 
Both systems have a granular ACL service. 
Probably possible to support them transparently 
from core, but for now: 
custom security implementation
My experience with Substance D 
PROS: 
Fun!! 
Happy to find all the good ingredients.
My experience with Substance D 
CONS: 
Not 100% ZCA-ready. 
Need to call config.hook_zca(), 
it works fine, 
no problem. 
Just not confortable with the "hook" term here. 
We would probably need a local registry.
Conclusion about Plone future 
ZCA + buildout + ZODB makes our identity, we 
must preserve it. 
We can find clever approaches to avoid a full 
rewrite.
Conclusion about Plone future 
Can we easily migrate to Substance D? No 
Should we migrate to something else? No
Thank you!

Running a Plone product on Substance D

  • 1.
    Running a Ploneproduct on Substance D Éric Bréhault - PloneConf 2014
  • 2.
    Let's be specificabout it "running" is not "migrating".
  • 3.
    Why would wedo that? No obvious reason.
  • 4.
    Why would Ido that? I have free time. It sounds fun. It might be a good experiment for the future of Plone.
  • 5.
    Good things inSubstance D All the good things from Pyramid PLUS stores data in a ZODB, provides a management interface (the SDI), "Substance D owes much of its spirit to the Zope application server" (sic)
  • 6.
    Good things inSubstance D The D initial! "So it still lives... The will of D."
  • 7.
    First attempt tointegrate Plone $ pcreate -s substanced ./plone Make sure to load everything in __init__.py: config.load_zcml("plone-d.zcml") DEMO!
  • 8.
    The real experimentcase: Rapido Rapido is the next Plomino version. It is a complete rewrite.
  • 9.
    Plomino It isan old Plone product (started in 2006). Still based on Archetypes. Stores data into CMF objects. Uses extensively ZCatalog and PythonScript.
  • 10.
    Rapido (Originally) itis a Plone 5 product. Based on Dexterity.
  • 11.
    Rapido structure rapido.core totally independent on Plone provides adapters able to produce the expected behaviors requires a storage service
  • 12.
    Rapido structure rapido.souper provides a storage service based on Souper (Souper does work on Plone AND Pyramid)
  • 13.
    Rapido structure rapido.plone standard Dexterity contents adapts them using rapido.core (ideally) uses nothing but plone.api
  • 14.
    Rapido structure rapido.substanced standard Dexterity substanced.content classes adapts them using rapido.core uses nothing but plone.api Substance D API
  • 15.
  • 16.
    How does thatwork In core, only use components working in both Plone and Substance D.
  • 17.
    TTW scripting TTWscripting is what Rapido is about. (more globally, a rich TTW experience is vital to any CMS) PythonScript ➜ zope.untrustedpython
  • 18.
    Catalog Substance Dhas its own catalog, and Plone too... ➜ repoze.catalog is just fine.
  • 19.
  • 20.
    Settings persistence Sharingschemas between Plone and Substance D sounds scary. ➜ Annotations!! Both Plone and Substance D contents can be IAttributeAnnotatable.
  • 21.
    Forms & widgets Deform is not rich enough. I did not considered running z3c.form on Substance D. ➜ client-side rendering!! with Angular Schema Form
  • 22.
    Access control Bothsystems have a granular ACL service. Probably possible to support them transparently from core, but for now: custom security implementation
  • 23.
    My experience withSubstance D PROS: Fun!! Happy to find all the good ingredients.
  • 24.
    My experience withSubstance D CONS: Not 100% ZCA-ready. Need to call config.hook_zca(), it works fine, no problem. Just not confortable with the "hook" term here. We would probably need a local registry.
  • 25.
    Conclusion about Plonefuture ZCA + buildout + ZODB makes our identity, we must preserve it. We can find clever approaches to avoid a full rewrite.
  • 26.
    Conclusion about Plonefuture Can we easily migrate to Substance D? No Should we migrate to something else? No
  • 27.