Domain specific languages (DSLs) are special-purpose computer languages, tailored to express and solve problems of a specific domain. They are widespread and well discussed in software development nowadays, promising increased productivity and higher quality. They can be defined as
“programming languages that raise the level of abstraction beyond programming by specifying the solution that directly uses concepts and rules from a specific problem domain.” (Kelly and Tolvanen, 2008).While GPLs (General Purpose Languages) - like Java or Kotlin - are widely used across various problem domains, DSLs are more specific, typically less comprehensive but very productive in a specific domain. They provide suitable abstractions aligned with the problem domain to express solutions in a neat and succinct way, often usable by non-programmers. In the domain of business software, business rule engines and languages to model workflow systems are widespread. State-charts executed by state machines are often applied in embedded system development to raise the level of abstraction. Other examples of DSLs are covered in this article. An entertaining explanation on DSLs or a very comprehensive Book is available online. An article on business DSLs and their relationship to Java can be found on dzone. Model-driven approaches bring a lot of worthwhile benefits. They are particularly popular in the automotive, telecom and avionics industry.
We have more than 10 years experience in the field of Domain specific languages. We provide consulting when it comes to the development of custom DSLs. While we can bring in our knowledge of language design, we are also capable to come up with complete solutions, including code-generators for XML, Java or C. Our main platform for language development and code generation is JetBrains MPS , a language engineering workbench. MPS is a sophisticated tool to design domain specific languages (DSL). It's revolutionizing projectional editing capabilities overcome the limits of language parsers allowing DSLs to have tables, diagrams and other graphical notations.
How could we create a DSL together?
We follow these steps to create and put your logical models into executable solutions:
- First, together with your domain specialists, a common way of looking at things is developed and an initial "paper and pencil" draft is created. The DSLs codifies the shared vocabulary and all the relationships typical for the domains at hand.
- After more discussions with domain specialists, a first prototype of the language is developed.
- Requirements of a prototypical solution are transformed into a logical model by using the conceived DSL. The logical model then fosters discussions with corresponding experts. This helps us to discover further requirements and structure the process of shaping the language.
- In another iteration, the DSL is improved to capture all necessary aspects of future solutions.
- A code generator to translate logical models into executable code is assembled. This will further specify and clarify important capabilities of DSLs, especially technical aspects.
- After another iteration of DSL improvements, more solutions can be codified into models by domain specialists. You are productive with your DSLs now.
- With language refactorings, the DSL itself, as well as exisiting logical models (solutions), can be further developed and transformed.
- In two consecutive German Articles (Article 1, Article 2) published in the Java Magazin, Daniel Stieger and Wolfgang Messner from die modellwerkstatt and Tom Schindl from bestSolution introduce to the idea of modeling business applications and how models translate nicely to Java FX applications.
- Testing an Asic: The case study describes how Daniel Stieger from die modellwerkstatt and Michael Gau from Bachmann electronics built a DSL and a C generator for testing an integrated circuit. A language was devised to formulate test cases which in turn generates to c code.
- Domain-Specific Languages for Business Applications - Modeling User Interfaces: Daniel Stieger, Wolfgang Messner, Oscar Rodriguez and Vaclav Pech are discussing the unique challenges of business application development, especially business logic handling and user interface design.
- Developing Business Applications in MPS: Daniel Stieger presenting the status quo of our modellwerkstatt werkbank - a business app framework.
die modellwerkstatt focuses on supporting customers in language design and code generation. We create tools and solutions that will assist you during all phases of a typical DSL project life-cycle: requirements gathering, elaboration and proper fulfillment, while obeying imposed time and costs restrictions.