Good insights from this article:
How to strangle a legacy codebase
The strategy is simple:
Progressively delete the old code base, in favor of a new one.
Here’s the plan:
- Have the new code acts as a proxy for the old code. Users use the new system, but it just redirects to the old one.
- Re-implement each behavior to the new codebase, with no change from the end-user perspective.
- Progressively fade away the old code by making users consume the new behavior. Delete the old, unused code.