Martin Taal's Blog

About EMF, Teneo, CDO, Texo, Hibernate, Open-Source ERP and other topics

Archive for May 2010

EMFT Texo: generating true pojos, the ORM and more…

leave a comment »

This post is to introduce the EMFT Texo project to you. The Texo project delivers code/artifact generation from ecore/xsd models for (web) server environments with additional runtime functionality. Texo aims to eventually also provide code generation solutions for the web client.

Some key features of Texo:

  • Code Generation:
    • Generates true pojo’s from an Ecore model or XSD without compile-time/runtime dependency on EMF, Texo or other framework types. Facilitates integration of EMF concepts with other frameworks such as Google Web Toolkit or Object Relational Mapping solutions
    • Supports manual change of generated code (the same approach as EMF)
    • Overridable and Extendable code generation with support for EMF-like merge, formatting, import-organizing
  • ORM/JPA generation, Texo supports the generation of the orm.xml mapping from ecore/xsd models, the domain model can be enriched with JPA annotations to control the ORM generation, the full ORM 2.0 spec is supported.
  • Support for java annotations and annotations defined in the model, to drive code generation and to be translated into java source code annotation
  • XML support
    • Supports XML Schema constructs (as EMF)
    • XML and XMI Serialization
  • Runtime model support, key to implementing generic functionality as security, archiving, query generation and generic web services.

The Texo project is based on the concept of annotated models. Texo functionality works out-of-the-box for an ecore/xsd model, but you can control code/artifact generation by adding annotations to the model. Texo provides an annotation editor for this purpose.

Texo has some overlap with EMF in that it also generates code which represents an ecore model in java. However there are distinctive differences in the approach chosen. These differences are mainly influenced by the target environment and the idea that certain concepts should be implemented completely separate from the generated code. For more details on the differences between Texo and EMF see this wiki page.

Texo can be downloaded and installed through the Eclipse Update Manager.

This is an introductionary post, in the coming weeks I will blog about some specific Texo features: control code generation through model annotations and generation of the ORM file.

I hope this project is of interest to you, feel free to ask questions on the EMFT newsgroup!

Written by martintaal

May 18, 2010 at 11:08 am

Posted in ORM, Texo