Building a Solution Providers Directory using ArchGenXML

— filed under:

May 12, 2005. This presentation demonstrates how to build a working Plone product using Poseidon (UML tool) and ArchGenXML. Presented to the Boston Python Users Group at the Harvard Science Center (5/12/05).

Overview

  • What is ArchGenXML?
  • How to install it
  • Choosing a UML tool (Poseidon is preferred)
  • Making a new model using Poseidon
  • Transforming the model into an Archetypes product using ArchGenXML
  • Helper widgets
  • Adding custom templates and methods
  • Example products built using ArchGenXML (Poi, PloneMall)
  • Future
  • Useful links

What is ArchGenXML?

  • Command line utility to example output files of many UML editors
  • Running the ArchGenXML.py script generates a complete application
  • Supports many rich features, such as Archetypes schemas, tools generation, references, parent-child relationships, workflow, i18n, etc.
  • Works with UML editors that can output the XMI interchange format (most do).

Installing ArchGenXML and dependencies

  • Assume you already have Zope and Plone installed
  • Install dependencies (PyXML, i18ndude, stripogram)
  • Use subversion to grab the latest versions
ArchGenXML

cd Products
svn co http://svn.plone.org/archetypes/ArchGenXML/trunk/ ArchGenXML

PyXML

ArchGenXML requires that you install the PyXML library from
http://pyxml.sourceforge.net

wget http://easynews.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz
tar xvfz PyXML-0.8.4.tar.gz
cd PyXML-0.8.4
python setup.py install

i18ndude

svn co http://svn.plone.org/collective/i18ndude/trunk/ i18ndude
cd i18ndude
python setup.py install

Stripogram

http://easynews.dl.sourceforge.net/sourceforge/squishdot/stripogram-1-4.tgz
tar xvfz stripogram-1-4.tgz
cd stripogram-1-4.tgz
python setup.py install

UML Tool - Poseidon

  • Poseidon runs on Windows, OSX and Linux
  • Free "Community Edition" version for non-commercial use
  • Download at www.gentleware.com
  • Can also use Objectdomain (commercial), ArgoUML, Umbrello, Sybase Powerdesigner

Making the SolutionProviders model

  • Adding classes
  • Adding attributes
  • Adding tagged values
  • Creating diagram and composition with SolutionProviderFolder

Transforming the model into app

  • Use the generate_source.sh shell script
 $ cd Products
$ SolutionProviders/model/generate_source.sh
  • Install the product using Plone's QuickInstaller
  • Tip: Enable autorefresh so you don't have to restart Zope everytime you make a change

Helper widgets

Archetypes is extensible and you can make custom widgets.

  • ATCountryWidget (portal tool for managing country vocabulary)
  • ATVocabularyManager (TTW editing of vocabularies - states, skills)
  • ArchAddOn (USPhoneField, EmailField, LinkField, etc.)
  • ATReferenceBrowserWidget (popup for selecting other content to be referenced to the current object)
  wget ftp://ftp.gocept.com/ATCountryWidget/ATCountryWidget_0.2.tgz
svn co http://svn.plone.org/archetypes/ATVocabularyManager/trunk/ ATVocabularyManager
svn co http://svn.plone.org/collective/ArchAddOn/trunk/ ArchAddOn
svn co http://svn.plone.org/archetypes/MoreFieldsAndWidgets/ATReferenceBrowserWidget/trunk/ ATReferenceBrowserWidget

Adding custom methods and templates

  • Methods are added using the operations button in Poseidon
  • ArchGenXML won't overwrite your custom methods
  • Templates are added in the skins folder

Example products built using ArchGenXML

  • Poi (issue tracker app)
  • PloneMall (fully featured e-commerce application - http://plonemall.com)
   cd Products
svn co http://svn.plone.org/collective/Poi/trunk/ Poi
wget http://plonemall.com/download/PloneMall-beta2.tgz

Future

  • Use this as the basis for the Boston Python Consultants directory?
  • Additional content types for:
    • employers
    • jobs/contracts
    • differentiation between nindividual consultants and companies
  • Integration with Opensourcexperts.com XML data
    • Example feed: http://www.opensourcexperts.com/Index/rdfrss/Plone.xml

Useful links

Document Actions