Shopify

Refactoring Legacy Code with the Strangler Fig Pattern - Shopify

Mar 11, 2020
Refactoring Legacy Code with the Strangler Fig Pattern - Shopify
SummaryAI, from the source post

This post details the application of the Strangler Fig Pattern to refactor the monolithic Shop model in Shopify's Rails codebase. It outlines a 7-step process: defining an interface for extracted components (using Shopify Capital's locked_settings as an example), changing calls from the old system to the new, creating new data sources (tables) for new data, implementing writers in the new model to write to both new and existing data sources, and finally, removing the old system. The post emphasizes incremental changes, reversibility, and zero downtime.

More from the Code Modularity and Boundary Enforcement trail