We make IT
berlinbrandenburg
PD2
Plone Driven
Plone Development
Henning Rietz, Condat AG
Plone Conference 2010
Bristol, 28...
© 2010 Condat AG 2
Speaker specifics
 Henning Rietz, hr@condat.de
Condat AG
Software for innovative business processes.
F...
© 2010 Condat AG 3
Alliterated Agenda
 Major motivation
 Definitive Dream
 Attractive Advantages
 Multiple models
 Al...
© 2010 Condat AG 4
Major motivation
Likes
 Model-driven development
 Application of design
patterns
 ArchGenXML
Dislike...
© 2010 Condat AG 5
Definitive dream
The model is
Plone content.
© 2010 Condat AG 6
Dream details
 Metamodel
== Domain-specific language
== Plone Content Types
 Model
== Metadata
== Des...
© 2010 Condat AG 7
Attractive Advantages
 Reduces manual coding effort
 Generates .py, .pt, .cpt, .cpy, .xml, .sql, .zcm...
© 2010 Condat AG 8
Conflicting Challenges
 Keep implementation
details out of the models
 Make it simple
 Customer read...
© 2010 Condat AG 9
Domain description
 Finding your metamodel –
How would you describe your future systems?
What abstract...
© 2010 Condat AG 10
Multiple metamodels
 Content
 Views
 Navigation
 Layout
 Authoring
 Build
 Deployment
 Code St...
© 2010 Condat AG 11
Code structure
© 2010 Condat AG 12
 Concepts / structures for code generation
 File, Directory, FileSeries, FileGroup, etc.
 PT/DTML T...
© 2010 Condat AG 13
UML example
© 2010 Condat AG 14
Example structure
('plone3layout', 'Plone 3 Standard Layout', 'PD2Layout', {'namingExpression':'contex...
© 2010 Condat AG 15
Example: gstype view
<tal:block i18n:domain="conpd2.codegen" tal:define="ct context/Title">
<object ta...
© 2010 Condat AG 16
Content
© 2010 Condat AG 17
Content modelling
 Describes most of the information
architecture
 Metamodel: Types, Attributes,
Rel...
© 2010 Condat AG 18
UML example
(this is taken from the metamodel of the first version of ConPD2, which is basically a met...
© 2010 Condat AG 19
Views
© 2010 Condat AG 20
Views modelling
 What is presented where/how?
 Metamodel: View Types (e.g. single
object, object lis...
© 2010 Condat AG 21
More metamodels
 Navigation: primary, secondary, depth, …
 navigation portlet, sections viewlet
 La...
© 2010 Condat AG 22
All-round Application
 Implement Metamodel
 E.g. with ArgoUML, ArchGenXML
 Templates for code gener...
© 2010 Condat AG 23
Outrageous Outlook
 Metamodels for knowledge management,
public internet, collaborative applications,...
© 2010 Condat AG 24
Thank you
Condat AG
Henning Rietz
Alt-Moabit 91 d
10559 Berlin
Tel. (030) 3949-1179
hr@condat.de
www.c...
Upcoming SlideShare
Loading in …5
×

Boosting productivity with "Plone-driven Plone development"

814 views
747 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
814
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Motivation: Likes &amp; 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"

    1. 1. We make IT berlinbrandenburg PD2 Plone Driven Plone Development Henning Rietz, Condat AG Plone Conference 2010 Bristol, 28.10.2010 IT from Berlin
    2. 2. © 2010 Condat AG 2 Speaker specifics  Henning Rietz, hr@condat.de Condat AG Software for innovative business processes. Founded 1979 Location Berlin Staff ~65
    3. 3. © 2010 Condat AG 3 Alliterated Agenda  Major motivation  Definitive Dream  Attractive Advantages  Multiple models  All-round Application  Outrageous Outlook
    4. 4. © 2010 Condat AG 4 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
    5. 5. © 2010 Condat AG 5 Definitive dream The model is Plone content.
    6. 6. © 2010 Condat AG 6 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)  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 ExistingExamples It‘s an approach – not a product.
    7. 7. © 2010 Condat AG 7 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)
    8. 8. © 2010 Condat AG 8 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
    9. 9. © 2010 Condat AG 9 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
    10. 10. © 2010 Condat AG 10 Multiple metamodels  Content  Views  Navigation  Layout  Authoring  Build  Deployment  Code Structure Abstraction Looking at the system from different perspectives
    11. 11. © 2010 Condat AG 11 Code structure
    12. 12. © 2010 Condat AG 12  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 Code structure modelling
    13. 13. © 2010 Condat AG 13 UML example
    14. 14. © 2010 Condat AG 14 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()'}, [ …
    15. 15. © 2010 Condat AG 15 Example: gstype view <tal:block i18n:domain="conpd2.codegen" tal:define="ct context/Title"> <object tal:replace='structure string:<?xml version="1.0"?>'/> <object name="PD2Adapter" tal:attributes="name ct" meta_type="Factory-based Type Information with dynamic views" xmlns:i18n="http://xml.zope.org/namespaces/i18n"> <property name="title" tal:content="ct">PD2Adapter</property> <property name="description"></property> <property name="content_meta_type" tal:content="ct">PD2Adapter</property> <property name="product" tal:content="context/getProductName">ConPD2</property> <property name="factory" tal:content="string:add${ct}">addPD2Adapter</property> <property name="immediate_view">base_view</property> <property name="global_allow">True</property> <property name="filter_content_types">False</property> <property name="allowed_content_types"> </property> <property name="allow_discussion">False</property> <property name="default_view">base_view</property> <property name="view_methods"> <element value="base_view"/> … Full example
    16. 16. © 2010 Condat AG 16 Content
    17. 17. © 2010 Condat AG 17 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
    18. 18. © 2010 Condat AG 18 UML example (this is taken from the metamodel of the first version of ConPD2, which is basically a metamodel for AT development)
    19. 19. © 2010 Condat AG 19 Views
    20. 20. © 2010 Condat AG 20 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
    21. 21. © 2010 Condat AG 21 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
    22. 22. © 2010 Condat AG 22 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
    23. 23. © 2010 Condat AG 23 Outrageous Outlook  Metamodels for knowledge management, public internet, collaborative applications, …  Plone Technology Metamodel  Generic Applications for multiple clients in SaaS scenarios
    24. 24. © 2010 Condat AG 24 Thank you Condat AG Henning Rietz Alt-Moabit 91 d 10559 Berlin Tel. (030) 3949-1179 hr@condat.de www.condat.de

    ×