Avaloq is an internationally leading Fintech company and the creator of the Avaloq Banking Suite. Domain Specific Languages (DSLs) are used to customize the business logic of the banking suite. Xtext is an Eclipse project that provides rich support for the implementation of DSLs. Xtext is very flexible and easily extensible allowing to apply it way beyond simple flowchart DSLs. At Avaloq we used Xtext to implement tools for over 80 DSLs out of which over 50 languages existed long before we learned about Xtext and hence were designed without Xtext implementation in mind. Banking models are also large and typically consist of over 100’000 sources so that we are dealing with over 600 MB of text. And also, oh yeah, we needed to test all of the tools we created.
In this talk we tell you what we did with Xtext to make it cover our size and complexity. We provide feedback for the Xtext community and show how you could easily apply some of our ideas to standard Xtext to get more flexibility, better IDE tooling, and easier testing. We target software architects and developers implementing DSLs as well as creators of language frameworks. Throughout the whole session we show code samples illustrating concrete problems and solutions. Samples are based on real life experience.
- Composition of Xtext languages in contrast to inheritance
- Design of database-backed Xtext index for large builder state
- Distributed clustering headless Xtext builder running on Linux cluster
- Xtend-based test suite for linking, content assist, validations etc.
- Keywords in identifiers: keyword rules, semantic predicates
- Xtext usage patterns which we enforced in our DSLs with Xbase-based DSLs for scoping, formatting, object descriptions, and validations
- Key practices for Ecore model design and Xtext grammar design
- Model inference within the same resource vs. derived resource life cycle management
- Binary models of resolved sources for improved generator performance
- Fine-grained invalidation based on object fingerprints and invalidation for generators
- Pluggable user-defined model validations and their application to bulk migrations
Four to five topics will be discussed in detail, for the rest we give an overview and will provide additional slides for offline reading or discussion.