Rok Garbas - Deco, finally!

published Oct 11, 2012, last modified Oct 12, 2012

Talk during the Plone Conference 2012.

Rok Garbas finally talks about Deco at the Plone conference 2012.

We have been talking about Deco for at least four annual Plone Conferences in a row. I got introduced to it during the Living Statues Sprint here in Arnhem in 2010.

Let's first have a definition for clarity: Deco is a layout editor. Tiles are something different, they can be used outside of Deco.

You need to install the Deco package. You get a toolbar at the top, in an iframe. You add a Deco page and add tiles there, for example just some tiles with rich text, using TinyMCE. You can drag and drop tiles around on the page.

So, the toolbar at the top is an iframe. It should work fine, stretching if needed. With iframe.js this is easy to do, also if you need to put other parts of the DOM in an iframe. We use this to show both the back-end and the front-end on the same page, without needing to worry about how the back-end looks and whether your Diazo theme conflicts with it.

The next thing is tiles. Tiles are mean and lean. If you use Grok instead of zcml, one file is enough. Tiles are a brower view with an extra interface. There are persistent tiles (stored in ZODB, compare portlet settings) and transient tiles.

Then the third part is the real Deco part. The communication between the Deco iframe and the main frame (the front-end page) was hard to get right and was the main reason why Deco took so long to develop.

Current integration in Plone is: Deco Lite. This is a dexterity behavior, so only available for dexterity content types. It works only on the content area. Portlets are still working as before.

If you want to use tiles without Deco, you can install plone.app.tiles.

Deco is really close for production use. A few bugs need to be fixed. I will sprint on it at the end of the conference and hope people will join me.

A few weeks ago I was frustrated with the code, because the Javascript code was untested. Now it is 50 percent tested. If you want to know more about automated testing of Javascript, come to the Sea Sprint talk, later today.

Questions and answers

plone.app.toolbar works. If you are okay with fixing a few bugs that you encounter, then you should be able to use this in production already.

The UCLA is using tiles in a big website. Not Deco. It is stable. It seems to scale and operate quite well. Tiles are way simpler than you think it is. They are quite solid. Don't be scared of using them. There are some questions about making the UI less confusing for editors.