Treebind: an API to bind them all
My first motivation to create the Treebind API has been to get a lightweight Java/XML data binding API that could be used with existing business objects –this rules out most of the existing binding APIs which create new classes from a schema.
While Treebind still meets this design goal, newest versions have added support for the RDF and LDAP data models in addition to the XML and Java object models available from the first release.
This has been made possible through the definition of a data model which is so simple and generic that it can be used as a superset of the XML, Java object, RDF and LDAP data models and could be used for other data models such as PSVI “typed” XML or relational databases.
Treebind makes an extensive use of this data model internally through “SAX like” extensible pipes composed of a source that reads information from the source model, a filter that takes care of the impedance mismatches between the source and target models and a sink that creates the target model.
Treebind also supports a more “DOM like” paradigm when needed.
This data model could easily be used in other programming languages than Java.
One of the most interesting facets of this project has been the opportunity to compare the different data models supported by Treebind, a simple exercise that I had never taken the time to do before…
In this presentation, I will present the API itself and also all the lessons learned during its development, including this comparison between data models.
Note: Treebind has been financed by the INSEE and is currently available through the GPL licence.




