© itemis AG
Agenda
Introduction to XtextWhat, How, Why?
Common DSLsDSLs that no longer impress anybody….
Advanced Use Cases for DSLsThe fancy real world stuff…
DiscussionWhat you always wanted to know about DSLs and Xtext
© itemis AG
Xtext is a language workbench External DSL
Xtext grammar notation is central artifact for DSL definition (EBNF++)
Xtext DSL by default have a textual representation
The concrete syntax is parsed using an ANTLR parser
Generator templates implemented using Xtend
Connecting to what I know you (should) know….
© itemis AG
• Since 2006 developed by itemis
• Eclipse-base• Part of the Eclipse Modeling Project
• Eclipse Project since 2008
• Open-Source (EPL)
• Textuall DSLs
• Parser-based• Grammar as central artifact
• ANTLR Parser
Language WorkbenchesXtext
© itemis AG
EntitiesServices
ScreenFlow
GuiWidgets
MappingDatatypes Constraints
ExceptionsForms
LANGUAGES
© itemis AG
Insurance Life System
● 15 million LOC○ 60% RPG○ 40% Java
● Hardware○ IBM iSeries Hardware (AS/400)
● User interface○ IBM Webfacing
● Database DB/2
Migratin a legacy system
© itemis AG
Migration – Why? What? How?
● Why?○ Ending support○ A desire to reduce maintenance and working costs○ Retiring „know-how“○ A desire to increase attractiveness and market
acceptance● What?
○ Data, user interfaces, ports, functions● How?
○ Redevelopment, fully automated, semi-automated (= model-based)
© itemis AG
Model-Based Migration
22
Model-based migration with adapted tools
Target system
22
Legacy system(e.g. Forms / RPG)
© itemis AG
UI Replatforming: Motivation
24
● Web solution exists (IBM WebFacing), but still has a text-mode look&feel
● Hard to internationalize and make accessible
● Still bound to mainframe platform and RPG
Not future-proof
© itemis AG
UI-Replatforming: Target Architecture
25
● J2EE
● Spring Framework
● JavaServer Faces (JSF) 2.x
● Facelets
● Apache Tobago ( grid layout)
● Data binding using Java Expression Language
● CSS, JavaScript
© itemis AG
UI-Replatforming: DSLs und Generatoren
26
BODSL models
ViewmodelDSL models
ScreenDSL models
BO generat
or
BOJava Beans
Viewmodel Java Beans
JSFFacelets
Viewmodel generator
Screen generator
use/extend use
useuse
© itemis AG
The result
28
7 million loc RPG
700.000 loc model
1 million loc XHTML4.3 milllion loc Java
3 million loc Java
© itemis AG
Testing
29
Problem● No automated Tests
Solution● Record test cases in legacy system in browser (IBM WebFacing)
○ Recording done with HP Quality Center● Transform recorded legacy tests to Test DSL● Generate Selenium tests out of test cases in Test DSL● Test migrated system
Prerequisite ● Ensure that UI widget ID is preserved
© itemis AG
We also got DSLs for…..
Requirements
Traceability
Docker
Typesystems
UI Descriptions
Business Rules
Router Configuration
Embedded DevelopmentStatemachines
© itemis AG
Xtext is a powerful language workbench to create state of the art languages and editors
Industry-proven for Domain-specific languages
Model-based migration
Testing
Typesystems
….
Xtext is backed by a vivid open-source comunity
Feel free to join the Xtext community
Take away
Top Related