Martin Taal's Blog

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

Texo and Xcore: tex(o)tual modeling and JPA/JSON webservices

leave a comment »

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:

Texo - Xcore right click options

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).

Thanks for reading and I hope this blog post helps to give Texo a try. Visit the Texo wiki for more information. Let me know if you have any questions or remarks on the EMFT newsgroup or forum!

gr. Martin

Written by martintaal

January 5, 2015 at 10:04 am

Posted in Texo

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: