डिजाइन ढाँचाहरू अक्सर रिफ्याक्टरिङको माध्यमबाट उदीयमान हुन्छन् अग्रिमबाट डिजाइन गरिएको भन्दा — कोड बढ्दा र यसको आवश्यकताहरू स्पष्ट हुन्दा, ढाँचा तर्फ रिफ्याक्टरिङ गर्दा डिजाइन सुधरिन्छ। यो ढाँचाहरू वास्तवमा आवश्यक भएकोले लागू गर्ने सिद्धान्तलाई प्रतिबिम्बित गर्छ, अनुमानात्मकको सट्टा।
रिफ्याक्टरिङको माध्यमबाट ढाँचाहरू उदीयमान हुन्छन्
Rather than designing patterns in UPFRONT (often premature/speculative), patterns often
emerge as you REFACTOR existing code:
→ start SIMPLE → as needs become clear (real complexity, real duplication, real change
points), REFACTOR toward a pattern that addresses them
→ "refactor TO a pattern" when the code would genuinely benefit
→ patterns as a destination of refactoring, not a starting blueprint
