SlideShare a Scribd company logo
1 of 103
Download to read offline
Building Content Types
     with Dexterity


        David Glick
   Plone Conference 2009
Groundwire uses the power of technology
to connect people, organizations, and communities
working to build a sustainable society.
What is a content type?
A way of categorizing
the items in your site




      Page          Something Else
Schema
Workflow
Custom view templates
Miscellaneous settings
•   Placeful restrictions
•   Comments
•   Searchability
•   Per-type portlet assignments
•   etc.
History Lesson




         http://commons.wikimedia.org/wiki/File:1893_Nina_Pinta_Santa_Maria_replicas.jpg
Content Management
Framework (CMF)
• Underlying framework for registering
  types, assigning workflow
• CMFDefault contains sample types which
  used to be used by Plone
• Not schema-based
Archetypes
• Schema-based form generation
• Basis of Plone's current default content
  types (ATContentTypes)
• Not going away anytime soon
Dexterity




            Martin Aspeli
Goals




        http://www.fickr.com/photos/paul-w-locke/1662634481/sizes/m/
Make filesystem content type
development sane
Make through-the-web content
type development sane
Make it possible to switch
back and forth between the 2
Philosophy




             http://www.fickr.com/photos/ulrichsson/3519217737/
Reuse over reinvention
Small over big
Pro duc ts .Arc he ty pe s

                                               plone.app.dexterity

    base classes

                    metadata                                  plone.behavior
     felds          schema      plone.directives.*

                                                                     plone.autoform
                      widgets
                                        plo ne .de x te rity
    storage
                                plone.supermodel                      z3c.form
                   reference
                    engine
                                   plone.schemaeditor
                                                          plone.app.relations
Natural interaction over
excessive generality


 diffculty




                time
Real code over generated
code
Zope 3 over Zope 2
Automated testing over
wishful thinking
Let's build a content type!
Installing Dexterity
 [buildout]
 extends =
     http://dist.plone.org/release/3.3.1/versions.cfg
     http://good-py.appspot.com/release/dexterity/1.0a2

 …
 [instance]
 …
 eggs =
     …
     plone.app.dexterity
Installing Dexterity
Dexterity Types Control Panel
Adding a Type
Adding a Type
Adding a 'Plonista' instance
Adding a 'Plonista' instance
The default 'Plonista' view
A few issues
• Bad short name for URL (“plonista”)
• Showing lots of metadata fields we don't
  care about
• We want it to say “Name” instead of “Title”
• Doesn't store anything interesting yet :)

                 ...so let's fix it!
Behaviors
 s ubc la s s ing   s c he m a                  be ha v io rs
schema              e x te ns io n

 ATFile             schema
                                                  model
                        schema

                    schema
                        schema         Deco                    thumbnail
 schema
                                       layout                  image
  ATFile
                                                  Dexterity
                                     versioned      File        name from
CustomATFile          ATFile                                    title

                                         geolocatable
                                                              ratings
Editing the 'Plonista' Behaviors



                   Disable this to hide the metadata


                    Enable this to generate short
                    name from title
Adding a Field
Adding a Field



                 This will replace the title
                 feld that used to come
                 from the Dublin Core
                 behavior.
Adding a Field
Editing a field   We are changing the title
                  of this feld to 'Name'.
Edit a revised 'Plonista'
Rapid Prototyping
• The schema object in memory is directly
  modified, so changes take effect
  immediately.
• The changes are also serialized to XML and
  stored in the ZODB (in a property of the
  FTI), so they are persistent when Zope
  restarts.
Modifying a Type
• You can add, remove, and rename fields
  through the web.
• But, values stored in existing instances will
  not be automatically removed or converted.
  So be careful.
Some more desired refinements
• Custom add permission
• Show the 'bio' field in a separate fieldset.

        …we can't do these through the web
         (at least not yet)
Filesystem roundtripping
           We b                            File s y s te m
           Zope 3 Schema                     Schema as
                                             Python interface
Content
Editing                                          py


          Schema
          Editing


              xml                               xml             External
                           GenericSetup                         tools
                           import/export
          XML schema in                      XML schema
          FTI                                on flesystem
Exporting a type
• GenericSetup export for now;
  better UI coming :)
Minimal Dexterity package structure
            • example.ploneconf09
             » /example
              • /ploneconf09
                •     /__init__.py
                •     /configure.zcml
                •     /profiles
                    •     /default
                        •     /metadata.xml
                        •     /types.xml
                        •     /types
                            •    plonista.xml
             » /setup.py
setup.py
setup(name='example.ploneconf09',
      ...
      install_requires=[
          'setuptools',
          'plone.app.dexterity',           Make sure we automatically get   Dexterity
          # -*- Extra requirements: -*-
      ],
      entry_points="""
      [z3c.autoinclude.plugin]
                                   Make sure we don't need a ZCML slug
      target = plone               (in Plone 3.3 and greater)
      """,
      )
__init__.py

 # Nothing to see here; move along. :)
configure.zcml
<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:grok="http://namespaces.zope.org/grok"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    i18n_domain="example.ploneconf09">
                                            Loads ZCML for all dependency
  <includeDependencies package="."/>        packages listed in setup.py
  <genericsetup:registerProfile
      name="default"
      title="Plone conference Dexterity example"
      directory="profiles/default"
      description="Installs the Dexterity example for the Plone conference."
      provides="Products.GenericSetup.interfaces.EXTENSION"
      />

</configure>
types.xml
<?xml version="1.0"?>
<object name="portal_types" meta_type="Plone Types Tool">
 <object name="plonista" meta_type="Dexterity FTI"/>
</object>




metadata.xml
<metadata>
    <version>1</version>
    <dependencies>
        <dependency>profile-plone.app.dexterity:default</dependency>
    </dependencies>
</metadata>
plonista.xml
<?xml version="1.0"?>
<object name="plonista" meta_type="Dexterity FTI"
   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
 <property name="title">Plonista</property>
 <property name="description">A member of the Plone community.</property>
 <property name="content_icon">document_icon.png</property>
 <property name="icon_expr">string:${portal_url}/document_icon.png</property>
 <property name="factory">plonista</property>
 <property name="link_target"></property>
 <property name="immediate_view">view</property>
 <property name="global_allow">True</property>
 <property name="filter_content_types">True</property>
 <property name="allowed_content_types"/>
 <property name="allow_discussion">False</property>
 <property name="default_view">view</property>
 <property name="view_methods">
  <element value="view"/>
 </property>
 <property name="default_view_fallback">False</property>
plonista.xml (continued)
<property name="add_permission">cmf.AddPortalContent</property>
<property name="klass">plone.dexterity.content.Item</property>
<property name="behaviors">
 <element value="plone.app.content.interfaces.INameFromTitle"/>
</property>
<property name="schema"></property>        Can put model in a Zope 3 schema.
<property
   name="model_source">&lt;model xmlns="http://namespaces.plone.org/supermodel/schema"&gt;
   &lt;schema&gt;
     &lt;field name="title" type="zope.schema.TextLine"&gt;
       &lt;description /&gt;
       &lt;title&gt;Name&lt;/title&gt;
     &lt;/field&gt;
     &lt;field name="portrait" type="plone.namedfile.field.NamedBlobImage"&gt;
       &lt;title&gt;Portrait&lt;/title&gt;
     &lt;/field&gt;
     &lt;field name="bio" type="plone.app.textfield.RichText"&gt;
       &lt;title&gt;Bio&lt;/title&gt;
     &lt;/field&gt;
   &lt;/schema&gt;
 &lt;/model&gt;</property>
<property name="model_file"></property>        Can put model in a separate fle.
                                               (These are the Dexterity-specifc bits.)
plonista.xml (continued)
 <alias from="(Default)" to="(selected layout)"/>
 <alias from="edit" to="@@edit"/>
 <alias from="sharing" to="@@sharing"/>
 <alias from="view" to="@@view"/>
 <action title="View" action_id="view" category="object" condition_expr=""
    icon_expr="" link_target="" url_expr="string:${object_url}"
    visible="True">
  <permission value="View"/>
 </action>
 <action title="Edit" action_id="edit" category="object" condition_expr=""
    icon_expr="" link_target="" url_expr="string:${object_url}/edit"
    visible="True">
  <permission value="Modify portal content"/>
 </action>
</object>
Custom add permission
• In configure.zcml:
     <permission
         id="example.ploneconf09.AddPlonista"
         title="example.ploneconf09: Add plonista"
         />


• In plonista.xml:
   <property name="add_permission">example.ploneconf09.AddPlonista</property>



• Add collective.autopermission dependency
  in setup.py, rerun buildout
Using a Zope 3 schema
• In plonista.py:
from   zope import schema
from   plone.directives import form
from   plone.namedfile.field import NamedBlobImage
from   plone.app.textfield import RichText

class IPlonista(form.Schema):
    title = schema.TextLine(
        title = u'Name',
        )
    portrait = NamedBlobImage(
        title = u'Portrait',
        required = False,
        )
    bio = RichText(
        title=u'Bio',
        required = False,
        )
Using a Zope 3 Schema
• In configure.zcml:
 <configure
     ...
     xmlns:grok="http://namespaces.zope.org/grok">
   <grok:grok package="."/>
   ...
 </configure>



• Add five.grok to dependencies in setup.py
• In plonista.xml:
  <property name="schema">example.ploneconf09.plonista.IPlonista</property>
  <property name="model_source"></property>
Specifying a fieldset
class IPlonista(form.Schema):
    …

    bio = RichText(
        title=u'Bio',
        required = False,
        )
    form.fieldset(
        'bio',
        label=u'Bio',
        fields=['bio'],
        )
More form directives
•   widget – specify alternate widget
•   omitted – omits fields
•   mode – input, display, or hidden
•   order_before, order_after – adjust position
plone.directives.dexterity
• read_permission
• write_permission
Custom view template
• In plonista.py:
 from five import grok
 class View(grok.View):
     grok.context(IPlonista)
     grok.require('zope2.View')
• In plonista_templates/view.pt
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
       xmlns:tal="http://xml.zope.org/namespaces/tal"
       xmlns:metal="http://xml.zope.org/namespaces/metal"
       xmlns:i18n="http://xml.zope.org/namespaces/i18n"
       lang="en" metal:use-macro="context/main_template/macros/master"
       i18n:domain="example.conference">
<body>
<metal:main fill-slot="main">
    <tal:main-macro metal:define-macro="main">
         <div tal:replace="structure provider:plone.abovecontenttitle" />
         <h1 class="documentFirstHeading" tal:content="context/title" />
         <div tal:replace="structure provider:plone.belowcontenttitle" />
         <div tal:replace="structure provider:plone.abovecontentbody" />
         <div tal:define="portrait nocall:context/portrait" tal:condition="nocall:portrait"><img
tal:attributes="src string:${context/absolute_url}/@@download/portrait/${portrait/filename};
                                  height portrait/_height | nothing;
                                  width portrait/_width | nothing;" />
         </div>
         <div tal:content="structure context/bio/output" />
         <div tal:replace="structure provider:plone.belowcontentbody" />
    </tal:main-macro>
</metal:main>
</body>
</html>
Add the package to buildout
[buildout]
develop = src/example.ploneconf09

[instance]
…
eggs =
    …
    example.ploneconf09
Install the new package
Existing content automatically
provides the new schema
The custom view
The pieces




             http://www.fickr.com/photos/intvgene/370973576/
five.grok
• Allows for writing configuration directives
  in Python and in place, instead of using
  ZCML.
• “Grok” a package using the following
  ZCML, and it will register anything its
  grokkers find and recognize.
   <grok:grok package="." />
plone.dexterity
• Base content classes.
• FTI (Factory Type Information)
  provides for dynamic lookup
  of model and schema.
• Default edit form and view.
plone.autoform
• Dexterity renders widgets using z3c.form.
• Plone.autoform makes it possible for a form
  to be composed by schemas and form hints
  from different sources.
  (Main schema + behavior schemas,
   in the case of Dexterity.)
plone.schemaeditor
• Provides the UI for editing Zope 3
  interfaces through the web.
• Dexterity integrates it with the Dexterity
  types control panel, but it could be used
  separately.
• IFieldFactory lookup determines what
  fields can be edited.
plone.supermodel
• Serializer translates a Zope 3 schema into
  XML.
• Parser translates an XML schema into a
  Zope 3 schema.
• Easily extensible
 » Field handlers found via adapter lookup
 » Additional metadata handlers may handle
   custom XML namespaces
plone.directives.form
• Defines the form rendering hint directives
  that may be included in schemas for use by
  plone.autoform when rendering forms and
  views.
plone.directives.dexterity
• Grok directives for custom content classes
  and forms.
plone.folder
• Orderable Btree-based folder
  implementation.
• Will also be the basis for AT-based folders
  in Plone 4.
plone.behavior
• A behavior is a conditional adapter.
• In Dexterity, the condition is whether the
  behavior is listed in the FTI for an item.
• ZCML directive for registering new
  behaviors.
plone.rfc822
• Supports the marshalling of Dexterity
  content into RFC 822 format.
• Used to support access via WebDAV.
plone.app.dexterity
• Pulls in everything you need.
• Standard behaviors.
 » Dublin Core
 » Related Items
• Dexterity types control panel.
Status report / roadmap




            http://www.fickr.com/photos/brianatwebbmoto/2392041992/sizes/m/
Core functionality
Schema serialization
Automatic form
generation
Portlet assignments
Content rules
Relations
• Not working between Archetypes and
  Dexterity content in the same site
Widgets
• Not as rich as Archetypes yet, but better
  than formlib. We have autocomplete,
  browse-for-content, file/image upload.
TTW schema editing
• Works fine, but needs more real-life use.
Image & file support
  (via plone.namedfile &
  plone.formwidget.namedfile)
• No support for image scaling yet.
Text transform support
 (via plone.app.textfield)
Select field support
• No way to define vocabularies through the
  web yet.
WebDAV support
Versioning & staging
• In progress
TTW behavior creation
Automatic migration
from Archetypes
content
Multi-lingual content
• Some discussion, but no code yet.
Link integrity checks
Upcoming releases
• Second alpha release was on Oct. 12
• First beta release coming soon
Compatibility
• Plone 3
• Plone 4 compatibility coming soon
Performance
Further information
• Dexterity manual:
  http://plone.org/products/dexterity/docu
  mentation/manual/developer-manual
• Behaviors manual:
  http://plone.org/products/dexterity/docu
  mentation/manual/behaviors
• Over 30,000 words!
Example Code
• example.dexterity
• example.conference
  (both in the collective)

• Example code from this talk:
  http://svn.plone.org/svn/plone/plone.dext
  erity/example.ploneconf09
Thanks to everyone who has
contributed to making
Dexterity a reality!




                http://www.fickr.com/photos/torley/2862255105/
Getting involved
• Google Code project:
  http://code.google.com/p/dexterity/
• Google Group:
  http://groups.google.com/group/dexterity-
  development

More Related Content

What's hot

Design patterns revisited with PHP 5.3
Design patterns revisited with PHP 5.3Design patterns revisited with PHP 5.3
Design patterns revisited with PHP 5.3Fabien Potencier
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 
Python & Django TTT
Python & Django TTTPython & Django TTT
Python & Django TTTkevinvw
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVCJace Ju
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a bossFrancisco Ribeiro
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Jacob Kaplan-Moss
 
Djangocon 2014 angular + django
Djangocon 2014 angular + djangoDjangocon 2014 angular + django
Djangocon 2014 angular + djangoNina Zakharenko
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creationbenalman
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third PluginJustin Ryan
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrideugenio pombi
 
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014Matthias Noback
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design PatternsRobert Casanova
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application StructureSEONGTAEK OH
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2pyjonromero
 
Flask patterns
Flask patternsFlask patterns
Flask patternsit-people
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingDougal Campbell
 

What's hot (20)

Design patterns revisited with PHP 5.3
Design patterns revisited with PHP 5.3Design patterns revisited with PHP 5.3
Design patterns revisited with PHP 5.3
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Python & Django TTT
Python & Django TTTPython & Django TTT
Python & Django TTT
 
Django Heresies
Django HeresiesDjango Heresies
Django Heresies
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVC
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
 
Djangocon 2014 angular + django
Djangocon 2014 angular + djangoDjangocon 2014 angular + django
Djangocon 2014 angular + django
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creation
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third Plugin
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrid
 
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
High Quality Symfony Bundles tutorial - Dutch PHP Conference 2014
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design Patterns
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application Structure
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2py
 
Flask patterns
Flask patternsFlask patterns
Flask patterns
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin Programming
 

Similar to Build Dexterity Content Types

Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zopementtes
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 
Pragmatische Plone Projekte
Pragmatische Plone ProjektePragmatische Plone Projekte
Pragmatische Plone ProjekteAndreas Jung
 
Pragmatic plone projects
Pragmatic plone projectsPragmatic plone projects
Pragmatic plone projectsAndreas Jung
 
The Naked Bundle - Tryout
The Naked Bundle - TryoutThe Naked Bundle - Tryout
The Naked Bundle - TryoutMatthias Noback
 
Build Python CMS The Plone Way
Build Python CMS The Plone WayBuild Python CMS The Plone Way
Build Python CMS The Plone WayTsungWei Hu
 
The Naked Bundle - Symfony Live London 2014
The Naked Bundle - Symfony Live London 2014The Naked Bundle - Symfony Live London 2014
The Naked Bundle - Symfony Live London 2014Matthias Noback
 
World Plone Day 2012 Taipei
World Plone Day 2012 TaipeiWorld Plone Day 2012 Taipei
World Plone Day 2012 TaipeiTsungWei Hu
 
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAcceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAsko Soukka
 
Whoops! where did my architecture go?
Whoops! where did my architecture go?Whoops! where did my architecture go?
Whoops! where did my architecture go?Oliver Gierke
 
Zotonic presentation Erlang Camp Boston, august 2011
Zotonic presentation Erlang Camp Boston, august 2011Zotonic presentation Erlang Camp Boston, august 2011
Zotonic presentation Erlang Camp Boston, august 2011Arjan
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleFelix Meschberger
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleFelix Meschberger
 
Content Mirror
Content MirrorContent Mirror
Content Mirrorfravy
 
A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...Carlos de la Guardia
 
The Naked Bundle - Symfony Usergroup Belgium
The Naked Bundle - Symfony Usergroup BelgiumThe Naked Bundle - Symfony Usergroup Belgium
The Naked Bundle - Symfony Usergroup BelgiumMatthias Noback
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...Vincenzo Barone
 
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsUpgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsHeather Wozniak
 
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise PlatformBIOVIA
 

Similar to Build Dexterity Content Types (20)

Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zope
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
Pragmatische Plone Projekte
Pragmatische Plone ProjektePragmatische Plone Projekte
Pragmatische Plone Projekte
 
Pragmatic plone projects
Pragmatic plone projectsPragmatic plone projects
Pragmatic plone projects
 
The Naked Bundle - Tryout
The Naked Bundle - TryoutThe Naked Bundle - Tryout
The Naked Bundle - Tryout
 
Build Python CMS The Plone Way
Build Python CMS The Plone WayBuild Python CMS The Plone Way
Build Python CMS The Plone Way
 
The Naked Bundle - Symfony Live London 2014
The Naked Bundle - Symfony Live London 2014The Naked Bundle - Symfony Live London 2014
The Naked Bundle - Symfony Live London 2014
 
World Plone Day 2012 Taipei
World Plone Day 2012 TaipeiWorld Plone Day 2012 Taipei
World Plone Day 2012 Taipei
 
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAcceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and selenium
 
Whoops! where did my architecture go?
Whoops! where did my architecture go?Whoops! where did my architecture go?
Whoops! where did my architecture go?
 
Zotonic presentation Erlang Camp Boston, august 2011
Zotonic presentation Erlang Camp Boston, august 2011Zotonic presentation Erlang Camp Boston, august 2011
Zotonic presentation Erlang Camp Boston, august 2011
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi Style
 
Declarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi StyleDeclarative Services - Dependency Injection OSGi Style
Declarative Services - Dependency Injection OSGi Style
 
Content Mirror
Content MirrorContent Mirror
Content Mirror
 
KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
 
A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...
 
The Naked Bundle - Symfony Usergroup Belgium
The Naked Bundle - Symfony Usergroup BelgiumThe Naked Bundle - Symfony Usergroup Belgium
The Naked Bundle - Symfony Usergroup Belgium
 
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...David Rey   Lessons Learned   Updating Content Licensing To Be Plone 3 Compat...
David Rey Lessons Learned Updating Content Licensing To Be Plone 3 Compat...
 
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsUpgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
 
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
(ATS3-DEV08) Team Development with Accelrys Enterprise Platform
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Build Dexterity Content Types

  • 1. Building Content Types with Dexterity David Glick Plone Conference 2009
  • 2. Groundwire uses the power of technology to connect people, organizations, and communities working to build a sustainable society.
  • 3. What is a content type?
  • 4. A way of categorizing the items in your site Page Something Else
  • 8. Miscellaneous settings • Placeful restrictions • Comments • Searchability • Per-type portlet assignments • etc.
  • 9. History Lesson http://commons.wikimedia.org/wiki/File:1893_Nina_Pinta_Santa_Maria_replicas.jpg
  • 10. Content Management Framework (CMF) • Underlying framework for registering types, assigning workflow • CMFDefault contains sample types which used to be used by Plone • Not schema-based
  • 11. Archetypes • Schema-based form generation • Basis of Plone's current default content types (ATContentTypes) • Not going away anytime soon
  • 12. Dexterity Martin Aspeli
  • 13. Goals http://www.fickr.com/photos/paul-w-locke/1662634481/sizes/m/
  • 14. Make filesystem content type development sane
  • 16. Make it possible to switch back and forth between the 2
  • 17. Philosophy http://www.fickr.com/photos/ulrichsson/3519217737/
  • 19. Small over big Pro duc ts .Arc he ty pe s plone.app.dexterity base classes metadata plone.behavior felds schema plone.directives.* plone.autoform widgets plo ne .de x te rity storage plone.supermodel z3c.form reference engine plone.schemaeditor plone.app.relations
  • 20. Natural interaction over excessive generality diffculty time
  • 21. Real code over generated code
  • 22. Zope 3 over Zope 2
  • 24. Let's build a content type!
  • 25. Installing Dexterity [buildout] extends = http://dist.plone.org/release/3.3.1/versions.cfg http://good-py.appspot.com/release/dexterity/1.0a2 … [instance] … eggs = … plone.app.dexterity
  • 33. A few issues • Bad short name for URL (“plonista”) • Showing lots of metadata fields we don't care about • We want it to say “Name” instead of “Title” • Doesn't store anything interesting yet :) ...so let's fix it!
  • 34. Behaviors s ubc la s s ing s c he m a be ha v io rs schema e x te ns io n ATFile schema model schema schema schema Deco thumbnail schema layout image ATFile Dexterity versioned File name from CustomATFile ATFile title geolocatable ratings
  • 35. Editing the 'Plonista' Behaviors Disable this to hide the metadata Enable this to generate short name from title
  • 37. Adding a Field This will replace the title feld that used to come from the Dublin Core behavior.
  • 39. Editing a field We are changing the title of this feld to 'Name'.
  • 40. Edit a revised 'Plonista'
  • 41.
  • 42. Rapid Prototyping • The schema object in memory is directly modified, so changes take effect immediately. • The changes are also serialized to XML and stored in the ZODB (in a property of the FTI), so they are persistent when Zope restarts.
  • 43. Modifying a Type • You can add, remove, and rename fields through the web. • But, values stored in existing instances will not be automatically removed or converted. So be careful.
  • 44. Some more desired refinements • Custom add permission • Show the 'bio' field in a separate fieldset. …we can't do these through the web (at least not yet)
  • 45. Filesystem roundtripping We b File s y s te m Zope 3 Schema Schema as Python interface Content Editing py Schema Editing xml xml External GenericSetup tools import/export XML schema in XML schema FTI on flesystem
  • 46. Exporting a type • GenericSetup export for now; better UI coming :)
  • 47. Minimal Dexterity package structure • example.ploneconf09 » /example • /ploneconf09 • /__init__.py • /configure.zcml • /profiles • /default • /metadata.xml • /types.xml • /types • plonista.xml » /setup.py
  • 48. setup.py setup(name='example.ploneconf09', ... install_requires=[ 'setuptools', 'plone.app.dexterity', Make sure we automatically get Dexterity # -*- Extra requirements: -*- ], entry_points=""" [z3c.autoinclude.plugin] Make sure we don't need a ZCML slug target = plone (in Plone 3.3 and greater) """, )
  • 49. __init__.py # Nothing to see here; move along. :)
  • 50. configure.zcml <configure xmlns="http://namespaces.zope.org/zope" xmlns:grok="http://namespaces.zope.org/grok" xmlns:genericsetup="http://namespaces.zope.org/genericsetup" i18n_domain="example.ploneconf09"> Loads ZCML for all dependency <includeDependencies package="."/> packages listed in setup.py <genericsetup:registerProfile name="default" title="Plone conference Dexterity example" directory="profiles/default" description="Installs the Dexterity example for the Plone conference." provides="Products.GenericSetup.interfaces.EXTENSION" /> </configure>
  • 51. types.xml <?xml version="1.0"?> <object name="portal_types" meta_type="Plone Types Tool"> <object name="plonista" meta_type="Dexterity FTI"/> </object> metadata.xml <metadata> <version>1</version> <dependencies> <dependency>profile-plone.app.dexterity:default</dependency> </dependencies> </metadata>
  • 52. plonista.xml <?xml version="1.0"?> <object name="plonista" meta_type="Dexterity FTI" xmlns:i18n="http://xml.zope.org/namespaces/i18n"> <property name="title">Plonista</property> <property name="description">A member of the Plone community.</property> <property name="content_icon">document_icon.png</property> <property name="icon_expr">string:${portal_url}/document_icon.png</property> <property name="factory">plonista</property> <property name="link_target"></property> <property name="immediate_view">view</property> <property name="global_allow">True</property> <property name="filter_content_types">True</property> <property name="allowed_content_types"/> <property name="allow_discussion">False</property> <property name="default_view">view</property> <property name="view_methods"> <element value="view"/> </property> <property name="default_view_fallback">False</property>
  • 53. plonista.xml (continued) <property name="add_permission">cmf.AddPortalContent</property> <property name="klass">plone.dexterity.content.Item</property> <property name="behaviors"> <element value="plone.app.content.interfaces.INameFromTitle"/> </property> <property name="schema"></property> Can put model in a Zope 3 schema. <property name="model_source">&lt;model xmlns="http://namespaces.plone.org/supermodel/schema"&gt; &lt;schema&gt; &lt;field name="title" type="zope.schema.TextLine"&gt; &lt;description /&gt; &lt;title&gt;Name&lt;/title&gt; &lt;/field&gt; &lt;field name="portrait" type="plone.namedfile.field.NamedBlobImage"&gt; &lt;title&gt;Portrait&lt;/title&gt; &lt;/field&gt; &lt;field name="bio" type="plone.app.textfield.RichText"&gt; &lt;title&gt;Bio&lt;/title&gt; &lt;/field&gt; &lt;/schema&gt; &lt;/model&gt;</property> <property name="model_file"></property> Can put model in a separate fle. (These are the Dexterity-specifc bits.)
  • 54. plonista.xml (continued) <alias from="(Default)" to="(selected layout)"/> <alias from="edit" to="@@edit"/> <alias from="sharing" to="@@sharing"/> <alias from="view" to="@@view"/> <action title="View" action_id="view" category="object" condition_expr="" icon_expr="" link_target="" url_expr="string:${object_url}" visible="True"> <permission value="View"/> </action> <action title="Edit" action_id="edit" category="object" condition_expr="" icon_expr="" link_target="" url_expr="string:${object_url}/edit" visible="True"> <permission value="Modify portal content"/> </action> </object>
  • 55. Custom add permission • In configure.zcml: <permission id="example.ploneconf09.AddPlonista" title="example.ploneconf09: Add plonista" /> • In plonista.xml: <property name="add_permission">example.ploneconf09.AddPlonista</property> • Add collective.autopermission dependency in setup.py, rerun buildout
  • 56. Using a Zope 3 schema • In plonista.py: from zope import schema from plone.directives import form from plone.namedfile.field import NamedBlobImage from plone.app.textfield import RichText class IPlonista(form.Schema): title = schema.TextLine( title = u'Name', ) portrait = NamedBlobImage( title = u'Portrait', required = False, ) bio = RichText( title=u'Bio', required = False, )
  • 57. Using a Zope 3 Schema • In configure.zcml: <configure ... xmlns:grok="http://namespaces.zope.org/grok"> <grok:grok package="."/> ... </configure> • Add five.grok to dependencies in setup.py • In plonista.xml: <property name="schema">example.ploneconf09.plonista.IPlonista</property> <property name="model_source"></property>
  • 58. Specifying a fieldset class IPlonista(form.Schema): … bio = RichText( title=u'Bio', required = False, ) form.fieldset( 'bio', label=u'Bio', fields=['bio'], )
  • 59. More form directives • widget – specify alternate widget • omitted – omits fields • mode – input, display, or hidden • order_before, order_after – adjust position
  • 61. Custom view template • In plonista.py: from five import grok class View(grok.View): grok.context(IPlonista) grok.require('zope2.View')
  • 62. • In plonista_templates/view.pt <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" xmlns:i18n="http://xml.zope.org/namespaces/i18n" lang="en" metal:use-macro="context/main_template/macros/master" i18n:domain="example.conference"> <body> <metal:main fill-slot="main"> <tal:main-macro metal:define-macro="main"> <div tal:replace="structure provider:plone.abovecontenttitle" /> <h1 class="documentFirstHeading" tal:content="context/title" /> <div tal:replace="structure provider:plone.belowcontenttitle" /> <div tal:replace="structure provider:plone.abovecontentbody" /> <div tal:define="portrait nocall:context/portrait" tal:condition="nocall:portrait"><img tal:attributes="src string:${context/absolute_url}/@@download/portrait/${portrait/filename}; height portrait/_height | nothing; width portrait/_width | nothing;" /> </div> <div tal:content="structure context/bio/output" /> <div tal:replace="structure provider:plone.belowcontentbody" /> </tal:main-macro> </metal:main> </body> </html>
  • 63. Add the package to buildout [buildout] develop = src/example.ploneconf09 [instance] … eggs = … example.ploneconf09
  • 64. Install the new package
  • 67. The pieces http://www.fickr.com/photos/intvgene/370973576/
  • 68. five.grok • Allows for writing configuration directives in Python and in place, instead of using ZCML. • “Grok” a package using the following ZCML, and it will register anything its grokkers find and recognize. <grok:grok package="." />
  • 69. plone.dexterity • Base content classes. • FTI (Factory Type Information) provides for dynamic lookup of model and schema. • Default edit form and view.
  • 70. plone.autoform • Dexterity renders widgets using z3c.form. • Plone.autoform makes it possible for a form to be composed by schemas and form hints from different sources. (Main schema + behavior schemas, in the case of Dexterity.)
  • 71. plone.schemaeditor • Provides the UI for editing Zope 3 interfaces through the web. • Dexterity integrates it with the Dexterity types control panel, but it could be used separately. • IFieldFactory lookup determines what fields can be edited.
  • 72. plone.supermodel • Serializer translates a Zope 3 schema into XML. • Parser translates an XML schema into a Zope 3 schema. • Easily extensible » Field handlers found via adapter lookup » Additional metadata handlers may handle custom XML namespaces
  • 73. plone.directives.form • Defines the form rendering hint directives that may be included in schemas for use by plone.autoform when rendering forms and views.
  • 74. plone.directives.dexterity • Grok directives for custom content classes and forms.
  • 75. plone.folder • Orderable Btree-based folder implementation. • Will also be the basis for AT-based folders in Plone 4.
  • 76. plone.behavior • A behavior is a conditional adapter. • In Dexterity, the condition is whether the behavior is listed in the FTI for an item. • ZCML directive for registering new behaviors.
  • 77. plone.rfc822 • Supports the marshalling of Dexterity content into RFC 822 format. • Used to support access via WebDAV.
  • 78. plone.app.dexterity • Pulls in everything you need. • Standard behaviors. » Dublin Core » Related Items • Dexterity types control panel.
  • 79. Status report / roadmap http://www.fickr.com/photos/brianatwebbmoto/2392041992/sizes/m/
  • 85. Relations • Not working between Archetypes and Dexterity content in the same site
  • 86. Widgets • Not as rich as Archetypes yet, but better than formlib. We have autocomplete, browse-for-content, file/image upload.
  • 87. TTW schema editing • Works fine, but needs more real-life use.
  • 88. Image & file support (via plone.namedfile & plone.formwidget.namedfile) • No support for image scaling yet.
  • 89. Text transform support (via plone.app.textfield)
  • 90. Select field support • No way to define vocabularies through the web yet.
  • 95. Multi-lingual content • Some discussion, but no code yet.
  • 97. Upcoming releases • Second alpha release was on Oct. 12 • First beta release coming soon
  • 98. Compatibility • Plone 3 • Plone 4 compatibility coming soon
  • 100. Further information • Dexterity manual: http://plone.org/products/dexterity/docu mentation/manual/developer-manual • Behaviors manual: http://plone.org/products/dexterity/docu mentation/manual/behaviors • Over 30,000 words!
  • 101. Example Code • example.dexterity • example.conference (both in the collective) • Example code from this talk: http://svn.plone.org/svn/plone/plone.dext erity/example.ploneconf09
  • 102. Thanks to everyone who has contributed to making Dexterity a reality! http://www.fickr.com/photos/torley/2862255105/
  • 103. Getting involved • Google Code project: http://code.google.com/p/dexterity/ • Google Group: http://groups.google.com/group/dexterity- development