Old systems

Rewrite it, or move it piece by piece?

For most systems that run a business, we'd move it one part at a time. Starting again is right in a few cases, and they're worth knowing.

By the duyan team · Updated · 4 min read

Old systems

In short

  • A full rewrite delivers nothing until the end, and the old system keeps rules nobody wrote down.
  • Moving piece by piece builds new parts beside the old system, then switches each one over.
  • It costs some temporary code, and two systems to run for a while.
  • Start again when the system is small, can't be split, or no longer fits the business.

Our view

For most systems that run a business, we'd move it piece by piece. Each part is rebuilt, run beside the old one, and switched over once the two agree.

Starting again can feel simpler than untangling old code. Usually it takes longer than planned, and nothing reaches users until the end.

There are cases where starting again is right. We list them below.

Why full rewrites stall

Old code holds fixes that nobody remembers. Joel Spolsky made this point in 2000.

An odd⁠-⁠looking line is often the cure for a bug someone found the hard way. A rewrite throws those fixes away, and the bugs return one at a time after launch.

His example was Netscape, which rewrote its browser from scratch. It skipped version 5, and nearly three years passed between major releases.

Spolsky blamed the rewrite for the market share Netscape lost in that time.

Defining "the same as today" is harder than it sounds. Thoughtworks consultants Ian Cartwright, Rob Horn and James Lewis call this goal feature parity.

In their experience, agreeing on what the old system does took a huge effort. That effort led to plans for one large switch⁠-⁠over, while the business kept changing underneath.

Martin Fowler adds a further point. Much of what an old system does is no longer wanted, so copying all of it wastes effort.

What moving piece by piece means

Fowler named the approach after the strangler fig. The fig grows around a host tree until it stands on its own.

In software, new parts are built beside the old system. A routing layer sits in front and sends each request to the old part or the new one.

Microsoft's architecture guide calls this layer a façade. Users keep using the same screens and addresses.

Over time, more requests go to the new parts. Each old part is switched off once nothing needs it.

The gains are practical. Each step is small enough to undo.

Users get value from the first part, without waiting for the last.

You also learn as you go. What the first part teaches you shapes the price and plan for the next one.

What it costs

Running two systems side by side needs temporary code to connect them. Fowler calls it transitional architecture.

It can feel like waste. Fowler argues the lower risk is worth the cost.

Shared data is the hardest part. While both systems run, both may need the same records, so data has to stay in step.

It also takes discipline to finish. If the last old parts are never switched off, you pay to run both systems indefinitely.

What it costs
Full rewritePiece by piece
When users see valueAt the endFrom the first part
Risk at switch⁠-⁠overAll at onceOne part at a time
Extra costThe old system runs untouched until launchTemporary code to run both
Best forSmall systems, or ones that can't be splitLarge systems the business depends on

When we'd start again

  • The system is small. Microsoft's guidance notes the pattern may not suit a small system that's simple to replace whole. A few screens and one database can often be rebuilt in weeks.
  • You can't get between users and the system. The routing layer needs a way to catch requests. Without access to the code, the database or the traffic, there's nowhere to put it.
  • The business has moved on. If most of the old rules are no longer wanted, copying them makes little sense. You write down what still matters, and build for that.
  • The old platform must go by a date. A vendor may end a product, or a contract may expire. Then a faster, larger switch may be the only option.

Even then, two steps keep the risk down. Write down what the old system does before you build. Then run both on the same work before you switch.

What to do

  • Ask for a written map of the old system before anyone proposes a plan.
  • Choose a first part that's low in risk and visible to users.
  • Ask how each switch can be undone, and test that before it happens.
  • Agree when and how each old part is switched off and archived.

If someone proposes a full rewrite, ask which of the cases above applies. If none does, ask how users will get value before the end.

Start with the map

We map what the old code does, then move it one part at a time while it keeps running.

Sources

  1. Joel Spolsky, "Things You Should Never Do, Part I", Joel on Software, 6 April 2000, joelonsoftware.com (accessed 5 November 2026)
  2. Martin Fowler, "Strangler Fig", martinfowler.com, 22 August 2024, martinfowler.com (accessed 5 November 2026)
  3. Ian Cartwright, Rob Horn and James Lewis, "Patterns of Legacy Displacement", martinfowler.com, first published 20 July 2021, martinfowler.com (accessed 5 November 2026)
  4. Microsoft, "Strangler Fig pattern", Azure Architecture Center, learn.microsoft.com (accessed 5 November 2026)

Tell us the job

Bring a job to build or a role to fill. We reply within one working day, with questions or a next step.