Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Boosting productivity with "Plone-driven Plone development"



Slides of my talk at the Plone conference 2010 in Bristol, Okt 28th

Slides of my talk at the Plone conference 2010 in Bristol, Okt 28th



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Motivation: Likes & Dislikes Idea
  • Die Startseite zeigt… Auf den nächsten Ebenen sieht man Wenn man ein X öffnet, dann Typen: Dashboard, SingleObject, ObjectList, Form Bausteine: Bildergalerie, Zusatzinformationen Ausdrücke: die letzten X, die neusten Y, allg. Suchkritieren

Boosting productivity with "Plone-driven Plone development" Boosting productivity with "Plone-driven Plone development" Presentation Transcript

  • PD 2 Plone Driven Plone Development Henning Rietz, Condat AG Plone Conference 2010 Bristol, 28.10.2010 IT from Berlin
  • Speaker specifics
    • Henning Rietz, hr@condat.de
    Condat AG Software for innovative business processes. Founded 1979 Location Berlin Staff ~65
  • Alliterated Agenda
    • Major motivation
    • Definitive Dream
    • Attractive Advantages
    • Multiple models
    • All-round Application
    • Outrageous Outlook
  • Major motivation
    • Likes
    • Model-driven development
    • Application of design patterns
    • ArchGenXML
    • Dislikes
    • Writing boilerplate code
    • Editing *.zcml, *.xml
    • Migration migraine (Plone 2  3  4  …)
    • Learning curve for new developers
  • Definitive dream The model is Plone content.
  • Dream details
    • Metamodel == Domain-specific language == Plone Content Types
    • Model == Metadata == Description of a specific system == Plone content
    • Code == Implementation of a specific system == Views on Plone content (metadata)
    • ArchGenXML:
    • Metamodel == UML Metamodel
    • Model == UML (XMI file)
    • Code == generated from XMI
    • PloneFormGen:
    • Metamodel == PFG Content Types
    • Model == FormFolder + Subobjects
    • No code generated, interpretation of model at runtime
    • Collections
    Existing Examples It‘s an approach – not a product.
  • Attractive Advantages
    • Reduces manual coding effort  Generates .py, .pt, .cpt, .cpy, .xml, .sql, .zcml, …
    • High configurability (for you and the customer)  Model can be accessed at runtime  Behavior of generic parts is dynamically changed
    • Increases productivity  Homogenous environment, everything is Plone-ish  Makes your design patterns explicit, enforces conventions  Better learning curve for new developers
    • Higher maintainability  Single source for changes  Helps you deal with major changes in Plone architecture  Integrated documentation
    ( orange: specific strengths of PD2 , otherwise: typical advantage of MDD)
  • Conflicting Challenges
    • Keep implementation details out of the models
    • Make it simple
    • Customer readable
    • Generate as much as possible (and useful)
    • Make it powerful
    • Executable
  • Domain description
    • Finding your metamodel – How would you describe your future systems? What abstractions/patterns do you employ?
    • Possible input
      • Legacy systems (to be migrated)
      • The future design
      • Storyboards
      • UML models
      • Your own patterns/frameworks
      • User/technical documentation
  • Multiple metamodels
    • Content
    • Views
    • Navigation
    • Layout
    • Authoring
    • Build
    • Deployment
    • Code Structure
    Abstraction Looking at the system from different perspectives
  • Code structure
  • Code structure modelling
      • Concepts / structures for code generation
      • File, Directory, FileSeries, FileGroup, etc.
      • PT/DTML Templates for code generation, using domain model objects as contexts
      • Code generation traverses the structure, applying model elements to templates, writing the resulting code to the local file system of the Zope (ZEO client) instance
  • UML example
  • Example structure ('plone3layout', 'Plone 3 Standard Layout', 'PD2Layout', {'namingExpression':'context.Title()'}, [ ('readme.txt','README.txt','PD2File',{'viewname':'empty','namingExpression':'self.Title()'},[]), ('setup.cfg','setup.cfg','PD2File',{'viewname':'empty','namingExpression':'self.Title()'},[]), ('setup.py','setup.py','PD2File',{'viewname':setup','namingExpression':'self.Title()'},[]), ('modulepart1','<modulepart1>','PD2Directory',{'viewname':'','namingExpression':'context.Title().split('.')[0]'}, [ ('init.py','__init__.py','PD2File',{'viewname':'initpkg','namingExpression':'self.Title()'},[]), ('modulepart2','<modulepart2>','PD2Directory',{'viewname':'','namingExpression':'context.Title().split('.')[1]'}, [ ('init.py','__init__.py','PD2File',{'viewname':'init','namingExpression':'self.Title()'},[]), ('configure.zcml','configure.zcml','PD2File',{'viewname':'configure','namingExpression':'self.Title()'},[]), ('config.py','config.py','PD2File',{'viewname':'empty','namingExpression':'self.Title()'},[]), ('interfaces.py','interfaces.py','PD2File',{'viewname':'interfaces','namingExpression':'self.Title()'},[]), ('readme.txt','README.txt','PD2File',{'viewname':'empty','namingExpression':'self.Title()'},[]), ('version.txt','version.txt','PD2File',{'viewname':'empty','namingExpression':'self.Title()'},[]), ('browser','browser','PD2Directory',{'viewname':'','namingExpression':'self.Title()'},[]), ('content','content','PD2Directory',{'viewname':'','namingExpression':'self.Title()'}, [ ('init.py','__init__.py','PD2File',{'viewname':'empty','namingExpression':'self.Title()'},[]), ('type.py','<type>.py','PD2FileSeries',{'viewname':'atclass','namingExpression':''%s.py' % context.Title().lower()','listExpression':'context.getContentTypes()'},[]), ('configure.zcml','configure.zcml','PD2File',{'viewname':'cconfigure','namingExpression':'self.Title()'},[]), ]), ('profiles','profiles','PD2Directory',{'viewname':'','namingExpression':'self.Title()'}, [ ('default','default','PD2Directory',{'viewname':'','namingExpression':'self.Title()'}, [ …
  • Example: gstype view <tal:block i18n:domain=&quot;conpd2.codegen&quot; tal:define=&quot;ct context/Title&quot;> <object tal:replace='structure string:<?xml version=&quot;1.0&quot;?>'/> <object name=&quot;PD2Adapter&quot; tal:attributes=&quot;name ct&quot; meta_type=&quot;Factory-based Type Information with dynamic views&quot; xmlns:i18n=&quot;http://xml.zope.org/namespaces/i18n&quot;> <property name=&quot;title&quot; tal:content=&quot;ct&quot;>PD2Adapter</property> <property name=&quot;description&quot;></property> <property name=&quot;content_meta_type&quot; tal:content=&quot;ct&quot;>PD2Adapter</property> <property name=&quot;product&quot; tal:content=&quot;context/getProductName&quot;>ConPD2</property> <property name=&quot;factory&quot; tal:content=&quot;string:add${ct}&quot;>addPD2Adapter</property> <property name=&quot;immediate_view&quot;>base_view</property> <property name=&quot;global_allow&quot;>True</property> <property name=&quot;filter_content_types&quot;>False</property> <property name=&quot;allowed_content_types&quot;> </property> <property name=&quot;allow_discussion&quot;>False</property> <property name=&quot;default_view&quot;>base_view</property> <property name=&quot;view_methods&quot;> <element value=&quot;base_view&quot;/> … Full example
  • Content
  • Content modelling
    • Describes most of the information architecture
    • Metamodel: Types, Attributes, Relationships
      • Probably even more domain-specific
    • Code: AT schemata, classes, GS xml, zcml
    • Also possible: RDBMS-related content
  • UML example (this is taken from the metamodel of the first version of ConPD2, which is basically a metamodel for AT development)
  • Views
  • Views modelling
    • What is presented where/how?
    • Metamodel: View Types (e.g. single object, object list, dashboard) with presentation details (e.g. sorting, batching)
    • Code: template fragments, macros, view classes, helper methods
  • More metamodels
    • Navigation: primary, secondary, depth, …  navigation portlet, sections viewlet
    • Layout: two/three columns, header, footer, …  Viewlets, CSS (cf. Subskins product)
    • Authoring:  roles, workflows, staging, content rules
    • Build & Deployment:  devbuildout|production|test.cfg, deployment scripts, monitoring frontend
  • All-round Application
    • Implement Metamodel
      • E.g. with ArgoUML, ArchGenXML
      • Templates for code generation
    • Deploy PD2
      • Model lives in ZEO server
      • Developers work with local ZEO Client, which writes to local file system
    • Develop with PD2
      • Describe customer site in terms of the metamodel
      • Push the button
      • Make customer specific extensions
      • Implement generic parts (which interpret metadata at runtime)
      • Iterate
  • Outrageous Outlook
    • Metamodels for knowledge management, public internet, collaborative applications, …
    • Plone Technology Metamodel
    • Generic Applications for multiple clients in SaaS scenarios
  • Thank you Condat AG Henning Rietz Alt-Moabit 91 d 10559 Berlin Tel. (030) 3949-1179 [email_address] www.condat.de