Java DSLs with Xtext

Session Type: 
Standard [35 minutes]

Building DSLs with Xtext is easy: You define the most convenient syntax and generate whatever code you like from it.

But integrating these DSLs within a Java project usually involves bridging some major gaps, e.g. mutual referencing, mixing generated and hand-written code as well as integration on the IDE level. Xtext's special support for Java DSLs gives you all of this and more for free.

In this session I will show you how to implement such Java DSLs. In addition to the grammar of your language, you define how your concepts are mapped to Java. An expression language library allows to incorporate behavior easily in your DSL. The actual code generator and a lot of IDE support is automatically derived. The result is a seamlessly integrated cross-language IDE for the developers, and a plain Java application at runtime.

Using some real world examples I am going to illustrate the new possibilities of this approach, bringing integrated DSL support to Java.

Schedule info



Cool Stuff
Experience level: 


It's a talk and not a

It's a talk and not a workshop.

I held a similar talk in Boston and will attach the slides of that one to make clearer what my talk is about.

- Motivation: Java's limitiations, Java DSLs
- How it works: Xtext grammar, JVM model inferrer, Xbase
- A demo on the expression language: syntactic sugar, type inference, higher order functions, closures, ...
- The 7 languages: seven real world examples for Java DSLs.


Hi Jan, your talk is directly competing with
Do you have any details about this talk that could make us choose either this one or the other?