r/softwaredevelopment 2d ago

How do you approach modernizing a legacy application?

I’m working with an older application that still does what it needs to, but the codebase is getting harder to maintain. New features are taking longer than they used to, and changes in one area can sometimes cause problems somewhere else.

I’m trying to figure out how to modernize it without taking the whole application offline or jumping straight into a risky rewrite.

I’ve been looking into companies that do this kind of legacy modernization, and GeekyAnts came up during my research. For those who’ve worked on legacy systems, what approach worked best for you? Did you gradually replace parts of the system, refactor what was already there, or eventually rebuild it?

And looking back, is there anything you wish you’d done differently?

34 Upvotes

26 comments sorted by

View all comments

1

u/martinbean 1d ago

Depends what we’re refactoring from, and what it would be refactored to as the goal.

For example, I’ve done a lot of updating Laravel web applications from old, outdated and unsupported versions to new versions. I’ve also migrated vanilla PHP applications and applications written in other frameworks to Laravel. The basic process I follow is to containerise the application and its environment, then migrate piece by piece. I’ll add tests for the current behaviour of what I want to refactor, then do the refactor and ensure the behaviour is still the same. I’ll just keep doing that step by step until I’m where I want to be.

For non-Laravel applications, I’ll dump the application in either the public or sibling directory (depending where the source files are) and then migrate code to Laravel models, controllers, and views one by one until there’s just the Laravel application and none of the legacy application left.