Plone



Plone

0 0


plone-talk


On Github potzenheimer / plone-talk

team23

Plone

Enterprise Content Management System

Plone Spoiler Alert

Django has a pony

Plone? No Pony. No Unicorns. No Rainbows.
Sorry, but from here on there will only be dragons...

...and cookies!!!

Yummy

Was ist Plone?

✔ Enterprise-quality Content Management System

✔ Usability Layer eines Entwicklungsframeworks

Plone Rahmenwerk

  • ✔ Zope Toolkit (ZCA, Formlib, Annotation; ZODB)
  • ✔ Zope2 Application Server (Five, ZCatalog, AccessControl, Acquisition)
  • ✔ Content Management Framework (CMF, PAS)
  • ✔ Plone Applikation (plone.*, plone.app.*)
  • ✔ Mockup (Patternslib)
  • Life, the Universe and Everything Gestern
  • Mostly Harmless Heute
  • Don't panic Morgen
  • Life, the Universe and Everything Gestern
  • Mostly Harmless Heute
  • Don't panic Morgen
A Life, the Universe and Everything

Zope (Z Object Publishing Environment)

  • 1996: Bobo, Document Template, and BoboPOS
  • 1997: Principia
  • 1998: OpenSource als Zope
  • 2001: Zope Component Architecture
  • 2004: Zope3 als kompletter Rewrite released
  • 2004: Five (2 + 3)
  • 2010: Zope3 umbenannt zu BlueBream
A Life, the Universe and Everything

The World of Zope

  • ZCA
  • ZTK
  • ZPT
  • CMF
  • ZODB
  • Buildout
  • Zope, BlueBream, Grok
  • Silva, ERP5, union.cms, Pyramid, Plone
A Life, the Universe and Everything

Plone

  • 1999 Usability Layer für Zope
  • 2001 Plone 1.0
  • 2004 Plone 2.0, Plone Foundation
  • 2007 Plone 3.0
  • 2010 Plone 4.0
  • 2015 Plone 5.0 (Beta3)
  • Life, the Universe and Everything Gestern
  • Mostly Harmless Heute
  • Don't panic Morgen
B Mostly Harmless

Plone Features

A significant strength of Plone is its flexibility.

-- Kim Nguyen, Senior System Analyst at University of Wisconsin Oshkosh
B Mostly Harmless

Plone Entwicklung

Plone beruht auf der Zope3 Component Architecture

  • ZCML: XML basierte Language zur Konfiguration der Komponentent
  • ZCA: pluggable system interfaces, adapters, utilities and registries.
B Mostly Harmless

ZCML

Zope Configuration Mark-up Language

<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    i18n_domain="my.package">
    <configure package="plone.app.content.browser">
      <browser:page
          for="Products.CMFCore.interfaces._content.IFolderish"
          class="my.package.browser.foldercontents.MyFolderContentsView"
          name="folder_contents"
          template="folder_contents.pt"
          layer="my.package.interfaces.IMyPackageLayer"
          permission="cmf.ListFolderContents"
      />
  </configure>
</configure>
B Mostly Harmless

Interfaces (vs. Duck-Typing)

from zope.interface import implements
from zope.interface import Interface

class IPony(Interface).
    pass

class SweetSurprise(ContentItem):
    implements(IPony, ICookie)
...
if ICookie.providedBy(object):
    # do stuff
B Mostly Harmless

Adapter (vs. Mixin Classes)

@implementer(ILeadImage)
@adapter(IDexterityContent)
class LeadImage(object):

    def __init__(self, context):
        self.context = context
<adapter
    for=".shop.MyShoppableItemType"
    provides=".interfaces.IProductImageProvider"
    factory=".images.FolderishProductImageProvider"
    />
B Mostly Harmless

Utilities (vs. monkey-patching)

class AssetAssignmentTool(object):
    """ Factory providing CRUD oparations for project assets """

    @memoize
    def read(self, uuid, key=None):
        data = api.find(...)
        return data
tool = getUtility(IAssetAssignmentTool)
data = tool.read()
<!-- Tool providing utility functions for asset storage manipulation -->
<utility
    factory=".tool.AssetAssignmentTool"
    provides=".interfaces.IAssetAssignmentTool"/>
B Mostly Harmless

Generic Setup (vs. Paste to custom folder)

Generic Setup steps

  • registrieren CSS files
  • registrieren Javascript files
  • setzen Properties und Konfigurationseinträge
  • registrieren Portlets (mobile Content Blöcke)
  • registrieren search query indexes für den Katalog
B Mostly Harmless

Generic Setup (Beispiele)

<genericsetup:registerProfile
      name="default"
      title="Plone Go Mobile"
      directory="profiles/default"
      description='Mobile CMS add-on'
      provides="Products.GenericSetup.interfaces.EXTENSION"/>
<genericsetup:upgradeStep
      title="Remove LDAP PAS Plugin"
      description="Execute this upgrade after the plonesite upgrade"
      handler=".v4.upgrade_pas"
      />
B Mostly Harmless

Events

<subscriber
    for="Products.PlonePAS.events.UserLoggedOutEvent"
    handler=".mymodule.clear_extra_cookies_on_logout"
    />
def clear_extra_cookies_on_logout(event):
    # What event contains depends on the
    # triggerer of the event and event class
    request = event.object.REQUEST
    ...
  • Life, the Universe and Everything Gestern
  • Mostly Harmless Heute
  • Don't panic Morgen
C Don't Panic

The Three Ds

  • Dexterity
  • Diazo
  • Deco
C Don't Panic

The Three Ds

Dexterity

Subsystem zur Erstellung von Content Objekten

✔ verfügbar seit Plone 4.1

C Don't Panic

The Three Ds

Diazo

We write XSLT so you do not have to...

-- The Beards of Plone

✔ verfügbar seit Plone 4.0

C Don't Panic

The Three Ds

Diazo

C Don't Panic

The Three Ds

Diazo

<rules
    xmlns="http://namespaces.plone.org/diazo"
    xmlns:css="http://namespaces.plone.org/diazo/css"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <theme href="theme.html" />

    <merge attributes="class" css:content="body" css:theme="body" />
    <replace css:theme="title" css:content="title" />

    <replace css:content-children="#content"
        css:theme-children="#content" />

    <replace css:content="#sidebar"
        css:theme="#below-content-teaser" />
    <drop css:theme="#theme-banner-slot"
        css:if-not-content="#backend-masthead" />
C Don't Panic

The Three Ds

Diazo

<!-- Required marker -->
<replace css:content="span.required">
  <xsl:copy>
    <xsl:copy-of select="@*" />
      <xsl:attribute name="class">
        <xsl:value-of select="./@class" /> text-warning
      </xsl:attribute>
    <xsl:apply-templates />
  </xsl:copy>
</replace>
C Don't Panic

The Three Ds

Deco

Drag&Drop Reordering and Inline Content Editing

✔ verfügbar seit Plone 5.0a1 als Mosaic

C Don't Panic

The supposed to be Plone 6.0

Agenda 2020

  • plone.restapi
  • Javascript based CMS Layer

Plone

Fragen?

Danke für die Aufmerksamkeit

Christoph @ Team23 GmbH & Co. KGwww.team23.de