Do Not Rewrite the Legacy System. Contain It.

3 23 67
calendar_todayschedule1 min read
— Originally published at valentineshi.dev

Understand the existing design, then isolate the change, design it cleanly, and implement it with TDD, ATDD and integration testing.


Legacy systems usually do not need to be rewritten entirely. More often, a few parts create most of the pain, while the rest still works well enough.

I start with a coarse view of the whole system (C4 models). The goal is not to document everything in detail, but to understand the main components, dependencies, integrations, ownership boundaries and finally to document the problems with the as-is implementation.

Then, together with stakeholders, I identify which parts are most critical to change and assign priorities. Only after that do I start working on a concrete part.

For the selected part, I explore the current implementation, analyse its behavior and document the design that actually exists, then create a coarse to-be C4 models and a more detailed UML models. Then I define a boundary around the part and introduce adapters that isolate the new design from the remaining legacy code, design the replacement cleanly and implement it with TDD.

The same process can then be repeated for the next priority.

The result is not an instant clean architecture. It is a system where more and more parts become understandable, documented and safe to change, one boundary at a time.

This is the kind of legacy modernization work I specialize in: recovering design, containing change, and improving the system one boundary at a time.

2 Comments

1 vote
0
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Local-First: The Browser as the Vault

Pocket Portfolio - Apr 20

The Trust Gap: Why Your Product Fails Even When the Math is Right

Karol Modelski - Jul 16

Split-Brain: Analyst-Grade Reasoning Without Raw Transactions on the Server

Pocket Portfolio - Apr 8

Cisco's Amy Chang: A Model's "Passport" Doesn't Tell You Where It Actually Came From

Tom Smithverified - Aug 27

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12
chevron_left
2.4k Points93 Badges
Eastern Europevalentineshi.dev
24Posts
44Comments
21Connections
Senior Backend / Full-Stack / Founding Engineer specializing in complex business systems. Node.js, T... Show more

Related Jobs

View all jobs →

Commenters (This Week)

3 comments
3 comments

Contribute meaningful comments to climb the leaderboard and earn badges!