Telosys Tools : the concept of “lightweight model” for code-generation

Telosys Tools (http://tools.telosys.org/) is a simple and pragmatic code generator. Provided as an Eclipse Plugin (http://marketplace.eclipse.org/content/telosys-tools ), it uses an original approach mixing “database first scaffolding” and classical model driven engineering. Laurent Guérin, one of the key people behind the project tells us more about it.

This tool aims to provide an alternative to the classical principles :

  •  the “model first” approach (based on UML or DSL models) that provides all the useful information to the generator, but that requires a significant workload at the beginning of the project  to create a reliable and accurate model
  • 1-code-gen-model-first

  • the “database first” scaffolding approach (based on the meta-data retrieved from the database) that allows a quick start of the project, but that provides limited information to the generator
  • 2-code-gen-database-first

The Telosys Tools approach is a mix of the two.  The principle can be described by 3 steps :

1)      An existing database is used to create a “lightweight model”. The structure of the database is retrieved by the tool as in a “scaffolding” principle but to create a simple model and not to generate the code immediately

2)      Once the model has been created, it can be updated and complemented in order to provide exactly what is expected  for the code generation (it’s the refining step)

3)      Finally, the customized “lightweight model” can be used by the tool to generate the code (by applying templates on the model’s data)

The “lightweight model” can also be updated in case of changes in the database structure.

3-telosystools205-60

The lightweight model editor :
4-screenshot-model-editor

The generator is based on the “Velocity” engine and uses a set of templates. Hence the templates can be adapted to each project requirements, new templates can be created if necessary, etc.. Reusable templates are shared on GitHub (https://github.com/telosys-tools-community).

The generation targets :

5-screenshot-generation

This tool is used as a “development accelerator”, it allows a quick start for different kinds of projects. The ”lightweight model” can be more or less refined depending on the context.

For more information, see :

If you liked this post, you should subscribe to the blog feed , mailing list , or facebook page and follow my thoughts on twitter about software development or web design and social media . Check also my book on model-driven engineering .

Be sociable, share!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress
More in code_generation, databases, tools
genmymodel-logo-200x400-nobg
GenMyModel: Towards Online Collaborative UML Modeling in the Cloud

canappi
Canappi (code-generation for mobile apps) is now open source

securitypolicyvisualizationpng
Reverse engineering of database security policies

Close