Facade प्याटर्न एक सरलीकृत इन्टरफेस जटिल subsystem लाई प्रदान गर्छ — यसको जटिलता एकल, स्वच्छ प्रवेश बिन्दुको पछाडि लुकाएर। यो जटिल घटकहरूको समूह प्रयोग गर्न सजिलो बनाउँछ, अन्तर्निहित विवरणहरूमा पहुँच हटाएर।
Facade प्याटर्नले के गर्छ
FACADE → a SIMPLE interface in front of a COMPLEX subsystem:
→ the subsystem has many components/steps; the facade provides ONE easy interface
→ clients use the simple facade instead of dealing with the complexity directly
→ the facade coordinates the underlying components
→ HIDE complexity behind a clean, easy-to-use interface
उदाहरण
{
() {
codec = ().(file);
decoded = ().(file, codec);
result = ().(decoded, format);
result;
}
}
().(, );
