Legacy modernization
Legacy modernization works best in small steps. We assess the existing system, put tests around the behavior that must not change, and replace it part by part while the old and new versions run side by side. Along the way we reduce the number of components your team has to maintain.
Legacy modernization: an overview
Legacy systems are usually the ones that earn the money. They run the orders, the billing or the warehouse, and they were written by people who have since left, on a framework version that no longer receives security updates. The temptation is a full rewrite. Big-bang rewrites tend to run far past their plan while the old system keeps changing, and the business ends up maintaining two systems with neither finished. After 15 years on production systems, our position on large systems is clear: we avoid big-bang rewrites.
Our approach to legacy modernization and application migration is the strangler pattern. A routing layer sits in front of the old application. New or rewritten parts are built beside it, and traffic for one screen, endpoint or job at a time moves to the new code. The old system shrinks until what is left can be switched off, and at every step the business runs on software that works.
Before touching code, we write characterization tests: tests that record what the system does today, including its odd behaviors, rather than what the specification says it should do. Those odd behaviors are often rules someone relies on, such as a rounding quirk on invoices. The tests catch any change in behavior during the migration, and the team decides on purpose whether to keep it or fix it.
What the service covers
System assessment
We map the modules, data, integrations, scheduled jobs and the business processes that depend on each. The result separates what is risky from what is merely old.
Characterization tests
We record what the system does today at its edges: HTTP responses, generated files and database state. These tests protect behavior that nobody documented.
Containerization
The old application moves into Docker, with the same image in development and production. That ends the dependency on a single hand-configured server.
Strangler migration
New code takes over one piece of the system at a time, behind a routing layer that decides which system answers each request. Every slice can be switched back.
Data migration
We decide which system owns each table during the transition and synchronize in one direction only. Data is cleaned and migrated by scripts that run in the test environment first.
Decommissioning
Old code, tables, cron jobs and servers are removed once their replacement has run in production without surprises. The system ends with fewer components than it started with.
When it is the right call
- 01
Your core system runs on a language or framework version that no longer receives security updates.
- 02
Only one or two people understand the old code, and every change waits for them.
- 03
Adding a feature takes longer every year, and the team is asking for a rewrite.
- 04
You need to move from an old server to containers or the cloud without stopping sales or operations.
What you get
Assessment of the existing system and a staged plan
Characterization tests around existing behavior before any rewrite
Gradual migration, module by module, using the strangler pattern
Fewer components to maintain at the end
How we work on it
Step 1
Assess the system
We read the code and interview the people who use and maintain the system. Each part is marked as risky, merely old, or fine to keep.
Step 2
Build the safety net
Characterization tests, logging and monitoring go around the parts we will change first. They show whether behavior shifts once we start.
Step 3
Move to containers
The existing application is packaged in Docker and deployed through the test environment, with its behavior unchanged. From then on it releases like any other service.
Step 4
Strangle in slices
Each slice is built, checked against the characterization tests and released behind the routing layer. The old path stays available, so a problem means switching back, not an emergency.
Step 5
Retire the old parts
When a slice has proven itself, we delete what it replaced instead of keeping it as a permanent fallback. The plan is revised after each slice.
Characterization tests before any rewrite
A characterization test does not ask whether the code is correct. It records an input and the output the current system produces, and fails if a later change alters that output. For a legacy invoicing module, that can mean running a set of realistic orders through the old code, saving the resulting totals and PDFs, and comparing every new version against them.
These tests are written at the edges the business sees: HTTP responses, generated files, database rows after a job runs. That makes them independent of the internal code, which is about to change. They often surface behaviors nobody documented, and each one becomes an explicit decision: keep it, or change it once the people who rely on it know.
Why we use the strangler pattern instead of a big-bang rewrite
A rewrite delivers nothing until the day it replaces the old system, and on that day every difference shows up at once. The strangler pattern delivers in slices, each small enough to test, release through the test environment and roll back. The routing layer, sometimes an Nginx configuration and sometimes a small gateway, decides per path which system answers.
Data is the harder part. Old and new code may need the same records during the transition, so either one database stays the source of truth and the new code reads it through a defined interface, or the changed data is synchronized in one direction with a clear owner. Two systems writing to the same tables independently is the situation we avoid. At the end there are fewer components than at the start, which is the point of the exercise.
Upgrading frameworks and runtimes in place
Not every legacy system needs replacing. An application on an old PHP or Node.js version, an unsupported framework release or an outdated database engine can often be upgraded in place, one major version at a time, with the characterization tests confirming that nothing changed. This costs less than a migration and keeps the team's knowledge of the code.
In-place upgrades stop being the right tool when the framework has no upgrade path, when the code has no structure left worth preserving, or when the language no longer has the people or libraries you need. Those are the cases for strangling the system into a new codebase. The assessment states which parts fall into which group, so the plan can mix upgrades and replacements.
Methods and tools
- Monoliths and microservices
- Domain-driven design
- Architecture decision records
- C4 model
- pnpm workspaces
- Turborepo
- Nx
- PostgreSQL
- Kafka
How you can work with us
Fixed-scope project
The scope of the first version is written down, split into milestones and priced per milestone. It suits a product or a feature with a clear outline.
Dedicated team
A team works on your product over the long run, with its own planning and release cadence. It suits a product that keeps changing.
Team extension
One or more of our engineers join your team and work with your tools and routines. It suits a company that knows where it is going but lacks people or a specific skill.
Monthly support
A monthly retainer covers maintenance, updates and small changes, with an agreed response time. It suits a product in production that needs upkeep more than new features.
Questions about Legacy modernization
How long does a legacy modernization take?
It depends on the size of the system, the number of integrations, the state of the data and how much of the old behavior is documented. Because we move in slices, value arrives during the project and not only at the end. The plan is re-estimated after each slice. The assessment gives you a staged plan you can reason about before committing to the whole.
Should we rewrite our legacy system from scratch?
Rarely. A full rewrite freezes the business on an old system while a new one is built, and it loses the undocumented rules the old one carries. We consider it only for small systems with simple data. Even then, old and new run side by side before the switch.
Can you modernize an old PHP application?
Yes. Old PHP applications are a common case, and Laravel is often the natural target because the team already knows the language. We put characterization tests around the existing code, move it into Docker so development and production match, and migrate module by module behind the same entry point.
Can the business keep running during the modernization?
Yes, that is the reason for working in slices. The old system keeps serving users while each part is replaced, and every release goes through a test environment before production. If a new slice misbehaves, the routing layer sends traffic back to the old code while the problem is fixed.
What if nobody understands the old code anymore?
Then we learn it from the outside first. Characterization tests and logging show what the system does with realistic inputs, which tells us more than outdated documentation. We write what we learn into the repository as we go, so the knowledge stays with you after the project.
What drives the cost of modernizing a legacy system?
The size of the system, the number of integrations, the quality of the data, how much behavior is undocumented, and whether parts can be upgraded in place rather than replaced. Hosting matters too: an application on a single old server needs containerization before anything else. Because the work is sliced, the cost is spread over milestones, and each one is scoped and delivered on its own.
In the same service area
Design, build and ship your project
Describe it in three lines. We reply with specific questions and a first take on how to proceed.