Author: Phil Auersperg, Jens Klein, et al


ArchGenXML - UML to code generator for Plone

.. contents::


With *ArchGenXML* you can create working python code without writing one single 
line of python. It is is a commandline utility that generates fully functional 
Zope_ Products based on the Archetypes_ framework from UML_ models using XMI 
(``.xmi``, ``.zargo``, ``.zuml``) files. The most common use case is to generate 
a set of custom content types, possibly with a few tools, a custom Member type 
and some workflows thrown in.

.. _Zope:
.. _Archetypes:
.. _UML:

How it works

In practice, you draw your UML diagrams in a tool like ArgoUML_  which has the 
ability to generate XMI files. Once you are ready to test your 
product, you run *ArchGenXML* on the XMI file, which will generate the product 
directory. After generation, you will be able to install your product in Plone 
and have your new content types, tools and workflows available.

.. _ArgoUML:

At present, round-trip support is not implemented: Custom code can't be 
converted back into XMI (and thus diagrams). However, you can re-generate 
your product over existing code. Method bodies and certain *protected* code 
sections will be preserved. This means that you can evolve your product's 
public interfaces, its methods and its attributes in the UML model, without 
fear of losing your hand-written code.

Supported Plone Versions

We support Plone Versions 2.5.x and >3.1.x. But if you have code generated 
with some ArchGenXML version below 2 you will need to adjust the generated 
model and code manually. There is no smooth migration. If you dont need to make 
your code run on Plone 3, stick to an older version of ArchGenXML.

Further Reading

The Manual_ documents most of ArchGenXML features. There are also plenty third 
party documentations in several languages. Just use Google_ to find more on 
this topic.

.. _Manual:
.. _Google:


2.6 (2011-03-10)

- make z3 interfaces the default interface and dont accept any longer zope2 

- Use portal_type tagged-value if available instead of class name when
  generating workflows.xml.

- remove unneccessary imports for remember/membrane, 
  view permissions can now additionally be specified in the dependency 
  association to the content class,
  name of the view template can now additionally be specified in the
  dependency relation between view class and content class,
  pass fixed size parameter to arrayfield (i.e. 4 generates size-4) ,
  browser views: name on dpendency determines name of view,
  remove old generator i18n support.

- tgv for dynatree widget

- Added worklist:guard_expressions tag definition.

- Fixed UnicodeEncodeError when writing the code of existing methods
  back to the files and the code is in the unicode format.

2.5 (2010-09-04)

- Extender doesn't generate interfaces twice anymore.

- You can now set meta_type="Subtractive Workflow" (default is "Workflow")
  and state_var="confidential_state" for example (default is "review_state")
  on a workflow to use it with collective.subtractiveworkflow.

- Added roles and permissions protected sections in rolemap.xml.

- Replaced buggy odict implementation by the ordereddict implementation
  available in Python 2.7.

- Unicode fixes for generated module info header.

- Removed DeprecationWarning about the sets module.

- Header info: use better formatting for author.
  Encode module header strings so we don't choke on non-ASCII chars.

- Make "dependend_profiles" alternative