Personal tools
You are here: Home Products ArchGenXML Documentation How-tos Turn an existing schemata-based product into an ArchGenXML Project
Document Actions

Turn an existing schemata-based product into an ArchGenXML Project

This How-to applies to: Any version.

This how-to explains the steps neccessary to convert an existing hand-written schemata based product into an ArchGenXML Project.

ArchGenXML

Do you have set up and written your Plone-product by hand, but consider switching over using an UML editor and ArchGenXML to ease your work ?

Here you can read which steps it takes to turn an existing, schemata based product into an AGX project, by the example of the ArcheCSV product (thanks to the ASA1000 team).

I use ArgoUML as UML editor, but you can use any UML editor ArchGenXML can work with (maybe any uml editor?)

ArcheCSV

ArcheCSV is a powerfull product, as it lets you create ATCT based content types by importing the instance-data of the to be created objects by an csv formatted input file. The wizard like interface is implemented by defining different shemata for every wizard page to step through, providing easy save-and-step-to-the-next interface by defining appropriate actions in the relevant page template metadata file.

It uses the csv module from python, and three additional methods in the class body of the main class, Importer. The remaining product logic is in page templates and an import script, all residing in the skins directory.

The Steps

Here are the steps that were necessary:

  • get an UML editor and fire it up. I used ArgoUML v0.20 for this how-to
  • defining the main class.
  • add attributes
  • give attributes the appropriate tagged values. These is an easy one-to-one process of the values that were defined in the schemata declaration of the class by hand. Mainly widget, widget:label and widget:description, widget:macro for the hand-written widgets.
  • defining the three class methods (getType, getCSVheader, getCSVdata)
  • saving the work and giving it a try by throwing the .zargo (the ArgoUML project) file to ArchGenXML
  • with no errors, a new product directory is created with complete interiour, like subdirs, __init__.py, config.py files and class definition
  • now moving over the skins directory of the hand written product
  • copy and paste of the hand written function bodies into the three but empty, pre-generated class methods
  • Its possible to declare all import statements needed by the class methods by tagged value import at the class in the diagram.
    It can also be done by pasting it directly into the prepared commented area in the generated class file
  • install product and ready

These steps were perfomed in about an hour, while the author is still no AGX-guru. He never thought it was so easy, so he decided to write this how-to to share the experience with others.

Attached files
by Torsten Dieter Kuehnel last modified August 27, 2006 - 14:20
Contributors: the developers at http://www.1000asa.com/

Moved

Posted by Reinout van Rees at August 27, 2006 - 14:21
I've moved this from the main howto area to archgenxml's one. Seemed more appropriate.

Great howto, thanks!

Thanks for posting the model

Posted by Mike Combs at December 18, 2006 - 17:09
Being able to compare the model to your product was a huge help for learning several things I hadn't seen formally documented anywhere else, like the tip about imports and even something like putting methods in the model for calculated fields.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by