A “legacy” application (the word means inheritance) is, in the usage of IT teams, an application received from an earlier technical era, which still delivers a service the organisation cannot do without and which has become difficult or risky to change. Neither age nor technology enters into this meaning: an application a few years old may deserve it. Legacy application modernisation aims to give it back the ability to evolve, at an acceptable risk.
The possible options range from the lightest to the deepest: encapsulate the application without touching it, rehost it, refactor it, rearchitect it, rewrite it, replace it. They are compared on three dimensions: what each changes, the risk it involves and the technical debt it leaves behind.
An “R” typology that changes from one source to another
Cloud providers designate these options by English verbs beginning with “R”, and their lists differ. The AWS guide for large migrations (AWS Prescriptive Guidance) presents seven, under the name “7 Rs”: retire, retain, rehost, relocate, repurchase, replatform, refactor or re-architect. Microsoft’s Cloud Adoption Framework lists eight: retire, rehost, replatform, refactor, rearchitect, replace, rebuild, retain. Survey made on these two pages on 12 November 2026.
The same verb does not always cover the same operation in both. At Microsoft, refactor designates improving the internal structure of the code without adding functionality, and rearchitect a new design of the architecture. AWS combines the two words in a single entry, defined by modifying the architecture to take advantage of cloud services. Two modernisation plans can therefore only be compared after establishing what each puts behind its verbs.
These lists classify strategies for migrating to the cloud. From them we retain the options that transform or replace an application, under names whose meaning we set here: rehost, refactor (in the sense of refactoring), rearchitect, rewrite (for rebuild), replace (for replace and repurchase). We add encapsulation, absent from both lists. Changing platform (replatform), retaining and retiring are presented on our page on application modernisation, with the situations each strategy suits.
Comparing the options for legacy application modernisation
| Option | What it changes | Risk it involves | Debt it leaves |
|---|---|---|---|
| Encapsulate | Nothing in the application; an API layer is added in front of it | Limited for the existing system; the layer relies on interfaces that were not designed for it | All of it, with one more layer to maintain |
| Rehost | The infrastructure that runs the application | That of an infrastructure migration: compatibility, performance, cutover | That of the code and the architecture, intact |
| Refactor | The internal structure of the code, with behaviour unchanged | Regression, for lack of tests to detect it | That of the technical platform and the overall architecture |
| Rearchitect | The breakdown into components and their exchanges | Data consistency and operations, when the system becomes distributed | That of the parts not reworked, and a new operational complexity |
| Rewrite | All the code, sometimes the data model | Behaviour to be reconstructed from the code; two systems to maintain during the workstream | The debt the new project incurs, if the old one is switched off |
| Replace | The application, and the processes that adapt to the product | The gap with the need, the data migration | A dependency on the software vendor, in place of the debt of the code |
This table is our reading, without figures. Its first column orders the options by depth: from encapsulation, which modifies nothing, to replacement, which keeps nothing. The last one shows that none leaves the organisation without a commitment. The first two keep the debt as it is. The last two only erase the original debt if the old system is shut down: as long as it remains in service, the two debts add up.
The nature of the risk changes with the depth of the intervention
Ranking the options on a single scale, from low risk to high risk, hides a useful difference: the risk does not bear on the same object, and it does not weigh on the same people.
Encapsulation and rehosting expose you to an operational risk. The team that operates the application carries it, and it is handled through repeated cutovers and a prepared rollback, as described in our article on IT migration.
Refactoring exposes you to regression, and the development team is responsible for it. On code without tests, the first piece of work consists of pinning down with characterisation tests what the code does today, before touching it. Our page on software quality presents the testing strategy of which this safety net is part.
When it distributes the application into components, rearchitecture shifts the risk towards what distribution brings: data to be kept consistent between components, network calls that can fail, heavier operations. Our entry on microservices architecture details these trade-offs.
Rewriting puts knowledge at stake. The business rules may be written nowhere other than in the code and be known only to a few people, whom the workstream mobilises for a long time. As for replacement, its risk is one of fit: the business adjusts its processes to the product or funds adaptations, according to the criteria of our comparison between custom development and software package.
Options that follow one another on the same application
One option does not exclude the next. An encapsulated application has a facade behind which its functions can be rewritten one by one, following the strangler fig pattern. A refactoring that isolates modules prepares a rearchitecture. A rehosting decided to meet a deadline can precede a refactoring, if this second phase is funded at the time the first is decided.
The choice starts from a diagnosis. A platform at end of support is not dealt with by a refactoring, which leaves the platform in place; lost documentation is not recovered by a rehosting. Our article on application obsolescence indicates how to identify, layer after layer, what has aged. When the application runs on a large system, several of these options appear with specific constraints, alongside code conversion, in our article on mainframe migration.
A chosen option is written down with what it leaves: the debt that remains, the person who carries it, the date on which it will be reconsidered. Without this mention, an encapsulation or a rehosting conceived as steps may become the lasting state of the application.