JMatter, NakedObjects and EMF are few technologies that i have been interested recently. That fact that all these technologies allows to create the model, generate the code for UI and finally persist the UI State in Object Reational Databases, makes me get excited about these. Without the help of these frameworks, some business usecases which needs the domain model/metadata to be persisted in the databases does require a lot of hand-coding and often requires long months of implementation. JMatter and Naked Object are supposedly generate the OR mapping from the domain data to the direct database tables with the help of the Hibernate mapping.
For all the EMF and Eclipse lovers it would be difficult to change their applications to JMatter or NakedObjects. And one reason that i do not want to do it right now is that these frameworks are yet to support the SWT and interop with EMF models. For the Object relational database persistence of the metadata and domain models i found the Teneo project from eclipse to be quite promising.
What is Teneo : Teneo is the eclipse sub-project from EMFT, which aims at providing the database persistency solution for EMF using Hibernate or JPOX/JDO 2.0. It supports automatic creation of EMF to Relational Mappings and the related database schemas. EMF Objects can be queried and stored using the advanced queries like HQL and JDOQL.
Why use Teneo
- Teneo allows you to start with your model (UML or XML Schema) and automatically generate the java source code and object-relational mappings.
- Teneo takes over much (or even all) of the manual work of creating relational mapping schemes.
- Teneo supports JPA annotations on model level, this keeps your java code clean from persistency specific constructs.
- The integration with EMF allows you to generate Eclipse RCP editors which persist automatically to a relational database.
And More Teneo automatically maps the EMF model to a Hibernate OR mapping. The automatic mapping can be done in-memory when your application is initialized or a separate hibernate mapping file can be generated. The generated hbm file can be adapted manually and used in the runtime layer. To handle the EMF resource management and also the Hibernate mappings, a special runtime layer called EMF-Hibernate Runtime layer was developed. Teneo takes care of instantiating the EMF Objects and getters/setters for EFeatures of EMF from database.
This project is definitely a great relief to the EMF and Eclipse developers. Now everyone can persist their models in the Databases with a cleaner Hibernate implementation.