🏠 Accueil
Benchmarks
📊 Tous les Benchmarks 🦖 Dinosaure v1 🦖 Dinosaure v2 ✅ To-Do List Apps 🎨 Pages Libres 🎯 FSACB - Showcase 🌍 Traduction
Modèles
🏆 Top 10 Modèles 🆓 Modèles Gratuits 📋 Tous les Modèles ⚙️ Modes Kilo Code
Ressources
💬 Prompts IA 📖 Glossaire IA 🔗 Liens Utiles
advanced

Legacy Code Refactoring Strategy

#refactoring #design-patterns #legacy-code #software-maintenance

Analyze a hypothetical legacy codebase scenario and propose a refactoring strategy using design patterns.

Act as a Lead Software Engineer. You are presented with a hypothetical legacy Java class named 'OrderManager' that is 2000 lines long, contains static mutable state, mixes database access with business logic, and has no unit tests. Propose a step-by-step refactoring strategy to break this class down. Identify which Design Patterns (e.g., Factory, Repository, Strategy, Decorator) are appropriate to apply. Explain how you would introduce test coverage without breaking existing functionality, using the 'Strangler Fig' pattern concept where applicable.