Skip to content
Modernization

Legacy Application Modernization: Six Approaches and How to Choose Between Them

Rehost, replatform, refactor, rearchitect, rebuild or replace. Each approach solves a different problem, carries a different risk, and most systems need more than one.

Amjad IqbalFounder & CEO, CodeWorx Developers7 min read
Cover of Six ways to modernize legacy applications: one legacy server connected to six different modern modules
The short answer

What are the main approaches to legacy application modernization?

The six common approaches are rehosting (moving to new infrastructure unchanged), replatforming (small changes to use managed services), refactoring (improving code without changing behaviour), rearchitecting (changing the structure, often adding APIs or splitting services), rebuilding (writing the application again) and replacing (moving to a packaged product). Two more decisions sit alongside them: retain and retire. Most systems need a combination, chosen part by part.

  • The six common approaches range from moving the same software to new hosting, to replacing it with a product.
  • Each solves a different problem. Choosing the wrong one moves the cost without removing the pain.
  • Choose per part of the system, not for the system as a whole, and add retain and retire to the list.
  • Staged techniques, the strangler fig and branch by abstraction, let you modernize while releasing regularly.
Read time
7 min
Best for
CTOs and owners of business-critical legacy systems
Updated
13 October 2026

Six approaches, six different problems

"Modernization" covers very different kinds of work. Cloud providers use a shared vocabulary for it; AWS, for example, lists seven migration strategies, from retire and retain through rehost and replatform to refactor. For a single business application, these are the six approaches that change something:

ApproachWhat changesSolvesMain risk
RehostWhere it runsOut-of-support hosting, data centre exitsOld problems move with it
ReplatformHosting plus small changes, such as a managed databaseOperating cost and reliabilityScope creep into a rewrite
RefactorCode structure, not behaviourSlow, risky changesNeeds tests first to be safe
RearchitectHow the system is divided and connectedIntegration limits, scaling, team bottlenecksRunning old and new together for a while
RebuildThe application is written againA process model the business no longer followsLong wait for value; lost rules
ReplaceA packaged product takes overStandard processes a product handles wellFitting the business to the product

Two decisions sit alongside them. Retain keeps a part as it is, for now, because it works and changes rarely. Retire switches off what is no longer needed. Both are underused: every part you retire is a part you never have to modernize.

Each approach, in practice

Rehost

Move the application to new infrastructure without changing it, often called lift and shift. It is fast and low risk, and it solves exactly one problem: where the software runs. If the pain is slow releases or poor integration, rehosting moves the pain to a new server.

Replatform

Move it and make targeted changes to benefit from the new platform, such as a managed database, managed file storage or automated deployments. This often cuts operating effort noticeably for modest work. The risk is enthusiasm: each "small improvement" leads to another until the replatform is an unplanned rewrite.

Refactor

Improve the internal structure of the code without changing what it does. Refactoring makes future changes faster and safer, but only if tests exist to prove behaviour has not changed. For a system with no tests, writing them around the most-used behaviour comes first.

Rearchitect

Change how the system is divided and connected: put an API in front of it, split out a component that changes often, or move to events between parts. This is where most valuable modernization happens, because it removes the bottlenecks that slow the whole business, such as being unable to connect a new tool.

Rebuild

Write the application, or part of it, again. Justified when the software models a process the business no longer follows, or the technology cannot be kept secure at a sensible cost. The main risks are a long period without new value and losing business rules nobody wrote down. Rebuild one area at a time wherever possible.

Replace

Move to a packaged product. The right answer for standard processes such as accounting, HR or ticketing, where a product built for many customers will be better maintained than anything bespoke. The cost is adapting your process to the product, plus migration and integration.

Six glass cards fanned out, each showing a different modernization path

Choose per part, not per system

An application is several layers: interface, business rules, data, integrations and infrastructure. Each can need a different approach.

A typical result for a ten-year-old operations platform might be:

PartConditionApproach
InfrastructureOld servers, manual deploymentsReplatform
Business rulesMostly correct, poorly testedRefactor, tests first
Pricing moduleChanges monthly, hard to updateRearchitect into its own service
ReportingDuplicates what the BI tool can doReplace with the BI tool
Fax integrationNo longer usedRetire
Customer interfaceDated but functionalRetain for now, rebuild later

No single label describes that plan, and that is the point.

Staged techniques that keep the business running

The strangler fig

Martin Fowler's strangler fig approach replaces a system gradually: put a stable interface or facade in front of it, build replacements for one capability at a time behind that interface, and switch traffic as each is proven. Microsoft's guidance adds two important details: use an anti-corruption layer so the new design is not shaped by the old one, and do not let the facade become a single point of failure. It also notes the pattern is a poor fit when requests cannot be intercepted, or when the system is small enough to replace in one go.

Branch by abstraction

Inside a codebase, Fowler's branch by abstraction does something similar at a smaller scale: introduce an abstraction around the part being replaced, switch callers to it, build the new implementation behind it and remove the old one. It allows the system to be released regularly while the change is still in progress, instead of living on a long-running branch.

How to assess each part

Before choosing an approach for a part of the system, rate it on a few plain questions. A short assessment like this, done with the people who maintain and use the system, is usually enough to make the choice obvious:

QuestionPoints towards
Does it still do what the business needs?Yes: retain, rehost or refactor. No: rebuild or replace
How often does it need to change?Rarely: retain. Often: refactor or rearchitect
Can the team change it safely today?No tests: add tests before anything else
Is the technology still supported and patchable?No: replatform, rebuild or replace
Does a product now do this well?Yes: consider replace
Is it still used?No: retire
Does it block other systems from connecting?Yes: rearchitect, often with an API in front

Record the answers and the chosen approach for each part, along with the reason. The written reasons matter later, when the plan is challenged or a new person joins the team.

Signs you are choosing for the wrong reasons

  • The approach was chosen before the problem was named. "We need microservices" is a solution looking for a problem.
  • Everything gets the same approach. One label for a whole system usually means nobody looked at the parts.
  • The plan has no first release. If the first visible benefit is a year away, the plan is a rebuild in disguise.
  • Nobody can say what the old system does. Any approach is risky until behaviour is documented and tested.
  • The cloud provider chose for you. Hosting is one layer. Moving it rarely fixes the others.

Keeping the business informed

Modernization is easier to fund when progress is visible to people who never see the code. Report each stage in business terms: what users can now do, what was retired, what risk was removed and what it costs to run. A plan that only reports technical milestones tends to lose its sponsor long before it finishes, however well the engineering is going.

Where to start

  1. Name the business problem in one sentence: slow releases, no integration, rising costs, unsupported technology.
  2. Break the system into its parts and give each a condition and an approach from the table above.
  3. Pick the first stage: small, valuable, visible to users and able to teach the team how the system really behaves.
  4. Put tests around the behaviour that stage touches before changing it.
  5. Release, measure and choose the next stage with what you have learned.

For a deeper look at the biggest decision in this list, read modernize or rebuild. If you want help assessing a system part by part, our application modernization team runs it as a fixed-scope first step.

References

  1. Migration strategies (the 7 Rs) AWS Prescriptive Guidance
  2. Strangler Fig Application Martin Fowler, updated August 2024
  3. Branch By Abstraction Martin Fowler, January 2014
  4. Strangler Fig pattern Microsoft Azure Architecture Center

Have a question like this about your own software?

Tell us what you are trying to build, improve or solve. Plain language is fine.

Your privacy choices

We use necessary storage to run this site. With your permission, we also use Google Analytics and Google Ads measurement to see how the site is used and which campaigns lead to enquiries. Nothing else runs until you choose. Privacy Policy Cookie Policy

Cookie preferences

Choose what this site may use. You can change this at any time from Cookie settings in the footer.

Necessary

Always active

Keeps the site working and secure, and stores the choice you make here (one first-party cookie). It cannot be switched off.

Analytics

Google Analytics measures visits and how pages are used, so we can improve the site. It sets Google cookies only when allowed.

Advertising

Google Ads measurement shows which ads lead to enquiries. Google may use the email or phone number you enter in a form, in hashed form, for this. It runs through the same Google tag as Analytics, so it can only be switched on together with Analytics.