Sie sind auf Seite 1von 3

ContactUs(http://idiotechie.

com/contactus/)

TermsofUse(http://idiotechie.com/termsofuse/)

WriteforUs

AboutUs(http://idiotechie.com/samplepage/)

Facebook (https://www.facebook.com/Idiotechie.mg/) Twitter(https://twitter.com/Idiotechie_) Google+(https://plus.google.com/b/116345003015032275040/116345003015032275040/about?


gmbpt=true&hl=en) RSS(http://feeds.feedburner.com/Idiotechie)

(http://idiotechie.com)

Architecture(http://idiotechie.com/category/java/architecture/)
Random(http://idiotechie.com/category/random/)

Java

Trends(http://idiotechie.com/category/trends/)

PHP(http://idiotechie.com/category/php/)

Database

Mobile

Tools(http://idiotechie.com/category/tools/)

SocialMedia

Unix

Videos(http://idiotechie.com/category/videos/)
Pressentertosearch
Youarehere:Home(http://idiotechie.com)FaadeDesignPatternDesignstandpoint

Wednesday,20April201

FaadeDesignPatternDesignstandpoint
PostedonNovember22,2012byIdioTechie(http://idiotechie.com/author/admin/) | 1Comment(http://idiotechie.com/facadedesignpatterndesign
standpoint/#comments)

InourpreviousarticlewehavedescribedabouttheAdapterDesignPattern(http://idiotechie.com/?p=966).Intodaysarticlewearegoingto
showaboutanothersuchGangofFourStructuralpatterns(http://idiotechie.com/?p=877).Asthenamesuggestsstructuralpatternisusedto
formalargerobjectstructurefrommanydifferentobjects.Faadepatternisonesuchpatternwhichprovidesasimplifiedinterfacetoasetof
interfaceswithinasystemandthusithidesthecomplexitiesofthesubsystemfromtheclient.

Technews

WhentouseFaadePattern?
Microsoft'deeplysorry'afterAIbecomes'Hitlerlovingsex

Layering:FacadepatterncanbeusedinJEEapplicationsforcreatingalayertoabstractandunifytherelatedinterfacesintheapplication.

robot'|via@telegraphtech

Useofafacadewilldefineanentrypointtoeachsubsystemlevelandthusmakethemcommunicateonlythroughtheirfacadesthiscan

(http://twitter.com/telegraphtech)

simplifythedependenciesbetweenthem.

https://t.co/uxhX3m6Sz4

FaademakestheAPIandlibrarieseasiertousewhichisgoodformaintenanceandreadability.Itcanalsocollateandabstractvarious
poorlydesignedAPIswithasinglesimplifiedAPI.
Italsoreducesdependenciesoftheexternalcodeontheinnerworkingofthelibrariesandthusprovidingflexibility.

(https://t.co/uxhX3m6Sz4)10:50:00PMMarch
26,2016

(http://twitter.com/Idiotechie_/statuses/713860583
fromTwitterforAndroid

(http://twitter.com/download/android)
Isoldtechputtingbanksunderthreatofextinction?

https://t.co/5iMpsp1lJu(https://t.co/5iMpsp1lJu)
09:28:22PMMarch26,2016

(http://twitter.com/Idiotechie_/statuses/713840038
fromTwitterforAndroid

(http://twitter.com/download/android)
https://t.co/TGuklh1bC7

(https://t.co/TGuklh1bC7)01:31:24PMMarch20,
2016
(http://i2.wp.com/idiotechie.com/wp
content/uploads/2012/11/Facade_Design_Pattern
wm.jpg)

(http://twitter.com/Idiotechie_/statuses/711545679
fromMobileWeb(http://mobile.twitter.com)
SmartsavingsappClincisanewfintechstartupfromex

FacadeDesignPatternstructure

CEOandfounderofNumbrs

https://t.co/epsM5smvFU
IntheabovestructureforFaadepatterntheFaadeclassinsulatesthesubsystemfromtheclient.TheclientonlyinteractswiththeFaade

(https://t.co/epsM5smvFU)via@techcrunch

classwithoutknowingaboutthesubsystemclasses.

(http://twitter.com/techcrunch)10:30:58PM
March15,2016

(http://twitter.com/Idiotechie_/statuses/709869524

Example:

fromMobileWeb(http://mobile.twitter.com)

LetstakeanexampleofOrderprocessingonlinewebsite.Theclienthasplacedanorderwithouthavingknowledgeofhowinternalclasses
arefunctioning.OncetheorderisplacedthefaadeclasslayercallsthemethodsofthesubsystemslikeInventoryforinventorycheckand

Transforminghowretailbankingworks

Paymentforprocessingofthepayment.Afterprocessingitreturnsthecontroltotheclientclasswiththeconfirmationabouttheorderbeing

https://t.co/HFBPnF8QYF

processed.

(https://t.co/HFBPnF8QYF)via@techcrunch
(http://twitter.com/techcrunch)10:19:00AM

SequenceDiagram:

March10,2016

(http://twitter.com/Idiotechie_/statuses/707873383
fromMobileWeb(http://mobile.twitter.com)

Follow@idiotechie_

75followers

SubscribetoIdiotechieviaEmail
EnteryourEmailAddress

Subscribe

(http://i2.wp.com/idiotechie.com/wp
content/uploads/2012/11/Facade_Sequence_Diagram
wm.jpg)

POPULAR

FacadeDesignSequenceDiagram

LATEST

COMMENTS

Howtousecmdpromptinside

CodeExample:

Eclipse?
Inventory.java
Code:
1
2
3
4
5

March25,2012
?

publicclassInventory{
publicStringcheckInventory(StringOrderId){
return"Inventorychecked";
}
}

1
2
3
4
5
6

data?
May6,2012

(http://idiotechie.com/googleapihowtoaccess
?

publicclassPayment{
publicStringdeductPayment(StringorderID){
return"Paymentdeductedsuccessfully";

}
}

Pattern
May19,2012

(http://idiotechie.com/solvedesignproblemsusing
factorypattern/)
?

Code:

UML2ClassDiagraminJava

publicclassOrderFacade{
privatePaymentpymt=newPayment();
privateInventoryinventry=newInventory();

publicvoidplaceOrder(StringorderId){
Stringstep1=inventry.checkInventory(orderId);
Stringstep2=pymt.deductPayment(orderId);
System.out
.println("Followingstepscompleted:"+step1
+"&"+step2);
}
}

December28,2012

(http://idiotechie.com/uml2class
diagraminjava/)

JMSArchitecture
March15,2012

(http://idiotechie.com/jms
architecture/)

Client.java
Code:
1
2
3
4
5
6
7

analyticsdata/)

SolvedesignproblemsusingFactory

OrderFacade.java

1
2
3
4
5
6
7
8
9
10
11
12

insideeclipse/)

GoogleAPI:HowtoaccessAnalytics

Payment.java
Code:

(http://idiotechie.com/howtousecmdprompt

publicclassClient{
publicstaticvoidmain(Stringargs[]){
OrderFacadeorderFacade=newOrderFacade();
orderFacade.placeOrder("OR123456");
System.out.println("Orderprocessingcompleted");
}
}

Benefits:
Wecanusethefaadepatterntocollateallthecomplexmethodcallsandrelatedcodeblocksandchannelizesitthroughonesingle
Faadeclass.Inthiswaywithrespecttoclientthereisonlyonesinglecall.Evenifwemakechangestothesubsystempackages/
classandtheirlogicthereisnoimpacttotheclientcall.Inshortthisincreasesloosecoupling.
Itmakeseasiertouseandmaintaincreatingamorestructuredenvironmentandreducesdependenciesbetweenlibrariesorother
packages.
Drawbacks/Consequences:
OneofthedrawbackisthatthesubsystemmethodsareconnectedtotheFaadelayer.Ifthestructureofthesubsystemchanges
thenitwillrequiresubsequentchangetotheFaadelayerandclientmethods.
Interestingpoints:
Faadepatternmightbeconfusedwithmediatorpattern.Mediatoralsoabstractsthefunctionalityofthesubsysteminsimilarmannerto
faade.Howeverthereisasubtledifferencebetweenboththesepatterns.IncaseofMediatorpatternthesubsystemisawareofthe
mediator,howeverincaseofFaadethesubsystemdoesnotknowanythingaboutthefaade.ItsaonewaycommunicationfromFaadeto
subsystem.
FaadeusedinJavaAPI
javax.servlet.http.HttpSession
javax.servlet.http.HttpServletRequest

javax.servlet.http.HttpServletResponse
javax.faces.context.ExternalContext

API Application
API Management Strategies That Work Free White Paper Shows You How.
Filedin:Architecture(http://idiotechie.com/category/java/architecture/),DesignPattern(http://idiotechie.com/category/java/designpattern/),
Java(http://idiotechie.com/category/java/),Random(http://idiotechie.com/category/random/)
Tags:classdiagram(http://idiotechie.com/tag/classdiagram/),designpattern(http://idiotechie.com/tag/designpattern/),Facade
(http://idiotechie.com/tag/facade/),Facadedesignpattern(http://idiotechie.com/tag/facadedesignpattern/),facadeusedinJavaAPI.
(http://idiotechie.com/tag/facadeusedinjavaapi/),featured(http://idiotechie.com/tag/featured/),Java(http://idiotechie.com/tag/java/),Java
API(http://idiotechie.com/tag/javaapi/),layering(http://idiotechie.com/tag/layering/),mainakgoswami(http://idiotechie.com/tag/mainak
goswami/),Orderprocessingwesbite(http://idiotechie.com/tag/orderprocessingwesbite/),sequencediagram
(http://idiotechie.com/tag/sequencediagram/),structuraldesignpattern(http://idiotechie.com/tag/structuraldesignpattern/)
ShareThisPost

(https://twitter.com/intent/tweet?text=FaadeDesign
PatternDesign
standpoint&url=http%3A%2F%2Fidiotechie.com%2Ffacade
designpatterndesignstandpoint%2F)

(https://www.facebook.com/sharer/sharer.php?
u=http%3A%2F%2Fidiotechie.com%2Ffacade
designpatterndesignstandpoint%2F)
(https://plus.google.com/share?
url=http%3A%2F%2Fidiotechie.com%2Ffacade
ARCHIVES

DONOTCOPY

April2016

FOLLOWUS

SelectMonth
(http://facebook.com/Idiotechie.mg)
META

Login(http://idiotechie.com/wplogin.php)
EntriesRSS(ReallySimpleSyndication)

(http://www.copyscape.com/duplicate

(http://twitter.com/idiotechie_)

content/)

(http://linkedin.com/pub/mainak

SPAMBLOCKED

goswami/9/313/a19)
(http://idiotechie.com/?page_id=31)

(http://idiotechie.com/feed/)

54,023spam
CommentsRSS(ReallySimple

blockedbyAkismet(http://akismet.com)

PARTNERSITES

Syndication)
(http://idiotechie.com/comments/feed/)
WordPress.org(https://wordpress.org/)

(http://www.javacodegeeks.com)

(http://www.dzone.com/users/idiotechie)
Copyright2016IdioTechie(http://idiotechie.com)DesignedbyThemeJunkie(http://www.themejunkie.com/)

WordPressTheme(http://www.themejunkie.com)byThemeJunkie(http://www.themejunkie.com)Backtotop

F
1

11

12

13

14

15

18

19

20

21

22

25

26

27

28

29

May
(http://idiotechie.com/2014/05/)

Das könnte Ihnen auch gefallen