SlideShare a Scribd company logo
1 of 64
Download to read offline
Developing for Plone using
ArchGenXML / ArgoUML
       Plone Magic Camp
          Brooklyn, NY
          July 24, 2006

            Nate Aune
        Jazkarta Consulting
         www.jazkarta.com
Who am I?

• Founder and developer, Jazkarta Consulting
  (www.jazkarta.com)

• Musician - saxophonist and composer
  (www.nateaune.com/music/)

• Founder of Plone4Artists project
  (www.plone4artists.org)
Agenda
• What is Archetypes?
• What is UML?
• What is ArchGenXML?
• Build a model using ArgoUML
• Transform the model into a Plone product
• Questions?
What is Archetypes?

• Framework for developing Plone products
  • Automatically creates view and edit pages
  • Maintains unique object IDs
  • Creates references between objects
Archetypes framework

• Field validation
• Standard security setup
• Alternate storage options
• Data transformation capabilities
Archetypes schemas
 • Schema
   • Field
    • Widget
   • Field
    • Widget
   • ...
Example Archetype:
      Artist
schema= Schema((
	

 StringField('title'),
	

 ImageField('photo'),
	

 LinesField('instrument'),
))

class Artist(BaseContent)
	

 schema = BaseSchema + schema

registerType(Artist,PROJECTNAME)
Widgets
schema= Schema((
	

 StringField('title',
	

     widget=StringWidget(
	

              label=’Artist name’,
                  size=20),
     ),
	

 ImageField('photo',
         widget=ImageWidget(
                  label=’Headshot’),
     ),
	

 LinesField('instrument',
         widget=MultiSelectionWidget(
                  label=’Instruments’),
         multiValue=1,
     ),
))
What is UML?

• UML = Uniform Modeling Language
• Standard widely-adopted graphical language
• Describes the artifacts of software systems
• Focus on conceptual representations
Artist:
Described in UML
Poseidon UML tool
What is ArchGenXML?

• Command line utility
• Auto-generates code from a UML model
• No round-trip support yet
• Custom code is preserved upon
  regeneration
Why use ArchGenXML?
      (part 1)
• You want to save time
• You are a lazy programmer
• You don’t like to reinvent the wheel
• You don’t like copying and pasting code
• You make heavy use of references and
  interfaces
Why use ArchGenXML?
      (part 2)
• You have big projects with many different
  content types

• You want or need a well-documented
  interface to your product

• You like structured model- and pattern-
  driven software development

• You want to maintain your project in the
  future without getting a headache
UML to Archetypes
using ArchGenXML
            schema= Schema((
            	

     StringField('title',
            	

         widget=StringWidget(
            	

                   label=’Artist name’
                              size=20),
                 ),
            	

     ImageField('photo',
                     widget=ImageWidget(
                              label=’Headshot’),
                 ),
            	

     LinesField('instrument',
                     widget=MultiSelectionWidget(
                              label=’Instruments’),
                     multiValue=1,
                 ),
            ))
UML speak to AT speak
• package        • product

• class          • content type

• operation      • method

• attribute      • field

• tagged value   • property

• stereotype     • subclass, view, etc.
In practice

1. Save your model to the Products dir
2. Run the ArchGenXML script
3. Restart Zope
4. Install the newly generated product
ArchGenXML components
 • ArchGenXML
 • Optional:
   • i18ndude
   • stripogram
   • ATBackRef
   • ATVocabularyManager
   • Relations
Install ArchGenXML
•   Get PloneMagicCamp-bundle
$ svn co svn://svn.plone4artists.org/trunk/PloneMagicCamp-bundle
   (* if you don’t have SVN, download the .zip file)

$ cd $INSTANCE/Products

$ ln -s /path/to/PloneMagicCamp-bundle/* .

$ cd i18ndude; sudo /path/to/python setup.py install

$ cd ../; ./getStripogram.sh

$ cd stripogram; sudo /path/to/python setup.py install



    * If you don’t have SVN client, get the ZIP file.
    $ wget http://www.jazkarta.com/PloneMagicCamp-bundle.zip
    $ unzip PloneMagicCamp-bundle.zip
Install ArgoUML
•    Use the pre-configured one that comes with the bundle
•    --OR-- download from http://argouml.tigris.org
$ wget http://argouml-downloads.tigris.org/nonav/argouml-0.20/
ArgoUML-0.20.tar.gz

$ tar xvfz ArgoUML-0.20.tar.gz

$ cd ArgoUML-0.20

$ cp $INSTANCE_HOME/Products/ArchGenXML/argouml/argouml_profile.xmi .

$ cp argouml.sh argouml.sh.orig; vi argouml.sh

    change line 48 to:

    ${JAVACMD} -Dargo.defaultModel=argouml_profile.xmi -jar $
    {ARGO_HOME}/argouml-mdr.jar $*

$ sh argouml.sh   (to launch ArgoUML)
--OR--
$ java -Dargo.defaultModel=argouml_profile.xmi -jar argouml-mdr.jar
AGX options in ArgoUML!
Create Artist class
Add description and icon
Repurpose Title field
Set the photo sizes
Add instrument vocabulary
Running the script
•   Save project to $INSTANCE_HOME/Products/ArtistSite.zargo

$ cd $INSTANCE_HOME/Products

$ ArchGenXML/ArchGenXML.py -o ArtistSite ArtistSite.zargo

ArchGenXML Version 1.5.0 svn/devel
(c) 2003-2006 BlueDynamics, Austria, GNU General Public License 2.0
or later
INFO Parsing...
INFO Directory in which we're generating the files: 'ArtistSite'.
INFO Generating...
INFO Starting new Product: 'ArtistSite'.
INFO      Generating package 'content'.
INFO          Generating class 'Artist'.

$
ArtistSite product dir
$ cd $INSTANCE_HOME/Products/ArtistSite

$ ls
content          __init__.py    i18n          skins
Extensions       config.py      refresh.txt   version.txt

$ cd content

$ ls
__init__.py      Artist.py

$ vi Artist.py
Inspect Artist.py
• Inserts documentation
• Placeholders for custom code
• i18n message ids
• Using ArtistSite/model/generate_source.sh
  • inserts author information (ArtistSite.conf)
  • creates i18n generated.pot file (i18ndude)
  • strips HTML from doc strings (stripogram)
Add new artist
1. Restart Zope
2. Install ArtistSite using QuickInstaller
3. Add new Artist
Edit artist form
View artist
Move model into product
• Close ArgoUML since we are going to move the file
$ cd $INSTANCE/Products

$ mkdir ArtistSite/model

$ mv ArtistSite.zargo ArtistSite/model

$ ArchGenXML/ArchGenXML.py --sample-config  ArtistSite/model/
ArtistSite.conf

$ cp PloneMagicCamp-bundle/generate_source.sh ArtistSite/model/
Edit ArtistSite.conf
• Add your own author, email and copyright
 [DOCUMENTATION]

 strip-html: yes
 author: Nate Aune
 e-mail: natea (at) jazkarta (dot) com
 copyright: Jazkarta

 [GENERAL]
 outfile: ArtistSite
Edit generate_source.sh
   • Change PYTHON_BIN to your Python
#! /usr/bin/env bash

PRODUCT_NAME=quot;ArtistSitequot;
PRODUCTS_HOME=quot;`pwd`quot;
PYTHON_BIN=quot;/sw/bin/python2.4quot;

$PYTHON_BIN $PRODUCTS_HOME/ArchGenXML/ArchGenXML.py -c /
$PRODUCTS_HOME/$PRODUCT_NAME/model/$PRODUCT_NAME.conf /
$PRODUCTS_HOME/$PRODUCT_NAME/model/$PRODUCT_NAME.zargo
Run generate_source.sh
$ cd $INSTANCE_HOME/Products

$ ArtistSite/model/generate_source.sh

ArchGenXML Version 1.5.0 svn/devel
(c) 2003-2006 BlueDynamics, Austria, GNU General Public License 2.0
or later
INFO Parsing...
INFO Directory in which we're generating the files: 'ArtistSite'.
INFO Generating...
INFO Starting new Product: 'ArtistSite'.
INFO      Generating package 'content'.
INFO          Generating class 'Artist'.

$
Dynamic vocabulary
Add ATVM as dependency

• Edit ArtistSite/AppConfig.py
• Add line to:
  • DEPENDENCIES = ['ATVocabularyManager']
• Restart Zope
• Reinstall ArtistSite
Vocabulary Library
• Go to Plone Setup and choose Vocabulary Library
Add a vocabulary term
Hierarchical vocabularies
Tagged values

• cd $INSTANCE/Products/ArchGenXML
• ./TaggedValueSupport.py | more
• ./TaggedValueSupport.py  tagged-values.txt
•
Containment




    Use the solid rhomb to make a strict containment
‘Artist’ instances can only be added to an ‘Artists’ instance
Use large stereotype
Give it a friendly name
Add Artists container
References


           Create a
       direct association

           results in:

        Reference field
       group to artist(s)
Create direct association
Change the multiplicity (0..*)
  • Right-click the end point
  • Select Multiplicity 0..* (many artists in a group)
Group
   edit
  form



 Group is
associated
with artists
Reference Browser Widget
        as default
Configure browser widget

             Select the end point




                 Make multivalued
                Specify relationship
                   Define query
Adding references
Add back reference
Add ATBackRef as
        dependency
• Edit ArtistSite/AppConfig.py
• Change line to:
  •   DEPENDENCIES = ['ATVocabularyManager', ‘ATBackRef’]

• Restart Zope
• Reinstall ArtistSite
Back
references




   Groups that
 artist belongs to
Custom view for group folder
Assign member stereotype




    Add the ‘member’ stereotype to tell
   ArchGenXML to subclass CMFMember
Computed field
Registration form

• SiteMember is installed
• Replaces default member
• Easy way to create new
  member types
PloneMall

• Example of a sophisticated e-commerce
    framework built using UML

• See the UML model here:
•   http://www.plonemall.com/uml/UML-beta2.png/image_view_fullscreen
What I didn’t cover
• Additional Stereotypes
  • actions, portal_tool, abstract, stub,
     ordered

• portlets, configlet, customization policy
• Generalization (Interfaces)
• Workflow
• Unit testing, doctests
Links
•   ArchGenXML presentation - http://www.jazkarta.com/presentations/archgenxml-presentation

•   ArchGenXML product page - http://plone.org/products/archgenxml

•   ArchGenXML getting started tutorial by Jens Klein

     •   http://plone.org/documentation/tutorial/archgenxml-getting-started

     •   PDF formatted: http://www.fraterdeus.com/downloads/ArchGenXML_PDF_0.2.1/view

•   Intro to Archetypes by Sidnei da Silva, published on ZopeMag.com

     •   http://www.zopemag.com/Issue006/Section_Articles/article_IntroToArchteypes.html

•   Archetypes: Customizing Plone in 60 seconds (PDF) by Andy McKay

     •   http://www.enfoldsystems.com/About/Talks/archetypes.pdf

•   Archetypes Quick Reference by Maik Röder

     •   http://plone.org/products/archetypes/documentation/manual/quickref/referencemanual-all-pages

•   Archetypes API

     •   http://api.plone.org/

More Related Content

What's hot

Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQueryRemy Sharp
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS InternalEyal Vardi
 
Android UI Tips & Tricks
Android UI Tips & TricksAndroid UI Tips & Tricks
Android UI Tips & TricksDroidConTLV
 
AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.Yan Yankowski
 
st_launcher: Tonel-based Smalltalk shell Scripts
 st_launcher: Tonel-based Smalltalk shell Scripts st_launcher: Tonel-based Smalltalk shell Scripts
st_launcher: Tonel-based Smalltalk shell ScriptsESUG
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Python Ireland
 
Using Objects to Organize your jQuery Code
Using Objects to Organize your jQuery CodeUsing Objects to Organize your jQuery Code
Using Objects to Organize your jQuery CodeRebecca Murphey
 
A New Baseline for Front-End Devs
A New Baseline for Front-End DevsA New Baseline for Front-End Devs
A New Baseline for Front-End DevsRebecca Murphey
 
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
Plugin for Plugin, или расширяем Android New Build System. Антон РуткевичYandex
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS DirectivesChristian Lilley
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS ArchitectureEyal Vardi
 
Making Magento flying like a rocket! (A set of valuable tips for developers)
Making Magento flying like a rocket! (A set of valuable tips for developers)Making Magento flying like a rocket! (A set of valuable tips for developers)
Making Magento flying like a rocket! (A set of valuable tips for developers)Ivan Chepurnyi
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceParashuram N
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MySteve McMahon
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitRebecca Murphey
 
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...Codemotion
 

What's hot (20)

Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS Internal
 
Android UI Tips & Tricks
Android UI Tips & TricksAndroid UI Tips & Tricks
Android UI Tips & Tricks
 
Javascript in Plone
Javascript in PloneJavascript in Plone
Javascript in Plone
 
AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.
 
st_launcher: Tonel-based Smalltalk shell Scripts
 st_launcher: Tonel-based Smalltalk shell Scripts st_launcher: Tonel-based Smalltalk shell Scripts
st_launcher: Tonel-based Smalltalk shell Scripts
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
 
AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
 
Using Objects to Organize your jQuery Code
Using Objects to Organize your jQuery CodeUsing Objects to Organize your jQuery Code
Using Objects to Organize your jQuery Code
 
A New Baseline for Front-End Devs
A New Baseline for Front-End DevsA New Baseline for Front-End Devs
A New Baseline for Front-End Devs
 
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS Directives
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
Making Magento flying like a rocket! (A set of valuable tips for developers)
Making Magento flying like a rocket! (A set of valuable tips for developers)Making Magento flying like a rocket! (A set of valuable tips for developers)
Making Magento flying like a rocket! (A set of valuable tips for developers)
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh My
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development Toolkit
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
 

Similar to Developing for Plone using ArchGenXML / ArgoUML

ArchGenXML / UML and Plone
ArchGenXML / UML and PloneArchGenXML / UML and Plone
ArchGenXML / UML and PloneJazkarta, Inc.
 
What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?Christophe Porteneuve
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)Fabien Potencier
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Libraryjeresig
 
Extracting Plugins And Gems From Rails Apps
Extracting Plugins And Gems From Rails AppsExtracting Plugins And Gems From Rails Apps
Extracting Plugins And Gems From Rails AppsJosh Nichols
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDTBastian Feder
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseRalf Sternberg
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
 
George Thiruvathukal, User Experiences with Plone Content Management
George Thiruvathukal, User Experiences with Plone Content Management George Thiruvathukal, User Experiences with Plone Content Management
George Thiruvathukal, User Experiences with Plone Content Management webcontent2007
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsFlorian Weil
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Bastian Feder
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoJames Casey
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGuillaume Laforge
 
Modeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesModeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesRay Toal
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With YouDalibor Gogic
 

Similar to Developing for Plone using ArchGenXML / ArgoUML (20)

ArchGenXML / UML and Plone
ArchGenXML / UML and PloneArchGenXML / UML and Plone
ArchGenXML / UML and Plone
 
What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
Extracting Plugins And Gems From Rails Apps
Extracting Plugins And Gems From Rails AppsExtracting Plugins And Gems From Rails Apps
Extracting Plugins And Gems From Rails Apps
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
George Thiruvathukal, User Experiences with Plone Content Management
George Thiruvathukal, User Experiences with Plone Content Management George Thiruvathukal, User Experiences with Plone Content Management
George Thiruvathukal, User Experiences with Plone Content Management
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Sprockets
SprocketsSprockets
Sprockets
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
 
Modeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based GamesModeling Patterns for JavaScript Browser-Based Games
Modeling Patterns for JavaScript Browser-Based Games
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 

More from Jazkarta, Inc.

Traveling through time and place with Plone
Traveling through time and place with PloneTraveling through time and place with Plone
Traveling through time and place with PloneJazkarta, Inc.
 
Questions: A Form Library for Python with SurveyJS Frontend
Questions: A Form Library for Python with SurveyJS FrontendQuestions: A Form Library for Python with SurveyJS Frontend
Questions: A Form Library for Python with SurveyJS FrontendJazkarta, Inc.
 
The User Experience: Editing Composite Pages in Plone 6 and Beyond
The User Experience: Editing Composite Pages in Plone 6 and BeyondThe User Experience: Editing Composite Pages in Plone 6 and Beyond
The User Experience: Editing Composite Pages in Plone 6 and BeyondJazkarta, Inc.
 
WTA and Plone After 13 Years
WTA and Plone After 13 YearsWTA and Plone After 13 Years
WTA and Plone After 13 YearsJazkarta, Inc.
 
Collaborating With Orchid Data
Collaborating With Orchid DataCollaborating With Orchid Data
Collaborating With Orchid DataJazkarta, Inc.
 
Spend a Week Hacking in Sorrento!
Spend a Week Hacking in Sorrento!Spend a Week Hacking in Sorrento!
Spend a Week Hacking in Sorrento!Jazkarta, Inc.
 
Plone 5 Upgrades In Real Life
Plone 5 Upgrades In Real LifePlone 5 Upgrades In Real Life
Plone 5 Upgrades In Real LifeJazkarta, Inc.
 
Accessibility in Plone: The Good, the Bad, and the Ugly
Accessibility in Plone: The Good, the Bad, and the UglyAccessibility in Plone: The Good, the Bad, and the Ugly
Accessibility in Plone: The Good, the Bad, and the UglyJazkarta, Inc.
 
Getting Paid Without GetPaid
Getting Paid Without GetPaidGetting Paid Without GetPaid
Getting Paid Without GetPaidJazkarta, Inc.
 
An Open Source Platform for Social Science Research
An Open Source Platform for Social Science ResearchAn Open Source Platform for Social Science Research
An Open Source Platform for Social Science ResearchJazkarta, Inc.
 
For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...
For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...
For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...Jazkarta, Inc.
 
Anatomy of a Large Website Project
Anatomy of a Large Website ProjectAnatomy of a Large Website Project
Anatomy of a Large Website ProjectJazkarta, Inc.
 
Anatomy of a Large Website Project - With Presenter Notes
Anatomy of a Large Website Project - With Presenter NotesAnatomy of a Large Website Project - With Presenter Notes
Anatomy of a Large Website Project - With Presenter NotesJazkarta, Inc.
 
The Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with PloneThe Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with PloneJazkarta, Inc.
 
Plone Hosting: A Panel Discussion
Plone Hosting: A Panel DiscussionPlone Hosting: A Panel Discussion
Plone Hosting: A Panel DiscussionJazkarta, Inc.
 
Academic Websites in Plone
Academic Websites in PloneAcademic Websites in Plone
Academic Websites in PloneJazkarta, Inc.
 
Online Exhibits in Plone
Online Exhibits in PloneOnline Exhibits in Plone
Online Exhibits in PloneJazkarta, Inc.
 
Online exhibits in Plone
Online exhibits in PloneOnline exhibits in Plone
Online exhibits in PloneJazkarta, Inc.
 

More from Jazkarta, Inc. (20)

Traveling through time and place with Plone
Traveling through time and place with PloneTraveling through time and place with Plone
Traveling through time and place with Plone
 
Questions: A Form Library for Python with SurveyJS Frontend
Questions: A Form Library for Python with SurveyJS FrontendQuestions: A Form Library for Python with SurveyJS Frontend
Questions: A Form Library for Python with SurveyJS Frontend
 
The User Experience: Editing Composite Pages in Plone 6 and Beyond
The User Experience: Editing Composite Pages in Plone 6 and BeyondThe User Experience: Editing Composite Pages in Plone 6 and Beyond
The User Experience: Editing Composite Pages in Plone 6 and Beyond
 
WTA and Plone After 13 Years
WTA and Plone After 13 YearsWTA and Plone After 13 Years
WTA and Plone After 13 Years
 
Collaborating With Orchid Data
Collaborating With Orchid DataCollaborating With Orchid Data
Collaborating With Orchid Data
 
Spend a Week Hacking in Sorrento!
Spend a Week Hacking in Sorrento!Spend a Week Hacking in Sorrento!
Spend a Week Hacking in Sorrento!
 
Plone 5 Upgrades In Real Life
Plone 5 Upgrades In Real LifePlone 5 Upgrades In Real Life
Plone 5 Upgrades In Real Life
 
Accessibility in Plone: The Good, the Bad, and the Ugly
Accessibility in Plone: The Good, the Bad, and the UglyAccessibility in Plone: The Good, the Bad, and the Ugly
Accessibility in Plone: The Good, the Bad, and the Ugly
 
Getting Paid Without GetPaid
Getting Paid Without GetPaidGetting Paid Without GetPaid
Getting Paid Without GetPaid
 
An Open Source Platform for Social Science Research
An Open Source Platform for Social Science ResearchAn Open Source Platform for Social Science Research
An Open Source Platform for Social Science Research
 
For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...
For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...
For the Love of Volunteers! How Do You Choose the Right Technology to Manage ...
 
Anatomy of a Large Website Project
Anatomy of a Large Website ProjectAnatomy of a Large Website Project
Anatomy of a Large Website Project
 
Anatomy of a Large Website Project - With Presenter Notes
Anatomy of a Large Website Project - With Presenter NotesAnatomy of a Large Website Project - With Presenter Notes
Anatomy of a Large Website Project - With Presenter Notes
 
The Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with PloneThe Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with Plone
 
Plone Hosting: A Panel Discussion
Plone Hosting: A Panel DiscussionPlone Hosting: A Panel Discussion
Plone Hosting: A Panel Discussion
 
Plone+Salesforce
Plone+SalesforcePlone+Salesforce
Plone+Salesforce
 
Academic Websites in Plone
Academic Websites in PloneAcademic Websites in Plone
Academic Websites in Plone
 
Plone
PlonePlone
Plone
 
Online Exhibits in Plone
Online Exhibits in PloneOnline Exhibits in Plone
Online Exhibits in Plone
 
Online exhibits in Plone
Online exhibits in PloneOnline exhibits in Plone
Online exhibits in Plone
 

Recently uploaded

The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
DEPED Work From Home WORKWEEK-PLAN.docx
DEPED Work From Home  WORKWEEK-PLAN.docxDEPED Work From Home  WORKWEEK-PLAN.docx
DEPED Work From Home WORKWEEK-PLAN.docxRodelinaLaud
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewasmakika9823
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetDenis Gagné
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Tina Ji
 
Socio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptxSocio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptxtrishalcan8
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 

Recently uploaded (20)

The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
DEPED Work From Home WORKWEEK-PLAN.docx
DEPED Work From Home  WORKWEEK-PLAN.docxDEPED Work From Home  WORKWEEK-PLAN.docx
DEPED Work From Home WORKWEEK-PLAN.docx
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
 
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
 
Socio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptxSocio-economic-Impact-of-business-consumers-suppliers-and.pptx
Socio-economic-Impact-of-business-consumers-suppliers-and.pptx
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 

Developing for Plone using ArchGenXML / ArgoUML

  • 1. Developing for Plone using ArchGenXML / ArgoUML Plone Magic Camp Brooklyn, NY July 24, 2006 Nate Aune Jazkarta Consulting www.jazkarta.com
  • 2. Who am I? • Founder and developer, Jazkarta Consulting (www.jazkarta.com) • Musician - saxophonist and composer (www.nateaune.com/music/) • Founder of Plone4Artists project (www.plone4artists.org)
  • 3. Agenda • What is Archetypes? • What is UML? • What is ArchGenXML? • Build a model using ArgoUML • Transform the model into a Plone product • Questions?
  • 4. What is Archetypes? • Framework for developing Plone products • Automatically creates view and edit pages • Maintains unique object IDs • Creates references between objects
  • 5. Archetypes framework • Field validation • Standard security setup • Alternate storage options • Data transformation capabilities
  • 6. Archetypes schemas • Schema • Field • Widget • Field • Widget • ...
  • 7. Example Archetype: Artist schema= Schema(( StringField('title'), ImageField('photo'), LinesField('instrument'), )) class Artist(BaseContent) schema = BaseSchema + schema registerType(Artist,PROJECTNAME)
  • 8. Widgets schema= Schema(( StringField('title', widget=StringWidget( label=’Artist name’, size=20), ), ImageField('photo', widget=ImageWidget( label=’Headshot’), ), LinesField('instrument', widget=MultiSelectionWidget( label=’Instruments’), multiValue=1, ), ))
  • 9. What is UML? • UML = Uniform Modeling Language • Standard widely-adopted graphical language • Describes the artifacts of software systems • Focus on conceptual representations
  • 12. What is ArchGenXML? • Command line utility • Auto-generates code from a UML model • No round-trip support yet • Custom code is preserved upon regeneration
  • 13. Why use ArchGenXML? (part 1) • You want to save time • You are a lazy programmer • You don’t like to reinvent the wheel • You don’t like copying and pasting code • You make heavy use of references and interfaces
  • 14. Why use ArchGenXML? (part 2) • You have big projects with many different content types • You want or need a well-documented interface to your product • You like structured model- and pattern- driven software development • You want to maintain your project in the future without getting a headache
  • 15. UML to Archetypes using ArchGenXML schema= Schema(( StringField('title', widget=StringWidget( label=’Artist name’ size=20), ), ImageField('photo', widget=ImageWidget( label=’Headshot’), ), LinesField('instrument', widget=MultiSelectionWidget( label=’Instruments’), multiValue=1, ), ))
  • 16. UML speak to AT speak • package • product • class • content type • operation • method • attribute • field • tagged value • property • stereotype • subclass, view, etc.
  • 17. In practice 1. Save your model to the Products dir 2. Run the ArchGenXML script 3. Restart Zope 4. Install the newly generated product
  • 18. ArchGenXML components • ArchGenXML • Optional: • i18ndude • stripogram • ATBackRef • ATVocabularyManager • Relations
  • 19. Install ArchGenXML • Get PloneMagicCamp-bundle $ svn co svn://svn.plone4artists.org/trunk/PloneMagicCamp-bundle (* if you don’t have SVN, download the .zip file) $ cd $INSTANCE/Products $ ln -s /path/to/PloneMagicCamp-bundle/* . $ cd i18ndude; sudo /path/to/python setup.py install $ cd ../; ./getStripogram.sh $ cd stripogram; sudo /path/to/python setup.py install * If you don’t have SVN client, get the ZIP file. $ wget http://www.jazkarta.com/PloneMagicCamp-bundle.zip $ unzip PloneMagicCamp-bundle.zip
  • 20. Install ArgoUML • Use the pre-configured one that comes with the bundle • --OR-- download from http://argouml.tigris.org $ wget http://argouml-downloads.tigris.org/nonav/argouml-0.20/ ArgoUML-0.20.tar.gz $ tar xvfz ArgoUML-0.20.tar.gz $ cd ArgoUML-0.20 $ cp $INSTANCE_HOME/Products/ArchGenXML/argouml/argouml_profile.xmi . $ cp argouml.sh argouml.sh.orig; vi argouml.sh change line 48 to: ${JAVACMD} -Dargo.defaultModel=argouml_profile.xmi -jar $ {ARGO_HOME}/argouml-mdr.jar $* $ sh argouml.sh (to launch ArgoUML) --OR-- $ java -Dargo.defaultModel=argouml_profile.xmi -jar argouml-mdr.jar
  • 21. AGX options in ArgoUML!
  • 27. Running the script • Save project to $INSTANCE_HOME/Products/ArtistSite.zargo $ cd $INSTANCE_HOME/Products $ ArchGenXML/ArchGenXML.py -o ArtistSite ArtistSite.zargo ArchGenXML Version 1.5.0 svn/devel (c) 2003-2006 BlueDynamics, Austria, GNU General Public License 2.0 or later INFO Parsing... INFO Directory in which we're generating the files: 'ArtistSite'. INFO Generating... INFO Starting new Product: 'ArtistSite'. INFO Generating package 'content'. INFO Generating class 'Artist'. $
  • 28. ArtistSite product dir $ cd $INSTANCE_HOME/Products/ArtistSite $ ls content __init__.py i18n skins Extensions config.py refresh.txt version.txt $ cd content $ ls __init__.py Artist.py $ vi Artist.py
  • 29. Inspect Artist.py • Inserts documentation • Placeholders for custom code • i18n message ids • Using ArtistSite/model/generate_source.sh • inserts author information (ArtistSite.conf) • creates i18n generated.pot file (i18ndude) • strips HTML from doc strings (stripogram)
  • 30. Add new artist 1. Restart Zope 2. Install ArtistSite using QuickInstaller 3. Add new Artist
  • 33. Move model into product • Close ArgoUML since we are going to move the file $ cd $INSTANCE/Products $ mkdir ArtistSite/model $ mv ArtistSite.zargo ArtistSite/model $ ArchGenXML/ArchGenXML.py --sample-config ArtistSite/model/ ArtistSite.conf $ cp PloneMagicCamp-bundle/generate_source.sh ArtistSite/model/
  • 34. Edit ArtistSite.conf • Add your own author, email and copyright [DOCUMENTATION] strip-html: yes author: Nate Aune e-mail: natea (at) jazkarta (dot) com copyright: Jazkarta [GENERAL] outfile: ArtistSite
  • 35. Edit generate_source.sh • Change PYTHON_BIN to your Python #! /usr/bin/env bash PRODUCT_NAME=quot;ArtistSitequot; PRODUCTS_HOME=quot;`pwd`quot; PYTHON_BIN=quot;/sw/bin/python2.4quot; $PYTHON_BIN $PRODUCTS_HOME/ArchGenXML/ArchGenXML.py -c / $PRODUCTS_HOME/$PRODUCT_NAME/model/$PRODUCT_NAME.conf / $PRODUCTS_HOME/$PRODUCT_NAME/model/$PRODUCT_NAME.zargo
  • 36. Run generate_source.sh $ cd $INSTANCE_HOME/Products $ ArtistSite/model/generate_source.sh ArchGenXML Version 1.5.0 svn/devel (c) 2003-2006 BlueDynamics, Austria, GNU General Public License 2.0 or later INFO Parsing... INFO Directory in which we're generating the files: 'ArtistSite'. INFO Generating... INFO Starting new Product: 'ArtistSite'. INFO Generating package 'content'. INFO Generating class 'Artist'. $
  • 38. Add ATVM as dependency • Edit ArtistSite/AppConfig.py • Add line to: • DEPENDENCIES = ['ATVocabularyManager'] • Restart Zope • Reinstall ArtistSite
  • 39. Vocabulary Library • Go to Plone Setup and choose Vocabulary Library
  • 42. Tagged values • cd $INSTANCE/Products/ArchGenXML • ./TaggedValueSupport.py | more • ./TaggedValueSupport.py tagged-values.txt •
  • 43. Containment Use the solid rhomb to make a strict containment ‘Artist’ instances can only be added to an ‘Artists’ instance
  • 45. Give it a friendly name
  • 47. References Create a direct association results in: Reference field group to artist(s)
  • 49. Change the multiplicity (0..*) • Right-click the end point • Select Multiplicity 0..* (many artists in a group)
  • 50. Group edit form Group is associated with artists
  • 52. Configure browser widget Select the end point Make multivalued Specify relationship Define query
  • 55. Add ATBackRef as dependency • Edit ArtistSite/AppConfig.py • Change line to: • DEPENDENCIES = ['ATVocabularyManager', ‘ATBackRef’] • Restart Zope • Reinstall ArtistSite
  • 56. Back references Groups that artist belongs to
  • 57. Custom view for group folder
  • 58. Assign member stereotype Add the ‘member’ stereotype to tell ArchGenXML to subclass CMFMember
  • 60. Registration form • SiteMember is installed • Replaces default member • Easy way to create new member types
  • 61.
  • 62. PloneMall • Example of a sophisticated e-commerce framework built using UML • See the UML model here: • http://www.plonemall.com/uml/UML-beta2.png/image_view_fullscreen
  • 63. What I didn’t cover • Additional Stereotypes • actions, portal_tool, abstract, stub, ordered • portlets, configlet, customization policy • Generalization (Interfaces) • Workflow • Unit testing, doctests
  • 64. Links • ArchGenXML presentation - http://www.jazkarta.com/presentations/archgenxml-presentation • ArchGenXML product page - http://plone.org/products/archgenxml • ArchGenXML getting started tutorial by Jens Klein • http://plone.org/documentation/tutorial/archgenxml-getting-started • PDF formatted: http://www.fraterdeus.com/downloads/ArchGenXML_PDF_0.2.1/view • Intro to Archetypes by Sidnei da Silva, published on ZopeMag.com • http://www.zopemag.com/Issue006/Section_Articles/article_IntroToArchteypes.html • Archetypes: Customizing Plone in 60 seconds (PDF) by Andy McKay • http://www.enfoldsystems.com/About/Talks/archetypes.pdf • Archetypes Quick Reference by Maik Röder • http://plone.org/products/archetypes/documentation/manual/quickref/referencemanual-all-pages • Archetypes API • http://api.plone.org/