Benefits of using Texo

Benefits of using current Texo (November 2012):

Code Generation:

Generates true pojo's from an Ecore/Xcore model or XSD without direct compile time link from generated entities to EMF, Texo or other framework types. Facilitates integration of EMF concepts with other frameworks such as Google Web Toolkit or Object Relational Mapping solutions

Provides a generic CRUD REST and Query web service layer for all your models, JSON as well as XML

ORM/JPA generation, Texo generates JPA annotations in the source code or can generate the orm.xml mapping from the ecore/xcore models, there are specific JPA model annotations which can be used to control JPA/ORM generation.

Code Generation Patterns: discusses several common code generation patterns which are supported by Texo (as a default or through setting annotations).

Extending/Overriding Code generation: discusses how the Texo templates can be overridden in a development project, while still maintaining the advantages of using Texo (EMF-like-merge, organize-import, formatting).

Runtime topics

JPA/Persistence integration

DAO support, Texo generated Dao classes: Texo is capable of generating Dao classes which make it easier to query and access objects in the database, in addition the generated Dao classes support cross referencing functionality.

EMF/XML/XMI

EMF Conversion: discusses the Texo-EMF conversion API which make it possible to convert any Texo generated pojo from/to an EObject. This is useful for when you want to make use of other EMF components like EMF Compare.

Xcore Support: Texo supports xcore in the same way as standard ecore and xsd files. You can generate JPA annotated code, orm.xml etc. directly from an xcore file.

Miscellaneous

Test data generation: Texo is tested with about 40 models, the test-cases involve conversion from and to EMF, XML and XMI. An important foundation of the test cases is the automatic generation of test data on the basis of the model. This gives a better test coverage and makes it very easy to add new test models to the system and integrate them in the main test runs.

Main Design Concepts

The Texo project is based on a number of main design concepts and philosophies.

Annotated Models and Model Annotations: Texo uses annotated models for artifact generation. The goal is to support multiple annotation models (JPA, model oriented, etc.), model annotations can be converted to java annotations or other output. Annotations are set manually and further created by Model Annotators.

Texo and EMF

Texo is related to EMF and makes use of specific EMF components. Both Texo and EMF generate java code representing an ecore model in Java. There are however several distinctive differences between the approach chosen and code generation implemented by EMF and Texo. This is covered in detail on this page.

Support & Troubleshooting & Bugzilla

For troubleshooting and issues encountered by other users see the trouble shooting page.

Backward Compatibility

Starting from the 0.9.0 version backward compatibility related topics will be published in this section.

0.9.0 - Version 28 December 2014

This issue 420913 is resolved. There is a property of the EPackage or EReference generation annotation which controls if bi-directional association support is generated in the java code. This was not working correctly, in that to get this to be working also the 'Generate save many access' on the EPackage gen annotation should be set to true. This was not correct in, also without setting this additional property, bi-directional access should be generated correctly. This is now resolved. Note bi-directional access is (and was) 'true'/enabled by default. This can mean that newly generated code (previously generated by a previous Texo version) will change as now the bi-directional property is correctly considered. To keep the old behavior, create an annotation model which sets generateBidirectionalAssociationSupport to false (see here for an example, only the generateBidirectionalAssociationSupport part is relevant for this bullet).

The createModelObject method of the ModelFactory has been changed to return a parameterized ModelObject (ModelObject<T>) instead of earlier the ModelObject<?>. With this it is not needed anymore to cast the returned value from createModelObject.

Developing

Developer information (GIT, how to setup a developers environment) can be found on the Developers page.

Future Topics

This is a list of future topics which we may (or may not) work on in the future, it is a list of ideas: