Insights · Legacy modernisation
How to modernise a legacy system without a big-bang rewrite
Replace the system one slice at a time while it keeps running, and prove each new slice behaves like the old one before you switch. Here is the method, step by step.
Short answer: don't replace a working legacy system in one go. Map what it does, record its current behaviour as automated tests, then move it to the new platform one slice at a time while the old system keeps running. Each new slice has to pass the same tests as the old one before users are switched over, and every switch has a rollback path. This is often called the strangler fig pattern, and it turns one large, all-or-nothing bet into a series of small, reversible ones.
Key points
- Big-bang rewrites fail mostly because of behaviour nobody knew the old system had.
- Capture current behaviour as characterisation tests before you change anything.
- Migrate in slices, run old and new side by side, and keep a rollback plan for each cutover.
- AI speeds up code understanding, translation and test generation; engineers still review every change.
- A full rewrite isn't always the answer. Re-platforming, wrapping the core in APIs or retiring parts can be cheaper.
Why big-bang rewrites go wrong
A system built 15 to 25 years ago usually works. That is the problem. Over the years it has absorbed thousands of business rules, workarounds and edge cases, and most of them were never written down. The people who understood them have often moved on.
A big-bang rewrite tries to rebuild all of that from requirements documents and interviews, then switch everything over on one date. Three things tend to happen:
- Hidden behaviour is lost. The new system does what the specification said, not what the old system actually did, and the gaps surface after go-live.
- The target keeps moving. The business can't stop changing the old system for the two years the rewrite takes, so the rewrite is always catching up.
- Value arrives late or never. Nothing is usable until everything is finished, so the project carries all its risk until the last day.
The incremental method, step by step
- Build a map of the system. Analyse the code to produce architecture diagrams, a dependency and risk map, data lineage and a catalogue of business rules. This is where AI tools are most useful: they can read a large, undocumented codebase far faster than people and produce a first draft that engineers then check.
- Capture behaviour as tests. Write characterisation tests that record what the system does today, including the odd cases, and run them against the legacy build. These tests describe the real system, not the one in the documents, and they become the definition of "done" for every slice.
- Design the target. Choose a mainstream stack your team can hire for, such as .NET 8 or later, Java 21 with Spring Boot, or a modern web front end over an API, on AWS or Azure. Build authentication, monitoring, automated deployment and infrastructure as code in from the start.
- Choose the first slice carefully. A good first slice is valuable enough to matter, small enough to finish in weeks, and loosely connected to the rest of the system. Reporting, a single workflow or one customer-facing screen are common choices.
- Migrate the slice. Translate the slice to the new stack. With AI assistance much of the translation can be drafted automatically, but an engineer reviews and approves every pull request, and nothing merges unreviewed.
- Prove equivalence. The new slice must pass the same behaviour tests as the old one, plus security, dependency, licence, coverage and performance checks.
- Run in parallel, then cut over. Run old and new side by side, compare results, and switch users only when the data shows it is safe. Keep the rollback plan until the legacy component is retired.
Repeat steps 4 to 7 until the legacy system has nothing left to do. Data migrates alongside each slice and is reconciled against the legacy system, with an audit trail of what moved and when.
Common legacy platforms and typical targets
| Legacy | Typical target |
|---|---|
| VB6, .NET Framework, WebForms | .NET 8+ services and a modern web front end |
| Classic ASP | An API-first back end with an accessible web front end |
| Older Java and J2EE | Java 21 and Spring Boot, containerised |
| Delphi and PowerBuilder | Web applications on a managed cloud database |
| MS Access and Lotus Notes | Multi-user cloud applications with proper data models and audit trails |
When a rewrite isn't the right answer
Modernisation doesn't always mean rewriting. Before committing to a migration, compare it with the cheaper options:
- Re-platform when the code is sound but the infrastructure is the problem, for example moving to the cloud or a supported database.
- Wrap the core in APIs when the system is stable and you mainly need other systems, or AI features, to reach its data.
- Retire parts nobody uses. Codebase analysis usually finds dead code and unused features that don't need to move at all.
- Replace with a product when the function is generic, such as payroll or document storage, and a standard product does it well.
An assessment should cost each option, so the decision is made on evidence rather than preference.
What AI changes, and what it doesn't
AI makes the slow, manual parts of modernisation much faster: reading old code, documenting business rules, drafting translations and generating tests. That shortens timelines and makes slice-by-slice migration affordable for systems where it used to be too expensive.
It doesn't remove the need for engineering judgement. Architecture decisions, review of every change, and accountability for whether the new system behaves correctly still sit with experienced engineers. Treat AI-generated code exactly like hand-written code: same review, same tests, same quality gates.
Questions we're often asked
How long does it take to modernise a legacy system incrementally?
It depends on size and how tangled the system is, but the first slice is usually live within a few months, and each later slice is faster because the platform, tests and patterns already exist. An assessment of two to four weeks produces a phased roadmap with an estimate for each phase.
Can the business keep using the old system during the migration?
Yes. That is the point of migrating in slices. Users keep working in the existing system while new components take over one function at a time, and every slice has a rollback path.
What if there's no documentation for the old system?
That's normal. Codebase analysis rebuilds the documentation from the code itself, and characterisation tests record what the system actually does, which is often more reliable than the original documents.
See how we apply this method on our legacy modernisation page, or read the full delivery and quality model.