Modernising a legacy system without betting the company on a rewrite
Full rewrites are how good businesses lose two years. The incremental path is slower on paper and faster in practice.
bdSpark Admin
bdSpark
The legacy system is slow, the vendor is gone, the language is unfashionable, and nobody wants to touch it. The instinct is to rewrite. The instinct is usually wrong.
Rewrites fail for a reason that has nothing to do with engineering skill: the old system encodes years of accumulated business rules that exist nowhere else. Every strange conditional is a decision someone made about a real situation. A rewrite from the specification reproduces the specification, not the system — and the difference surfaces in production, one exception at a time.
Replace at the edges instead
The strangler pattern is well-known and under-applied. Put a routing layer in front of the legacy system. Move one capability at a time behind it. The old system keeps running; each new piece takes over a defined slice of traffic. If a slice fails, you route back.
What makes this work in practice is that value arrives continuously. Six months in you have four improved capabilities in production rather than a rewrite that is sixty percent done and unusable.
Start where the pain is, not where the code is worst
Engineers gravitate to the ugliest module. Choose instead by business impact: the capability that blocks something the business wants to do, or the one generating the most support load. Ugly code that works and nobody needs to change is not urgent, however much it offends.
Get the data boundary right early
The hardest part is rarely the application code — it is the shared database that every component reaches into directly. Establishing which system owns which data, and putting an interface in front of it, is the work that makes everything after it possible. Do it first, even though it produces nothing visible.
Instrument before you change anything
You cannot safely replace behaviour you have not measured. Add logging and metrics to the legacy system first, so you know what it actually does — including the endpoint you were sure was dead, which turns out to serve a monthly regulatory report.
Accept that some of it survives
Occasionally a legacy component is stable, well-understood and simply not worth replacing. Wrapping it behind a clean interface and leaving it alone is a legitimate outcome. The goal is a system the business can change at the speed it needs, not a uniform codebase.
A realistic first ninety days
- Weeks 1–2: instrument the legacy system and map which capabilities take which traffic. Nothing is replaced yet.
- Weeks 3–6: stand up the routing layer and the data boundary for the first slice. The slice chosen is the one with the most support load, not the ugliest code.
- Weeks 7–12: the first capability runs behind the routing layer with a route-back path, and the second slice is in progress. Two things are now true that were not before: changes ship weekly, and the business can stop the programme at any point without losing what has already landed.
That reversibility is the whole argument. A rewrite is a bet; strangling is a series of options.
Where bdSpark sits in this
Strangler engagements are the most common shape of our custom software development work for established Bangladeshi businesses — the system that runs the company is never as simple as "replace it", and the discipline above is how we approach it. If the legacy question is open at your company, the ninety-day plan is a useful way to start: small, measured, reversible.
- Legacy Systems
- Architecture
- Security