Texo provides JPA annotations, model and template driven development technology powered by EMF for web application (WAR) development projects. Texo uses components currently present in the Eclipse Modeling Framework (EMF) and Eclipse Modeling Framework Technology (EMFT) projects. Texo is a proposed open source component in the Eclipse Modeling Framework Technology (EMFT) project.
You can also read the original Texo project proposal.
Benefits of using Texo
Benefits of using current Texo (May 2010):
- Code Generation:
- Generates true pojo's from an Ecore 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
- 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
- Support for java annotations and annotations defined in the model, to drive code generation and to be translated into java source code annotation
- ORM/JPA generation, Texo supports the generation of the orm.xml mapping from the ecore models, there are specific JPA model annotations which can be used to control JPA/ORM generation.
- 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.
New functionality which is being developed right now gives these additional benefits:
- Multiple annotation models (JPA, Hibernate Search, etc.) supported
- Easy integration with RIA user interface through a generic model-driven JSON service
Further in the future, Texo will be extended to generate the web user interface layer. This will give additional benefits in terms of increased developer productiviy and quality.
Download & Install
Texo is installed through the Eclipse update manager. For more details see the Download & Install page.
The quick start page lets you generate code in just a few steps...
The following pages contain detailed information on different parts of the Texo solution.
Code generation topics
- Code Generation Introduction: describes how to generate code from one or more xsd/ecore files.
- Code Generation Details: describes how the code generation can be controlled in detail by annotating the model.
- 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 (EMF-like-merge, organize-import, formatting).
- Java annotations from model-to-code: Texo can transfer java annotations defined in the model into the generated code.
ORM/JPA generation topics
- ORM/JPA Generation Introduction: introduces the ORM generation implemented by Texo.
- ORM/JPA Annotations Model: describes how the model can be annotated with ORM/JPA annotations to control the ORM generation.
- Runtime Model: describes the runtime model access to Texo generated objects.
- XML-XMI Serialization: covers the main api to convert Texo generated pojo's from and to XML and 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.
- 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.
- 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.
- Object Store concept: the object store integrates the Texo model layer with the JPA layer. You can query the database using EClasses and do cross-reference checks.
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.
- Runtime model: Texo (just as EMF) supports working with the domain model at runtime. Texo generates Model wrappers to give generated pojo's a Model api.
- Working with generated artifacts: Texo follows the same philosophy as EMF: generated code can be manually changed, manual changes will be kept/maintained when re-generating the code.
For a more detailed description visit the Design Concepts page.
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
For troubleshooting and issues encountered by other users see the trouble shooting page.
Support is given on the EMFT newsgroup which you can find here:
- nntp: news://news.eclipse.org/eclipse.technology.emft
- forum: http://www.eclipse.org/forums/index.php?t=thread&frm_id=19
Developer information (CVS, how to setup a developers environment) can be found on the Developers page.
This is a list of future topics which we may (or may not) work on in the future, it is a list of ideas:
- integration with the EMF GWT solution
- integration with RIA frameworks like extjs and smartclient (using their GWT versions)
- support code generation which generates separate source files which can be manually changed, so not following the @generated pattern used in standard EMF
- generate a JAXB mapping using the Eclipselink JAXB implementation mapping file functionality
Feel free to react on the EMFT newsgroup with more ideas.