agx - tree transformations with python - lightning talk at plone conference 2009

9
Creative Commons Namensnennung- Keine kommerzielle Nutzung- 3.0 Österreich Lizenz Robert Niederreiter <[email protected]> Lightning Talk Tree transformation with Python

Upload: jens-klein

Post on 01-Jul-2015

897 views

Category:

Technology


0 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

Lightning TalkTree transformation with Python

Page 2: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

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

Page 3: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

UML as node compliant tree

Page 4: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

FS as node compliant tree

Page 5: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

SQL as node compliant tree

Page 6: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

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.

Page 7: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

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.

Page 8: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

Tree transformation chain

Page 9: AGX - Tree Transformations with Python - Lightning Talk at Plone Conference 2009

Creative Commons Namensnennung-Keine kommerzielle Nutzung- 3.0 Österreich Lizenz

Robert Niederreiter <[email protected]>

Thank you!