Skip to content
Technology transformation expertise firm · ARDIANE Group Innovate, secure, succeed

Engineering

The options for modernising a legacy application, compared by risk and debt

In brief

Legacy application modernisation gives an inherited application, which has become difficult to change, back the ability to evolve at an acceptable risk. Management Square compares here six options (encapsulate, rehost, refactor, rearchitect, rewrite, replace) on what each changes, on the risk it involves and on the debt it leaves behind.

Page contents

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.

FAQ

Frequently asked questions

Another question? Ask us

What is a legacy application?

The word legacy means inheritance. IT teams use it for an application received from an earlier technical era, still necessary to the business and now difficult or risky to change. It refers neither to an age nor to a technology: an application a few years old, without tests or documentation, may be described in this way.

How many "R" modernisation strategies are there?

The number and the names vary from one source to another. Read on 12 November 2026, the AWS guide for large migrations presents seven and Microsoft's Cloud Adoption Framework eight, and the same verb does not always designate the same operation in both. It is better to define each option by what it changes in the application than by its name.

What is the difference between refactoring and rewriting an application?

Refactoring modifies the internal structure of the code through small transformations, without changing its behaviour: the application stays in service and the technical platform does not change. Rewriting starts again from new code: the business rules have to be rediscovered, then the equivalence of the service delivered has to be proven. The first requires a safety net of tests, the second a period of coexistence with the old system.

Is rehosting a legacy application enough to modernise it?

Rehosting changes the infrastructure that runs the application and leaves the application as it is. It answers a hosting or hardware deadline, and leaves the code, the architecture and the difficulty of evolving the whole untouched. It can be a first step, provided that the next one is decided and funded at the same time.

Is it better to rewrite a legacy application or replace it with a software package?

The answer depends on the function the application carries. If this function is common to many organisations and the gap between the need and a product on the market is small, replacement avoids rebuilding what already exists. If it carries rules specific to the organisation, rewriting preserves them, at the price of a workstream in which these rules must first be rediscovered.

A project to bring to completion?

A first conversation is enough to understand your challenge, identify the right people and tell you frankly what we can bring.