Legacy software modernization: rebuild, refactor or replace?
Legacy software modernization rarely means one big decision. It means choosing, part by part, whether to retire, keep, move, improve, rebuild or replace an old system, and then making the change in small steps while the business keeps running. Most organisations do best with a mix: move what works as it is, fix the part that hurts most, buy off the shelf what is not specific to them, and switch off what nobody uses. A full rewrite delivered in one go is the riskiest route. Start from the signals below, then use the decision table to pick an option for each part.
Signs that modernisation is due
Old is not a reason on its own. Plenty of software written long ago still does its job. These are the signals worth acting on:
- Security updates have stopped. The operating system, database or framework is no longer supported by its vendor. The UK’s National Cyber Security Centre (NCSC) warns that once updates stop, it becomes more likely that exploitable vulnerabilities become known to attackers. Its guidance on obsolete products says that “moving away from obsolete systems should be the goal”.
- Every change is slow and frightening. A small request takes weeks, and each release breaks something unrelated.
- Knowledge sits with one or two people. If they leave, nobody can safely change the system.
- It cannot connect to what you use now. No API, nightly file exports, data re-keyed by hand into the ERP, the CRM or a mobile app.
- Workarounds are growing around it. Spreadsheets, shared folders and side databases fill the gaps, and the figures in them are never quite up to date.
- It no longer fits how you work. New products, sites, countries or regulations have to be forced into screens designed for another business.
- Running it costs more each year. Licences, specialist hardware or rare skills, for less and less value.
One signal is a reason to look closer. Three or four together usually mean the question is no longer whether to modernise, but which part to start with and how.
The options, from lightest to heaviest
There is a well-known vocabulary for this, often called the “7 Rs”. Amazon Web Services publishes one version in its prescriptive guidance on migration strategies: retire, retain, rehost, relocate, repurchase, replatform, and refactor or re-architect. AWS wrote it for moving applications to its cloud, so the list below adapts it to modernisation in general. “Relocate” is specific to moving whole server platforms into AWS and is left out. “Rebuild” and incremental replacement are not AWS terms; they are added because they are the choices businesses actually debate.
| Option | What it means | When it fits |
|---|---|---|
| Retire | Switch it off and archive the data | Nobody depends on it any more, or another system already does the job |
| Retain | Keep it as it is, for now | It works, it is supported, and other changes come first |
| Rehost (“lift and shift”) | Move it to new infrastructure without changing the code | The servers are the problem, not the software |
| Replatform | Move it with targeted changes, such as a managed database or containers | Some quick gains are available without redesign |
| Refactor or re-architect | Restructure the code and its design, keeping what it does | The business logic is sound but changing it has become slow |
| Rebuild | Write a new system for the same purpose | The logic itself is wrong, or the platform cannot be upgraded |
| Replace (AWS: “repurchase”) | Move to an off-the-shelf product or a subscription service | The process is standard and not what sets you apart |
Two remarks from the AWS guidance are worth keeping in mind. It calls refactoring “the most complex and costly” of its strategies. And for large programmes it recommends moving first and modernising afterwards, rather than doing both at once. Rehosting is a useful step, then, but it is not modernisation on its own: the same code, with the same limits, simply runs somewhere else.
Rebuild or refactor: the old argument
The case against a full rewrite was put bluntly in 2000 by Joel Spolsky in his essay “Things You Should Never Do, Part I”. He called rewriting code from scratch “the single worst strategic mistake that any software company can make”, using Netscape as his example, and argued that the odd-looking parts of old code are often bug fixes: knowledge that a rewrite throws away.
That remains the right default, but it is not absolute. Rebuilding makes sense when the platform has no supported upgrade path, when the code cannot be built at all, or when the way the business works has changed so much that the old logic is more hindrance than asset. Even then, the rebuild does not have to arrive in one piece.
Replace with off-the-shelf
If the system handles something standard, such as accounting, payroll in a single country or email, a mature product will usually be cheaper to run than custom code. AWS notes that buying in still leaves work to do: training users, migrating data, connecting the new product to your sign-in and your network. Keep custom work for what is specific to you: your pricing rules, your planning logic, the way you serve customers.
The strangler fig: replacing a system in slices
Martin Fowler named the gradual approach after the strangler figs he saw in Queensland, vines that grow around a host tree and eventually replace it. His Strangler Fig Application article (dated 22 August 2024) notes that the term is now often used to describe a gradual approach to legacy modernisation. He also writes that he and his colleagues have seen plans to replace a system in one go “go down in flames most of the time”.
The idea is simple:
- Put a layer in front of the old system that receives requests or data, so that you can decide where each one goes.
- Build one part again, for example quoting, scheduling or invoicing, in the new system.
- Route that part to the new code, keep everything else on the old system, and compare results.
- Switch off the old part once the new one has proved itself in real use.
- Repeat until little or nothing is left of the old system.
The price is some temporary code that lets old and new run side by side and is thrown away at the end. Fowler acknowledges that teams resist writing it, and argues that the lower risk and the value delivered earlier outweigh that cost.
Copying the old system faithfully is a trap of its own. In their series Patterns of Legacy Displacement, published on Fowler’s site (latest revision 5 March 2024), Ian Cartwright, Rob Horn and James Lewis of Thoughtworks name the wish for “feature parity”, rebuilding everything the old system does, as a major cause of repeated failures. Defining every existing function is a huge effort, and it tends to push programmes towards a single “big bang” switch-over. They also make a point that is easy to forget: in their view, technology is at most half of a legacy problem. Ways of working, team structure and leadership count as much.
Data migration: where most of the risk hides
Code can be rewritten. Data cannot be recreated. Whatever option you choose, the data usually outlives the software, and it is where problems surface last and hurt most.
Hidden consumers. Old databases are often read by things nobody listed: a report, a data warehouse, a partner’s nightly export. Cartwright, Horn and Lewis describe a replacement in which products went missing from KPI reports: a middleware database was copied into a data warehouse that fed those reports, a flow the team only found by investigating. Map every flow in and out before moving anything. The inventory you would draw up when you take over existing software is a good starting point.
Meaning, not just format. A column called “status” may hold values whose meaning changed years ago. Ask the people who use the data, not only the database schema.
Quality. Duplicates, empty mandatory fields and dates typed as text are normal in old systems. Decide which to clean before the move, which during it, and which to leave in an archive.
History. Not every record needs to move. Keep what users actually consult, archive the rest in a readable format, and check what your contracts and legal obligations require you to keep and for how long.
Running in parallel. With a gradual approach, old and new systems hold some of the same data for a while. Decide which one is the reference for each type of record, and how changes travel between them.
Rehearse and reconcile. Run the migration on a copy several times before the real one. Compare record counts and totals, have users check familiar records, and write down how to roll back if the switch fails.
A decision table
Use this per part of the system, not for the system as a whole.
| What you see | Likely option | Watch out for |
|---|---|---|
| Nobody uses it, or a newer system already covers it | Retire | Hidden reports and exports that still read its data |
| It works, components are supported, other priorities come first | Retain, review regularly | Support end dates for the operating system and database |
| The servers or hosting are the problem, the code is fine | Rehost or replatform | Expecting a move to fix slow changes: it will not |
| Logic is right, but changes are slow and break things | Refactor, behind tests | Refactoring without tests is rewriting blind |
| The process is standard for your industry | Replace with off-the-shelf | Workarounds and custom rules the product will not cover |
| One area causes most of the trouble | Strangler fig on that area | Temporary code left in place after the switch |
| Platform unsupported, no upgrade path, or code cannot be built | Rebuild, in slices if possible | Chasing feature parity instead of today’s needs |
| No source code available | Protect data, then replace in stages | Undocumented rules only visible in the data |
How to phase a modernisation
A phased plan keeps the business running and lets you adjust after each step.
- Assess. List the parts of the system, who uses each one, what data they hold and what they connect to.
- Stabilise. Secure access, test that backups can be restored, and add tests around the areas you will change first. This is also where an inherited system gets audited.
- Agree the outcome. Faster changes, lower running costs, a new channel, security support restored: write it down, because it decides the order of everything else.
- Choose an option per part using the table above, and order the parts by value and risk. A part that hurts often but is fairly self-contained makes a good first slice.
- Deliver the first slice. Put the routing layer in place, move one part, run it in parallel, migrate its data with rehearsals, then switch off the old part.
- Review and repeat. Check the outcome against what you agreed. Adjust the order of the next slices with what you learned.
Plan for running costs throughout: two systems run side by side for a while, and that cost is part of the project, not an overrun.
Modernising with Plutus
Plutus is a custom software development company. Every project starts with a free 45-minute call with an engineer, and we can take over software someone else built after an audit of the code and of the systems it runs on. Where an existing system is worth keeping, we connect new work to your ERP, CRM, spreadsheets and old databases instead of replacing them. Once it is live, the same team keeps it running, which is how we approach software maintenance and support. The steps, from scoping to run, are described in our development process.
Frequently asked questions
How long does legacy software modernization take?
It depends on the size of the system, the state of its data and the option chosen for each part. With a gradual approach, the useful question is how soon the first part can be switched over, not when everything will be finished. The scoping call is where an estimate for your system starts.
How much does it cost?
There is no fair figure without looking at the system. The main drivers are the number of parts, the integrations, the volume and quality of the data, and the period during which old and new run side by side. Our guide to what drives a software budget explains each one.
Can we keep using the old system during modernisation?
That should be the plan. With the strangler fig approach, users keep working on the old system while parts move one at a time. Agree a freeze on new features in the part being replaced, so that you are not chasing a moving target.
Is moving to the cloud the same as modernising?
Not on its own. Rehosting changes where the software runs, not how it is built. It can reduce infrastructure work and make later changes easier, but slow releases or missing integrations will still be there afterwards.
Do we need feature parity with the old system?
Usually not. Copying every function means rebuilding behaviour nobody uses and delays the first useful result. List what users actually do, keep what still matters, and treat the rest as a decision to make, not a requirement.
Talk to an engineer about your old system
Bring a description of the system, what it connects to and what is getting in the way. Please do not send passwords. In 45 minutes with an engineer, you leave knowing which part to tackle first, whether or not we work together.
Sources
- Martin Fowler, Strangler Fig Application, 22 August 2024: https://martinfowler.com/bliki/StranglerFigApplication.html (accessed 1 December 2026)
- Ian Cartwright, Rob Horn, James Lewis, Patterns of Legacy Displacement, first published 20 July 2021, latest revision 5 March 2024: https://martinfowler.com/articles/patterns-legacy-displacement/ (accessed 1 December 2026)
- AWS Prescriptive Guidance, Large migration guide, About the migration strategies (no date shown): https://docs.aws.amazon.com/prescriptive-guidance/latest/large-migration-guide/migration-strategies.html (accessed 1 December 2026)
- National Cyber Security Centre (UK), Device security guidance, Obsolete products, published 29 June 2021, reviewed 13 May 2025: https://www.ncsc.gov.uk/collection/device-security-guidance/managing-deployed-devices/obsolete-products (accessed 1 December 2026)
- Joel Spolsky, Things You Should Never Do, Part I, 6 April 2000: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ (accessed 1 December 2026)