For most companies, the safer path is to evolve legacy software step by step: lock in current behavior with tests, set up a delivery pipeline and replace modules one at a time behind the same URLs. A rewrite makes sense only when the system is small, its business rules are well documented or its technology cannot be kept alive. Between those two ends sit several other options.
Legacy software is usually not bad software. It has carried the business for years and has simply become hard to change. So when we meet an existing system on a web application development project, our first question is: which part of it is actually causing the trouble?
How do you know a system needs modernizing?
The need rarely shows up as a single event. More often, these signs pile up:
- Unsupported technology: the framework, database or operating system the app depends on has dropped off the vendor's support list.
- Security patches have stopped: unsupported components no longer receive security updates, and known vulnerabilities stay open.
- Releases are slow: even a small change needs long test rounds and a manual deployment, and the team dreads release day.
- One person understands it: only one person knows the system end to end, and changes stop when they are away.
- Integrations are hard: there is no modern API for connecting a new payment provider, mobile app or reporting tool, so data moves through file exports or by hand.
- Hosting costs keep rising: the app only runs on a particular server type, a licensed environment or an inflexible hosting plan.
The security sign is more urgent than the others, because the cost of waiting falls not only on the company but also on the customers whose data you hold. We gathered the basic checks in our cybersecurity checklist for growing companies.
What are the options for modernizing legacy software?
There is a lot of ground between "rewrite it" and "leave it alone." Each option answers a different problem:
- Keep and stabilize: update dependencies, add monitoring and backups, and document the system. This fits when the system does its job, rarely changes and is simply fragile.
- Rehost or replatform: the code stays largely the same while the environment it runs in changes, for example by moving the app into Docker containers. This fits when the real problem is hosting, scaling or the release process.
- Refactor in place: improve the structure of the code piece by piece while keeping its outward behavior the same. This fits when the technology is still supported but the code has become hard to change.
- Replace with off-the-shelf software: if the system handles a standard job such as accounting or HR, moving to a mature package can make more sense than keeping a custom one alive. We cover how to make that call in custom software or off-the-shelf.
- Full rewrite: worth considering when the system is small, its rules are well understood or its technology cannot be carried forward in any form.
- Gradual replacement (the strangler fig pattern): a new system grows alongside the old one, functions move across one by one and the old system is retired over time. The name comes from the strangler fig, a plant that grows around a host tree and eventually takes its place. For large, business-critical systems, this is often the lowest-risk path.
These options are not mutually exclusive. Changing the hosting first and then replacing modules gradually is a common route.
Why is a big-bang rewrite so risky?
A rewrite is tempting: clean code, new technology, a break from old mistakes. But the risks of switching everything at once rarely show up in the plan:
- Hidden business rules: an old system carries rules added over the years and never written down: a special discount calculation, an exception for one customer, the way a report is expected to round numbers. These often surface only after the new system goes live, when a user says "the old one didn't do that."
- Data migration: old databases hold inconsistent records, fields whose meaning has drifted and data that was fixed by hand. Moving all of it in one go, without errors or downtime, is a project in its own right.
- Feature freeze: while the new system is being built, the old one gets no new features, or every feature is built twice. The business does not wait, and the longer the freeze lasts, the further the new system falls behind the target it is chasing.
- Late value: users only benefit on cutover day. If the project stalls halfway, nothing usable is left behind.
None of this means a rewrite is never the right call. But the larger the scope, the more it pays to break the risk into small pieces.
How do you plan a step-by-step modernization?
This is the order we follow in a gradual modernization:
- Inventory and documentation: list the modules, database tables, scheduled jobs and integrations, and who uses each of them. Features nobody uses are features you do not need to move.
- Tests around current behavior: before changing anything, write tests that record what the system does today. They are the most reliable way to show that a new piece gives the same result as the old one.
- CI/CD first: set up automated build, test and deployment at the very start. Shipping small changes often is a precondition for gradual change. We cover the principles in DevOps without the drama.
- A data migration plan: write down which data moves when and in which direction, how the two systems share data during the transition and how inconsistent records will be cleaned up.
- Module-by-module replacement: put a routing layer in front of the old and new systems. Users and other systems keep using the same URLs and APIs while the modules behind them move to the new system one at a time. Starting with a lower-risk module used by internal staff, such as an admin panel, lets the team build confidence in the new setup.
- Parallel run: for critical operations, run both systems side by side for a while and compare the results. The differences bring overlooked business rules to light.
- A rollback plan: at every step, keep a simple, tested way to route traffic back to the old system if something goes wrong.
This order leaves a working system at the end of every step. Even if the project has to pause at some point, the work done so far stays in use.
What does replatforming look like in practice?
We moved our own .NET applications from a Windows shared host to Docker containers on a Linux server and connected their releases to a Jenkins pipeline. That is replatforming in the sense described above: what mainly changed was where the apps run and how they are released.
When a .NET app moves from Windows to Linux containers, a few topics usually come up:
- File system differences: Linux treats upper and lower case in file names as different, and file paths are written differently.
- Configuration: server-specific settings and secrets move out of the code and into environment variables or a secrets manager.
- Persistent data: uploaded files and logs live outside the container, in storage that survives when the container is rebuilt.
- Releases: every app is built, tested and deployed through the same pipeline. When the code itself needs restructuring later, that work happens on top of a repeatable release process.
How do you decide which path to take?
Work through these questions with your team:
- Is the real problem the code, the hosting, the release process, or the fact that the system no longer does enough?
- Does what the system does set you apart from competitors, or is it a standard job?
- Does your technology still receive security updates?
- Are the business rules written down, or do they live only in the code and in a few people's heads?
- Can the business live with a long feature freeze?
- Is there a way to move the data without downtime?
- If a step goes wrong, how quickly can you get back to where you were?
If the only problem is hosting, replatforming is usually the right start; if the job is standard, an off-the-shelf package; if the code has become impossible to change, gradual replacement. Consider a full rewrite when the system is small and its rules are well understood.
Do not try to replace an old system overnight; retire it in small pieces that keep everything working at every step.
Frequently asked questions
Can we keep building new features during modernization?
With a gradual approach, yes. New features are built on the new side wherever possible, so less code is added to the old system and the business does not have to wait. A full rewrite usually means freezing features or building them twice.
What if documentation or source code for the old system is missing?
Start by recording the system's observable behavior: screens, reports, the database structure and the data its integrations send. Those records, along with interviews with the people who use the system every day, go a long way toward filling the gap.
Does moving to containers count as modernization?
It counts as a step. It improves hosting, scaling and the release process, but it does not change the structure of the code or the business rules by itself. It often lays solid ground for the steps that follow.
Do we need a parallel run for every module?
No. It is most valuable for operations where mistakes are expensive, such as payments, stock or invoicing. For less critical modules, good tests and a quick way to roll back are usually enough.
When is a modernization finished?
When the last module of the old system is retired and its data is safely archived. The real goal, though, is not a finish line but a system that is easy to change again.
Where to start?
Start with a short inventory of your system: its modules, users, integrations, the support status of each technology it uses and the three areas that cause the most trouble today. That single page makes it clear which option fits and which module to start with.
If you would like to assess your legacy system together and map out a safe path forward, get in touch.