spainter_vfx - stock.adobe.com

App refactoring recipe: A Computer Weekly Downtime Upload podcast

Listen to this podcast

We speak to Moderne CEO and OpenRewrite inventor, Jonathan Schneider, about application modernisation

Consider the challenge of updating an organisation’s entire application estate from one version of Java to another, something that may be needed both to maintain IT security and to migrate from an application server like WebSphere to an alternative, like Tomcat.

Moderne CEO and co-founder, Jonathan Schneider is the inventor of OpenRewrite, an open-source software auto-refactoring tool designed to tackle such programming challenges

Schneider used to work at Netflix and wanted to solve a hard problem—how to rewrite the code with accuracy and preserve the original code style so it would be accepted. The result was a new data model for code (called the Lossless Semantic Tree) and a rules-based refactoring engine driven by recipes that specify how to rewrite the code.

Describing the challenge and complexity of refactoring code at Netflix, he says it was not possible to set a cut-over date to move code over to a new platform “We couldn't impose constraints on what product engineers did.” At the time, Schneider was part of a central team providing what is now called developer experience and includes platform engineering. 

The Lossless Semantic Tree used in OpenRewrite provides a detailed map of the code’s structure and relationships. This is used by the rules-based refactoring engine, which is driven by recipes that specify how to rewrite the code. 

One of the original Netflix use cases, he says, was an internal logging library “We wanted to replace it with open source SLF 4J (Simple Logging Facade for Java).” The process involves looking through the code and logger information to identify where the internal logging library was being used. 

Schneider has built a business around the complexity of keeping code current. Every piece of code created basically ends up as technical debt as soon as it is deployed into production. He says: “I could make all the perfect decisions around an applications architecture and pick all the best libraries today then, two months from now, for one reason or another, it's no longer optimal.” 

Historically, code tends to remain with product engineers who continue to revise their application going forward and keep it up to date. Sometimes, he says, an IT consulting firm would be brought in to establish a software factory, just to work on application maintenance, one application at a time. 

According to Schneider, this strategy for application modernisation has not worked. The approach Moderne takes is to consider tasks that can be solved horizontally, across the whole business. 

It is something that has caught the attention of Microsoft. Moderne is on the Azure Marketplace and the company is also part of the Microsoft Pegasus programme, for promoting startups. Discussing the benefits of Pegasus, Schneider says: “Microsoft is always seeking capabilities that are important to its key customers and it is trying to pair solutions with customer needs. In this case, I think technology engineering and IT executives want to accelerate application modernisation.” He says the programme has helped Moderne’s Azure Marketplace listing  by “cutting through a lot of the tape” along with the commercial benefits of co-selling with Microsoft.