One of the big attractions of the Java platform is the rich ecosystem that has evolved around it. The Java Virtual Machine (JVM) not only runs Java programs, but also those written in other languages that compile to Java bytecode. This has allowed us to explore alternative languages and bring the most beneficial ones to our development environment, where innovation is most valued.

"At Itiviti, language adoption is bottom-up. Instead of senior managers imposing technical choices, we encourage our developers to monitor trends while evaluating their characteristics and potential usefulness."

Within the Java ecosystem, we have tried, among others, Groovy, Kotlin, Scala, and Clojure. In this article, we will focus on Groovy and Kotlin which are two prominent examples of Java-compatible languages that have emerged in recent years.

Rapid adoption of Groovy and Kotlin

 

We started using Groovy in 2013, shortly after the release of version 2.0, when we moved our software build system from Apache Ant to Gradle, which uses Groovy rather than XML for project configuration. Its usage really took off when we adopted the Spock framework for integration testing. Historically, we used Java and the JUnit testing framework, which made writing tests tedious and time-consuming, in contrast to Groovy. When used properly, Groovy's expressive nature makes it much quicker to write and produce succinct code.

Furthermore, Groovy allows you to create domain-specific languages (DSLs) that encapsulate and abbreviate key concepts and processes. This has enabled us to create a dedicated DSL for our trading and connectivity applications whereby we can write complex workflows in just a few lines of code.

As a result, we managed to make Groovy Spock tests more human-readable than if they were written in esoteric and punctuation-laden Java. This makes them more accessible to other team members, such as product owners (POs) and quality assurers (QAs). QAs can look through and write complex testing scenarios in a way that is clear enough for our POs to understand what is going on without having to know all the inner workings of Groovy. This facilitates and accelerates the validation process across departments. Groovy has become the new standard testing language for all our Java-based applications.

Although Groovy's expressiveness and readability are ideal for testing, it is a semi-interpreted language which makes it slower to execute than a compiled language like Java. Therefore, we reserve Groovy for testing and will not include it in any of our production code where high performance is paramount.

 

Kotlin: ideal for both testing and production code

More recently, we have begun using Kotlin, which is also more concise and readable than Java. In addition, it has advanced type-checking constraints that prevent certain errors and help improve code quality. Groovy and Kotlin facilitate QA review and testing and help ensure we have strong quality controls on our systems – something that is vital in an industry like trading that does not allow for errors. 

Kotlin is relatively easy to learn and compatible with any existing Java codebase. Its use is transparent to our end-user clients, as no adjustments are required in their platforms when deploying new versions of our products. These are all important factors for us in choosing new technologies.

Given it makes a perfect choice for both testing and production code, its rapid adoption at Itiviti is being driven by our engineering teams who are excited by its capabilities. We have already successfully released several plug-ins developed with Kotlin.

We are happy about this uptake because the language has another element we consider essential when deciding whether to invest in a new technology – Kotlin has a large and growing community of developers. It received a major boost when Google adopted it as an official language for Android app development in 2017 and made it its preferred language for the platform in 2019. We are able to benefit from the creative activity around Kotlin and can quickly exploit innovations from the community as they appear.  This increases the choice of libraries, tools, and frameworks available for the language.

 

Because the JVM provides a level of abstraction between our software and our clients’ systems, it gives us the flexibility to diversify and evolve the way we write code. We are able to quickly exploit advances in the Java platform ecosystem to improve our development processes and products without impacting our end-users while allowing us to evolve rapidly our technology stack. We are also doing it in a way that involves and excites our engineers and gives them responsibility for technology choices.

Want to hear more from us?

Subscribe to Itiviti Insights

Written by

Guillaume Acard

Head of Engineering, Managed FIX Solutions

Developer at heart, Guillaume is our internal Web technology advocate. With over 12 years in software engineering, his experience spans from financial backend & desktop to startup cloud and web-based developement.

Share this insight