VIP 👤
🏠 Strona Główna
Benchmarki
📊 Wszystkie benchmarki 🦖 Dinozaur v1 🦖 Dinozaur v2 ✅ Aplikacje To-Do List 🎨 Kreatywne wolne strony 🎯 FSACB - Ostateczny pokaz 🌍 Benchmark tłumaczeń
Modele
🏆 Top 10 modeli 🆓 Darmowe modele 📋 Wszystkie modele ⚙️ Kilo Code
Zasoby
💬 Biblioteka promptów 📖 Słownik AI 🔗 Przydatne linki 🔌 API i routery AI
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.