
3/11/2020
What this post added
This post introduces and details the application of the Strangler Fig Pattern to refactor a large, monolithic 'Shop' model in Shopify's Rails codebase. It outlines a 7-step process: defining an interface for the extracted functionality, changing calls from the old system to the new, creating new data sources if writing is involved, implementing writers in the new model to write to both new and existing data sources, and implicitly, the subsequent steps of strangling the old system and removing legacy code. The post uses the example of extracting 'store settings' and 'locked_settings' related to Shopify Capital to illustrate these steps, emphasizing incremental changes, reversibility, and zero downtime.