Skip to content
FocalIDFocalID

Modernising a legacy system: rewrite, replace or improve in stages?

An old system that still runs the business is hard to love and harder to remove. It holds years of rules nobody wrote down. The question is not whether to modernise but how, and the answer is rarely “rewrite everything at once”.

By the FocalID team in Colombo, , 2 min read

An early desktop computer with a built-in screen and keyboard on a desk.

The options

OptionWhat it meansFits when
Keep and wrapLeave the system as it is and add an API around itIt works well but other systems cannot reach its data
MoveRun the same software on modern servers or in the cloudThe hardware or hosting is the problem, not the software
ImproveClean up and update the code without changing what it doesThe design is sound but the code is hard to change
Replace in stagesBuild new parts beside the old system and move work across piece by pieceThe system is large and the business cannot stop
Replace with a productSwitch to an existing productThe process is standard and a good product exists
Rewrite in one goBuild a complete new system, then switch overThe system is small and well understood

Why the big rewrite is risky

A full rewrite delivers nothing until the day it replaces the old system. Until then the business pays for two systems, and the old one keeps changing while the new one tries to catch up. The rules hidden in the old code are discovered late, usually when something goes wrong after the switch.

Replacing in stages: the strangler fig pattern

The safer route has a name, coined by the software writer Martin Fowler: the strangler fig pattern. A layer is placed in front of the old system. One function at a time is rebuilt in the new system, and the layer sends that function’s traffic to the new code. The old system shrinks until nothing is left to switch off.

Each step is small, delivers something usable and can be reversed. The business sees progress in weeks instead of waiting years.

How to choose

  • If the main pain is that nothing can connect to the system, wrap it with an API first.
  • If changes are slow and risky, add automated tests around the system before touching it.
  • If the process is standard, look at products before building.
  • If the system is large and central, replace it in stages, starting with the part that changes most often.

Do not forget the data

Whatever route you take, the data has to move too. Plan the migration early, clean the data before it moves and reconcile old and new figures after each stage. Most modernisation projects that run late do so because of data, not code.

Common questions

What is a legacy system?

Any system the business depends on that has become hard to change, support or connect to. Age alone does not make a system legacy.

Is modernisation the same as moving to the cloud?

No. Moving to the cloud changes where the system runs. Modernisation may also change how it is built and what it can connect to.

Can we add AI to a legacy system?

Often yes, once its data can be reached through an API or a data pipeline. That step is usually the first part of the work.

Related