- SOA clients KZ©„K used common pattern n‡jv Façade pattern.
- Façade pattern use K‡i complex subsystem ev group of subsystems Gi interface ‡K simplify K‡i Ges client ‡K use Gi Rb¨ uncomplicated API cÖ`vb K‡i|
- D³ API client KZ©„K used Ab¨vb¨ API mg~‡ni mv‡_ consistently use Kiv hvq|
Intent
- Facade pattern complex API Gi Rb¨ simple interface provide K‡i|
- Façade pattern wewfbœ scenario mg~‡n use nq-
- Interface Gi g‡a¨ third-party library wrapping Gi gva¨‡g easily use Kiv hvq| (Bnv rest of the application Gi Rb¨I consistent).
- Ab¨vb¨ systems I libraries Gi dependencies mg~n abstracting Gi gva¨‡g code ‡K loosely couple Kiv hvq|
- Simpler interface Gi mv‡_ complicated subsystem ‡K wrap Ki‡Z cv‡i|
- Facade pattern service layer Gi g‡a¨ use nq| d‡j WCF A_ev web services Gi gva¨‡g remote application mg~‡ni mv‡_ communication complexity hide Kiv hvq|
UML
- wb‡¤œ Facade pattern Gi UML representation ‡`qv n‡jv-
- Dc‡iv³ Figure G Facade pattern Gi collaborating roles show K‡i|
- GKwU task G perform Kivi Rb¨ client Façade Gi simple API use K‡i|
- Transaction achieve Kivi Rb¨ really wK `iKvi †m m¤ú‡K© client unaware _v‡K|
- Façade API system complexity mg~n hide K‡i
- Then Façade subsystem mg~‡n delegate nq Ges response mg~n gather K‡i|
- SubSystemA I SubSystemB client Gi Rb¨ work perform K‡i|
Real life Definition
·
The Facade defines a unified, higher
level interface to a subsystem, that makes it easier to use.
·
Façade pattern
subsystem G higher level
interface provide K‡i hvnv subsystem easily use Ki‡Z
cv‡i|
·
g‡bKwi GKwU
GKwU shopping mall ‡hLv‡b customer D³ mall
Gi customer service representative Gi Kv‡Q Zvi cª‡qvRbxq c‡b¨i order Ki‡e|
·
Customer service representative D³ order information
o
Order fulfillment department
o
Billing department
o
Shipping department G provide Ki‡e|
·
Dc‡iv³
cÖwZwU department Order Abyhvqx customer
‡K
cb¨ provide Ki‡Z ¯^xq `vwqZ¡ m¤úbœ Ki‡e A_©vr
o
Order fulfillment Store
cÖ‡qvRbxq cb¨ mieivn Ki‡e Ges packet Ki‡e
o
Billing department Ordered c‡b¨i Bill Ki‡e
Ges Bill Abyhvqx cb¨g~j¨ customer
Gi KvQ †_‡K receive Ki‡e|
o
Shipping department Ordered c‡b¨I shipment
Gi e¨e¯’v Ki‡e|
·
G‡ÿ‡Î customer
service representative n‡jv Façade
·
‡m order
interface ‡K wewfbœ department G provide
Ki‡e|
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন