This guide will show you: the what: after a definition we will look into 19 examples of DSLs the why: what are the concrete benefits you can achieve using DSLs the how: we will discuss the different ways to build a DSLs and what are the success factors After that you will get a list of resources to learn even ...
Read More »Home »
Spring Integration MongoDB adapters with Java DSL
1 Introduction This post explains how to save and retrieve entities from a MongoDB database using Spring Integration. In order to accomplish that, we are going to configure inbound and outbound MongoDB channel adapters using the Java DSL configuration extension. As an example, we are going to build an application to allow you to write orders to a MongoDB store, ...
Read More »How to create an editor with syntax highlighting for your language using ANTLR and Kotlin
What we are going to build In this post we are going to see how to build a standalone editor with syntax highlighting for our language. The syntax highlighting feature will be based on the ANTLR lexer we have built in the first post. The code will be in Kotlin, however it should be easily convertible to Java. The editor ...
Read More »Create UML diagrams with simple DSL – PlantUML
Historically I disliked creating design UML diagrams, because the tooling for it mostly requires drawing boxes and connecting them with lines or arrows. I find such workflow very time consuming and wasteful. This short blog post will describe much better way to create UML diagrams. But first of all, you may argue that UML importance in today’s agile software development ...
Read More »Typesafe Kubernetes-manifest DSL for JVM-based apps
Managing a cluster of Docker/Rocket containers (or anything) in a production environment is rife with distributed-systems challenges. Luckily, a compelling and very vibrant community around the Kubernetes project is working on those challenges, using years of experience at Google, Red Hat, and startups to guide the way for others. If you haven’t tried Kubernetes for managing your Docker containers, you ...
Read More »Do Not Create DSL for the Customer
Domain Specific Language (DSL) solutions are many times created with the intent to give a tool to the hands of the customer representatives (business people) to do the configuration of the application on their own. Most of these attempts fail miserably: the DSL ends in the hands of the developers. (Sometimes there can be exceptions those I have never experienced.) ...
Read More »Develop DSLs for Eclipse and IntelliJ using Xtext
In this post we are going to see how to develop a simple language. We will aim to get: a parser for the language an editor for IntelliJ. The editor should have syntax highlighting, validation and auto-completion We would also get for free an editor for Eclipse and web editor, but please contain your excitement, we are not going to look ...
Read More »Creating a DSL for AWT’s Robot
The Java SDK ships with the class java.awt.Robot that allows the automation of keyboard and mouse input as well as the creation of screen captures. When you want to write a small test application that simulates user input or you just want to automate the input of some recurring text, this features comes in handy. But you do not want ...
Read More »RabbitMQ – Processing messages serially using Spring integration Java DSL
If you ever have a need to process messages serially with RabbitMQ with a cluster of listeners processing the messages, the best way that I have seen is to use a “exclusive consumer” flag on a listener with 1 thread on each listener processing the messages. Exclusive consumer flag ensures that only 1 consumer can read messages from the specific ...
Read More »