AGX is a framework to handle transformations between trees of zodict-nodes. Its also known as a code generator for python, which uses the tree transformations to generate code from uml.
AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009
1. Lightning Talk
Tree transformation with Python
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
2. Nodes and trees
● Node
– Base object for building trees
– Provides a dictionary like API and implements
zope.interface.mapping.IFullMapping
– Knows about it's position. It implements
zope.location.interfaces.ILocation
– Can be accessed flat. Nodes are accessible from
each other via UID references
● Every data structure can be represented as tree, i.e.
XML, UML, File System, SQL, LDAP
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
3. UML as node compliant tree
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
4. FS as node compliant tree
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
5. SQL as node compliant tree
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
6. IO System
● AGX IO System
– Based on Nodes
– Follows the interfaces provided by Node
– Introduces ISource and ITarget, both derive from
INode
– ITarget promises to persist or dump the tree on
__call__() in any way.
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
7. Tree transformation chain
● Iterate over all nodes of source tree and look up
handlers, which are responsible for creating target
nodes inside the target tree based on the information
from the source node.
● Transformation chain components located in agx.core
● Finally target tree is called.
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
8. Tree transformation chain
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz
9. Thank you!
Robert Niederreiter <office@squarewave.at> Creative Commons Namensnennung-
Keine kommerzielle Nutzung-
3.0 Österreich Lizenz