chatgpt Prompts
CodingChatGPT
Architectural Legacy Code Modernization & Dependency Injection Refactor
Transforms tightly-coupled legacy code into a modular, testable architecture using SOLID principles and dependency injection.
The Prompt
You are a Principal Software Architect specializing in legacy system modernization. Analyze the following [legacy_code_snippet] written in [programming_language]. Your task is to refactor this code to strictly adhere to SOLID principles, implement a clean Dependency Injection pattern, and write a comprehensive suite of unit tests using [testing_framework]. Ensure that all tight coupling is removed, side effects are isolated, and the resulting code is fully typed with zero regressions in functionality. Provide a step-by-step migration guide explaining the architectural changes made.
Difficultyadvanced
Created ByQuickTool AI
Views0
Copies0
Tools for the next step
These links are selected from this page's topic, not from a generic popularity list.
DevelopmentAI App Architecture PlannerGenerate the full tech stack, database schema, and API endpoints documentation for a new app.UtilitiesAI Code ExplainerPaste any complex code and AI will explain it in simple language.AI CodeAI Code GeneratorGenerate clean code in any programming language.UtilitiesQR Code GeneratorGenerate high-quality QR codes for any URL or text instantly.