Skip to content
Bynarize Technologies home

Business Technology

Modernising a legacy application without a rewrite

Why big-bang rewrites fail and how the strangler approach replaces a legacy application one slice at a time.

By Bynarize Engineering Team. Published . 7 minute read.

Routing facadeLegacy applicationNew servicesUIAPIDataCI/CD

When a business-critical application becomes hard to change, the instinct is to start again: a clean design, a modern stack and none of the accumulated workarounds. Many organisations have tried this, and many rewrites have run far over time and budget or been abandoned.

There is a safer approach. Instead of replacing the whole application at once, replace it piece by piece while it stays in use.

Why big-bang rewrites struggle

  • Hidden requirements: years of business rules live in the old code, often undocumented. The rewrite must rediscover all of them before it can go live.
  • A moving target: the business keeps changing while the rewrite is built, so the new system chases the old one.
  • No value until the end: users see nothing for months or years, and support for the project erodes.
  • One risky cut-over: everything changes on one day, with little room to recover if something is wrong.

The strangler approach

The strangler fig pattern, named by Martin Fowler, replaces a system gradually. New functionality is built alongside the old system and traffic is routed to it one feature at a time. Over time, the new system handles more and the old one less, until the old one can be switched off.

In practice:

  1. Put a routing layer in front of the application. For a web application, this may be a reverse proxy or a shell application that decides which screens come from the old system and which from the new.
  2. Pick a slice: a module, a set of screens or an API that is valuable and reasonably self-contained.
  3. Build the slice on the modern stack, reading and writing the same data or synchronising with the old system.
  4. Switch traffic to the new slice, ideally behind a feature flag so you can switch back.
  5. Repeat, and delete old code once nothing uses it.

Stabilise before you modernise

Before replacing anything, make the current system safer to work on:

  • Reliable builds and deployments: if releasing the old system requires manual steps, automate them first.
  • Monitoring: errors, slow requests and job failures should be visible.
  • Characterisation tests: automated tests that record what the system currently does for important scenarios, right or wrong. They tell you when a change alters behaviour.

This work pays off immediately, even before modernisation begins.

Choosing the order of slices

Good early candidates are:

  • areas with frequent change requests, where modern code speeds up delivery,
  • areas with known security or stability problems,
  • new features that can be built in the new stack from the start,
  • parts that block an important goal, such as moving to the cloud.

Avoid starting with the most tangled core of the system. Build confidence and shared patterns on simpler slices first.

Handling the data

Data is usually the hardest part. Options include:

  • Shared database: new and old code use the same database during transition. Simple, but the old schema constrains the new design.
  • Synchronisation: the new module has its own data store, kept in sync with the old one through events or scheduled jobs. More work, but it lets the new design be clean.
  • Anti-corruption layer: an adapter that translates between the old model and the new one, so legacy concepts do not leak into new code.

Plan the eventual database migration as its own stage, with reconciliation reports to prove data matches.

Common modernisation paths

  • .NET Framework to modern .NET: business logic moved into ASP.NET Core APIs, Web Forms screens replaced by a modern frontend, hosting moved to Linux containers or Azure App Service.
  • AngularJS to Angular: a modern Angular shell hosting new screens alongside old ones until the last AngularJS view is retired.
  • Monolith to modules: clear module boundaries inside one deployable application before considering separate services.
  • On-premise to cloud: rehosting first to retire servers, then adopting managed databases and services where they reduce effort.

Keep delivering business value

Modernisation competes with feature requests for the same team. Plans that stop all feature work rarely survive. Reserve capacity for both, and build new features in the modern parts of the system wherever possible so modernisation and business value advance together.

Bynarize modernises applications incrementally, from assessment and stabilisation to cloud migration. Read about our software modernisation service or the legacy software modernisation solution.

  • Modernisation
  • Legacy
  • Strangler pattern
  • Technical debt

Have a business challenge or software idea?

Let's discuss your requirements and explore the right technology solution for your business.

Email
hello@bynarize.com
Phone and WhatsApp
+91 82629 95977
Response
Within one business day