advanced
Legacy Code Refactoring Strategy
Analyze a hypothetical monolithic code snippet and propose a comprehensive refactoring strategy using SOLID principles.
📝 Prompt Inhoud
I will provide a description of a tightly-coupled, monolithic function handling user authentication, data validation, and email notifications. Analyze the text description of this code and produce a step-by-step refactoring plan. You must identify violations of SOLID principles, propose specific design patterns to implement (such as Factory, Strategy, or Observer patterns), and explain how to separate concerns into distinct modules. Do not write actual code; describe the architectural changes and reasoning.