Why I Didn't Replace the Legacy System All at Once
Moving Semware from a bundled-library dependency to an API-based setup. Understanding live features and splitting the work into reversible units came first.
Joohwan Yu · Founder, Full Stack Developer
Toris · Published
Contents
During the period when I was working on a website renewal and an education platform at Semware (셈웨어), I also worked on moving the existing bundled-library dependency to an API-based approach. Before thinking about the new structure, the first thing I had to do was read what the existing structure was actually doing. The fact that code is old wasn’t enough to conclude that the rules inside it were outdated too.
Live features had contracts outside the documentation
The branches left in the code are mixed with behavior that users expect: how empty input is handled, exceptions for old content, a particular call order. If you treat these as simple duplication when rewriting, the screen may get cleaner while the behavior changes.
At the time, I chose the direction of analyzing the existing code, defining the API response structure and types, and then switching over feature by feature. It could take longer than replacing everything at once, but it had the advantage that I could explain the scope of each change. When something went wrong, it was also relatively clear which feature boundary to go back to.
What types explain and what they don’t
Response types helped share what data the screen expects. But even when field names and data types are the same, the meaning can change. Whether an empty array really means no results, a failed lookup, or not ready yet has to be distinguished in the types and the response contract.
If I did it again now, I would put examples of the old and new responses side by side. I would include not only normal data but also empty and missing values. What matters is not whether the field count matches but whether the consumer can make the same decisions.
The biggest regret was automated verification
In my retrospective at the time, I also noted that testing and documentation weren’t sufficient. Switching over gradually isn’t automatically safe. Even a small change only splits the risk into smaller pieces if there’s no standard for checking existing behavior. If I did it again, I would start with the most important existing behaviors and leave them as reproducible inputs and expected results.
Legacy work required not the ability to write a lot of new code but the ability to recognize what shouldn’t be changed. From this experience I gained a standard of looking at operational continuity before the age of the code. A migration plan needed not only the new structure but also a path back.
Related post: Semware project case
Advertisement