Rebuilding vs refactoring legacy software: which should you choose?

Updated · 6 min read

What is the difference between rebuilding and refactoring?

Refactoring means improving existing software in place. The team restructures the code, cleans up the data layer, updates libraries and fixes slow parts, while people keep using the system. Users see the same product, ideally a better one.

A rebuild means writing a new system, usually on a new architecture, and moving users and data across when it is ready. The old system runs until the new one takes over, then it is switched off. Both paths can end with working software, but they carry very different risks and take very different amounts of time.

What are the risks of a full rebuild?

A full rebuild is tempting because it promises a clean start. The danger is that the old system keeps changing while the new one is built, so the target keeps moving. Many business rules also live only in the old code, often as small exceptions nobody wrote down, and they are easy to lose in the move.

  • Scope creep: the new system must match every feature of the old one, plus the new requests people raise during the build.
  • Lost rules: discounts, approval limits and edge cases that staff rely on may exist only in code.
  • A long wait without value: users may wait months before they see anything better.
  • A big-bang cutover: a single switch-over day carries all the risk at once.

What are the risks of refactoring in place?

Refactoring has traps too. Old code often has no automated tests, so each change can break something that nobody notices until a customer complains. If the system depends on a platform that is no longer supported, refactoring can tidy the code without solving the underlying problem.

  • No safety net: without tests, every change needs manual checking.
  • Platform lock-in: cleaner code on an unsupported runtime is still unsupported.
  • Slow visible progress: stakeholders may lose trust when they cannot see the change.
  • Hidden coupling: shared databases and reports can make a small change ripple into other teams.

How does the strangler approach replace a system gradually?

The strangler approach replaces a legacy system piece by piece, so the old system is gradually surrounded and then removed. You place a routing layer in front of the old system, so each request reaches either the old code or the new code. You then build one feature at a time in the new system and switch it over once it has been tested with real users.

Each switch is small and reversible. The old system shrinks until nothing people need is left running in it, and then it is retired. This keeps value flowing, lets you learn from the early pieces and keeps the business running during the change.

  • Pick a first slice with clear boundaries and modest risk, such as a reporting screen or a single approval flow.
  • Route that slice to the new code and run both versions side by side for a short period.
  • Compare outputs on real records before you remove the old path.
  • Repeat until the old system has no duties left, then archive it.

How do you keep data continuous during the change?

Data is where gradual migrations get hard. For each type of record, decide which system is the source of truth at each stage. Two systems that both write the same customer record will eventually disagree, so avoid writing to both unless you have a clear sync rule and a way to reconcile differences.

  • Map every data field and name the system that owns it.
  • Run reconciliation reports that compare totals and sample records between the old and new systems.
  • Keep a read-only archive of the old data so you can answer questions about past transactions.
  • Agree in advance how to handle records edited in both systems during the transition window.

What signs show that a rebuild is justified?

A rebuild is the right call more often than people admit, but it should rest on evidence rather than frustration. Ask whether the old system blocks the business or is simply untidy. A rebuild usually pays off when workarounds keep multiplying and nobody can change the system safely.

  • The vendor or platform no longer receives security updates.
  • Nobody on the team can explain how a key process works.
  • The data model is wrong at its root, so every new feature needs a workaround.
  • The business process has changed so much that the old screens no longer match how people work.
  • The effort spent on workarounds now exceeds the cost of a planned replacement.

How Hundred Seas helps

Hundred Seas is a product studio in Taipei. We build web apps, internal tools and mobile apps, and we work in English, Traditional Chinese and Simplified Chinese. Whether you refactor or rebuild, the decision should rest on a written plan that names the business rules, the data and the risks, and that is what our scope step produces.

Our work starts with a scope step, about one week at a fixed price, that ends in a written plan, a clickable prototype and a firm quote. The build follows in weekly releases of working software, and a monthly run plan keeps the new system running and up to date.

Questions

Is a rewrite always faster than fixing old code?
No. A rewrite often looks faster on paper because the design is clean, but it must also match every rule the old system handles, including the ones nobody documented. Refactoring can deliver visible improvements sooner when the core logic is sound. Compare both options against a written list of the business rules before you decide.
What does the strangler approach mean in plain terms?
It means replacing an old system one feature at a time. A routing layer sends each request to the old or new code, and you move a feature across only after it works with real data. The old system gets smaller each month until it can be switched off safely.
Can we keep the old system running during a rebuild?
Usually yes, and that is the main advantage of a gradual approach. Keep the old system in service for live work while the new one takes over piece by piece. Plan the data sync and the reconciliation checks before the first switch, not after.
Should we move our data before or after the new system is ready?
Start with a trial migration early, so you find data problems while they are still cheap to fix. Then run the final migration close to the switch-over, with a fresh copy of the data and a reconciliation report that your finance or operations lead signs off.
How do we know whether legacy software is worth keeping?
Look at the cost of the workarounds, not only the cost of the code. If the system is stable, secure and supported, and the team can change it safely, keeping it is often the sensible choice. If it blocks new work every month, the case for change is stronger.

Have a project in mind?

Tell us what you want to build. We reply with a plan, not a sales call.

AboutRebuilding vs refactoring legacy software: which should you choose?