Running a Plone product on Substance D

27
Running a Plone product on Substance D Éric Bréhault - PloneConf 2014

description

Talk by Éric Bréhault at Plone conference 2014

Transcript of Running a Plone product on Substance D

Running a Plone product onSubstance 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 ofPlone.

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 theZope application server" (sic)

Good things in Substance D

The D initial!

"So it still lives... The will ofD."

First attempt to integrate Plone$ p c r e a t e - s s u b s t a n c e d . / p l o n e

Make sure to load everything in __init__.py:

c o n f i g . l o a d _ z c m l ( " p l o n e - d . z c m l " )

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 Ploneprovides adapters able to produce theexpected behaviorsrequires 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 contentsadapts them using rapido.core(ideally) uses nothing but plone.api

Rapido structure

rapido.substanced

standard Dexterity substanced.contentclassesadapts them using rapido.coreuses nothing but plone.api Substance D API

DEMO (the real one)

How does that work

In core, only use components working in bothPlone and Substance D.

TTW scripting

TTW scripting is what Rapido is about.

(more globally, a rich TTW experience is vital toany 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 Dsounds scary.

➜ Annotations!!

Both Plone and Substance D contents can beIAttributeAnnotatable.

Forms & widgets

Deform is not rich enough.

I did not considered running z3c.form onSubstance D.

➜ client-side rendering!! with Angular SchemaForm

Access control

Both systems have a granular ACL service.

Probably possible to support them transparentlyfrom 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, wemust preserve it.We can find clever approaches to avoid a fullrewrite.

Conclusion about Plone future

Can we easily migrate to Substance D? No

Should we migrate to something else? No

Thank you!