संरचनात्मक प्याटर्नहरू वस्तु र वर्गहरू कसरी बनोत गरिन्छ भन्ने कुरासँग सम्बन्धित छन् — संस्थाहरू बीचको सम्बन्धलाई संगठित गर्दै लचिलो, कार्यकारी संरचनाहरू बनाउन। यसमा Adapter, Decorator, Facade, Proxy, Composite, र Bridge समावेश छन्।
संरचनात्मक प्याटर्नहरूले के समाधान गर्छन्
STRUCTURAL patterns concern how objects/classes are COMPOSED/related:
→ organize relationships to build larger structures from objects
→ make components work together flexibly; simplify complex structures
→ about COMPOSITION and structure, not creation or behavior
मुख्य संरचनात्मक प्याटर्नहरू
ADAPTER → make incompatible interfaces work together (wrap to convert one interface to
another) — "a translator"
DECORATOR → add behavior by wrapping objects (covered separately)
FACADE → provide a SIMPLE interface to a complex subsystem (hide complexity behind one
clean interface)
PROXY → a placeholder/surrogate controlling access to another object (lazy loading,
access control, caching, remote)
COMPOSITE → treat individual objects and groups of objects UNIFORMLY (tree structures)
BRIDGE → separate an abstraction from its implementation (vary independently)
