Teneo 2.0.0 supports Hibernate 4.1.* which was released in early 2012. Since then several Hibernate versions have followed and I have planned to upgrade Teneo to the latest 4.3.* hibernate version for some time now. I promised winter 2014 before and I now spend some time on it (January 2015 is also winter of 2014 I guess :-).
So I am happy to tell you that the 2.1.0 version of Teneo is now available with support for Hibernate 4.3.*.
You can download Teneo 2.1.0 from this update site:
For testing and for your convenience there is also an update site for the dependencies:
As you can see Teneo is being tested with Hibernate 4.3.7.
Teneo supports the JPA 2.0 spec, so not yet JPA 2.1. My plan for 2015 is to spend most of my time on Texo, Teneo is more in maintenance mode now. Teneo JPA 2.1 support can however be developed as a sponsored task. So if you are interested in sponsoring this development then contact me directly at mtaal_at_elver.org.
Xcore allows you to define and maintain models in a textual form. To quote the Xcore wiki page: ‘It eliminates the dividing line between modeling and programming, combining the advantages of each.’ Xcore really adds value and makes working with models easier and much more fun. So no wonder that it has been on my todo-list for a while now to see how I could integrate it nicely with Texo.
As often I got the extra needed push from questions on the newsgroup to finally get this done. The past year I have taken a closer look at Xcore and the way it handles models. I was pleasantly surprised to see that you can load Xcore-defined models through an EMF Resource and can easily get to the underlying EMF/ecore model.
This made it quite easy to make all the Texo functionality work for Xcore models:
- generate JPA entities directly from Xcore
- define annotation models to control code generation in detail
- overriding/extending code generation with own custom templates
- auto-generate while changing models
- full automatic-zero-coding CRUD JSON and XML webservice support
Most of the functionality is directly available with a simple right-click on a xcore file:
Note the last menu option: I also added a nice feature that allows you to generate the ecore model from an xcore file (not needed for Texo, but sometime nice to have in any case).
It has been 2 years since I published my last blog post on Texo.
There is a reason for this ofcourse. So before I start with the ‘real’ content of this blog post.. I want to take the opportunity to express my gratitude: for the outstanding care provided by the Wilhelmina Children’s Hospital in Utrecht, The Netherlands, in our case for treating our son’s Leukemia. The professionalism, kindness and tender patience shown by the medical and non-medical staff, always seeing the boy (Man) before the patient, was and is a great help for our family in getting through tough times.
Now back to what’s next for Texo!
The first main thing is Xcore support. It is something requested often by several users. I am almost done with it, so should be there shortly. An interesting next xcore-step is to see if it is possible to integrate the Texo annotations models into the Xcore editor. This so that people don’t need to maintain a separate annotations model.
Another technology I have worked with the past years is Mondrian, it can be interesting to see what/if Texo (runtime) can be integrated with Mondrian.
Recently I have gotten quite interested in micro-service architectures because of their elegant scalability and robustness capabilities and nice decomposition approach. I have some research topics/questions I would like to explore here, further developing Texo in the direction of a micro-service architecture. This is for me probably one of the most interesting areas for 2015!
Related to micro-service architectures is the topic of no-sql datastores. No-sql datastores are better (than relational stores) in supporting distributed data storage, making them suited for micro-service architectures. Would be nice to extend Texo to support different no-sql databases.
A long (really long) while back I had a chat with people from the EMF Client Platform. It is very interesting to make the Texo runtime layer suitable as a ECP persistence backend, there seems to be a perfect fit there!
Having said the above, my plan for this year is to get to an official release and real version 1.0, and then participate in the subsequent official Eclipse release.
I am also very interested in working with others who want to collaborate and contribute. Texo can be split in 2 main parts: generation and runtime behavior providing JSON/XML webservices. Both interesting areas to contribute to. I mentioned several topics above, but other ideas are also welcome! Feel free to contact me directly if you want to participate (mtaal_at_elver.org).
Thanks for reading and I hope this blog post helps to give Texo a try and possibiy contribute. Visit the Texo wiki for more information. Let me know if you have any questions or remarks on the EMFT newsgroup or forum!
One feature missing from Teneo (until now!) was auditing, storing object state over time and allowing you to retrieve the historical state of objects. The past weeks I worked on this nice feature and currently all/most 500 Teneo testcases are run in audit mode.
The auditing functionality provides some nice functionality:
- auditing can be enabled/disabled for the complete model or for specific types
- possible to navigate/iterate over the history of an object
- possible to query for version history using HQL
Teneo auditing generates an audit model from the domain model and creates separate tables to store the audit information. All/most Ecore model constructs are supported.
There are several options available to control the auditing behavior. In addition you can annotate the domain model with JPA annotations to control the auditing database schema. This is all described in some more detail here.
Teneo provides different ways to get to the audited data, you can retrieve the audit history for a single object, use HQL querying or iterate over the history.
I am now working on integrating Teneo auditing with the CDO Hibernate Store. Allowing the user to retrieve revisons through the CDO revision api. More on that in my next post!
Traditionally Teneo and Texo are distributed through Eclipse update sites. The past year several people have asked me to make the Texo and Teneo runtime jar files also available through a Maven repository.
Recently this topic also came up for some sponsored Teneo development I am currently doing. With these requests from multiple sides it was time to make this happen!
So from today: Teneo/Texo (and their EMF dependencies) are uploaded to the Sonatype repositories (thank you Sonatype for providing this repo-service!) and from there synced to Maven central. They are all published in the org.eclipse.emf group.
The nightly builds are available on the Sonatype snapshot repository. The builds are released regularly to Maven central. You can find the jar files there:
ps: when using maven with Texo, make sure to check out this troubleshooting tip.
So how to setup headless/build-integrated code generation?
Texo uses Eclipse for code formatting and import resolving. So, start by downloading an Eclipse version suitable for your build platform. Then install the Texo plugins in this Eclipse version through the Texo update site and put this Eclipse version somewhere on your build server.
As a second step choose a location on the build server where Texo can create a workspace and Java project. And last, place the model (ecore/xsd) files on the build server.
The parameters have the following meaning:
- eclipse: the eclipse installation location
- data: the workspace location
- projectName: the name of a Java project to use, see here for more information
- modelLocation: the location of the model files
- jpa: generate code with JPA annotations
- dao: generate a DAO layer
The generated code will be present in the Java project on your build server and can be copied/compiled from there.
Instead of using ANT, you can also execute headless code generation directly in Java.
That’s all, with these latest developments, code generation and your build process can be nicely tied together!
A month back a Texo user asked me on the newsgroup about the speed of Texo code generation. His proposal was to use xtend2 as the template technology as it is much faster. As often with proposals and ideas, it takes a while, but then suddenly, motivation and time come together and coding starts.
So from today Texo as a default uses xtend2 as a templating technology. This indeed gives a considerable speed increase!
The nice thing is that I managed to still keep the great feature of allowing overriding and/or extending of templates within a development project. You can do this using xpand templates. So the base standard part of Texo uses fast xtend2, if you want to override/extend you use xpand. This is also nice for backward compatibility as your current xpand overriding/extending templates will work fine!