Blog

Modernising legacy software: choose a first step you can reverse

Modernising legacy software: choose a first step you can reverse

How to choose a bounded first migration, protect business rules and separate code rollback from data recovery.

An old application can be unpleasant to maintain and still perform an essential job well. Replacing it removes familiar problems, but also removes years of business rules that may exist only in code and in people’s habits. Age alone is a weak reason for a rewrite.

Start with the constraint that hurts the business now. Perhaps a supported runtime is needed, deployments take too long, or one reporting module slows order processing. These problems may require different interventions. Define the outcome before deciding how much software to replace.

Build a map around one workflow

You do not need a perfect diagram of every class to make the first decision. Follow one important workflow from its entry point to its final record. Include scheduled jobs, exports, manual corrections and the spreadsheet someone sends at month-end. These dependencies are easy to miss in a code-only review.

For each step, identify the data owner and the people who can explain exceptions. Capture representative examples with sensitive data removed. Tests that describe current behaviour help distinguish an intentional change from a regression, although current behaviour still needs business review: some of it may be wrong.

Choose the smallest useful boundary

A reporting function or a document-generation module may offer a clearer first boundary than the central customer record. The right choice has a business owner, an interface you can describe and a result you can compare with the old system. A small module tangled into every transaction may be a poor pilot despite its size.

Possible actions include upgrading an unsupported dependency, restructuring code inside the existing application or replacing a bounded capability. Moving to separate services is an option, with additional deployment and operations work. It is not a prerequisite for modernisation.

A bounded migration; Map workflow; Choose boundary; Pilot + recovery; Retire old path
Progress depends on acceptance and recovery criteria, not on a fixed migration timetable.

Put data recovery in the release plan

Rolling back application code does not undo new records or reverse a database migration. Before a pilot, explain how old and new versions will read the data during the transition. Prefer compatible schema changes where feasible, and rehearse recovery using a restored copy rather than relying on the existence of a backup file.

If old and new components run together, define which one may write each record. Uncontrolled writes to both create a second migration problem: deciding which version of the truth to trust. A comparison mode can be useful for read-only calculations; side effects such as invoices need stronger isolation.

Write a release decision, not a promise

  • Success: name the business result, the observation period and the person who accepts it.
  • Stop condition: define which error, mismatch or service degradation halts expansion.
  • Recovery: state who can restore service and what happens to writes made during the pilot.
  • Retirement: remove the old path only after dependent users and jobs have moved.

Measure against the original constraint. A runtime upgrade may be successful without making the interface faster; a reporting change may shorten a job without reducing hosting costs. Keep those conclusions separate. Expand the next migration only when the first boundary is understood and operations can support it.

Sources and documentation