TEAM4:DESIGNPATTERNSBYPiyushVijayvargiyaYoungJinKimBimeshGiriArkadiyGorelikSPRING2003,COMP680西安服装设计培训Adescriptionofasolutiontoarecurringproblemwithinacontext,provenbyexperiencetoleadtoasuperiorresultwhenproperlyapplied.AdesignpatternisadescriptionofcommunicatingobjectsandclassesthatarecustomizedtosolveageneraldesignprobleminaparticularcontextWhyaDesignPatternReusability:ForanefficientandactualSEdiscipline.Helpingnewdesignerstohaveamoreflexibleandreusabledesign.Improvingthedocumentationandmaintenanceofexistingsystembyfurnishinganexplicitspecificationofclassandobjectinteractionsandtheirintent.HistoryofDesignPattern1979:ChristopherAlexander,architect,“TheTimelessWayofBuilding”,OxfordPress.1987:OOPSLA(ObjectOrientedProgrammingSystem),Orlando,presentationofdesignpatterntothecommunityOObyWardCunninghamandKentBeck.1995:GroupofFouraliasE.Gamma,R.Helm,R.JohnsonandJ.Vlissides:“DesignPattern:ElementsofReusableOOsoftware”.PatternCharacteristicsEachpatternhasaname.Patternsfollowalooselystandardizeddocumentformat,generallyemployingaconversationaltone.Theymayalsoincludediagrams,picturesorsourcecodetohelpthereaderunderstandthepattern.Additionally,eachpatternprovidessuggestionsofotherpossiblepatternstoconsiderinsteadof,orinconjunctionwiththatparticularpatterntohelpsolvelargerproblems.ThuspatternsareliteraryformofProblemSolving.EssentialQualitiesofaTruePattern.QualityWithoutaName(QWaN):Fundamentally,QWaNmeansthat,whenappliedcorrectlytosolveanapplicableproblem,theresultingsolutionprovidesastructurethatcanevolveovertimetomeetunanticipatedfutureneeds.EssentialQualitiesCont.RuleofThree:Inorderforasolutiontoreallybea'pattern',theremustalreadyexistknownusesofthesolution,withresultsthatcanbeobserved.Thisrulestatesthat,foranysolutiontobeatruepattern,theremustbeatleastthreeknowninstancesofthatsolution.EssentialQualitiesCont.PatternFormat:Patternsaredocumentedfollowingalooselystandardizedformat.FORMAT:Thestructureofanysolutionpresentedasapatternmaybeinformalorformal.Minimally,eachpatternmustspecifyaname,thepurposeofthepattern,adescriptionofthesolutionandtheforcesitresolves.Additionalsectionsmaybeincludedaswell.PatternFormatsApatternmaybeverybrief-consistingofonlyafewparagraphsofconversationaltext-oritmaybedocumentedinmanypagesofabookorpublishedpaper.Apatternmaybeverylooselyorstrictlystructured.Forsoftwaredesignpatterns,amorestrictstructureisusuallypreferred,witheachpatterndividedintoanumberoftopicsections.CommonpatternsectionsNameProblemorIntentContextorApplicabilitySolutionForcesorConsequencesRelatedPatternsKnownUsesNameofDesignPatternHavetobecoherentandevocative.Describeadesignproblemsanditssolutionsinoneortwosentences.Usedtotalkaboutdesignpatternwiththecolleagues.Usedinthedocumentation.ProblemorIntentDescribeswhentoapplythepatterns.Explainstheproblemanditscontext.Sometimesincludealistofconditionsthatmustbemetbeforeitmakessensetoapplythepattern.Havetooccuroverandoveragaininourenvironment.ContextorApplicabilityThisisthesectionwhichtellsthatwhentheparticularpatterncanbeappliedandwhatistheprobleminaparticularcontextthatcanbesolvedusingtheparticularpattern.SolutionDescribestheelementsthatmakeupthedesign,theirrelationships,responsibilitiesandcollaborations.Doesnotdescribeaconcretedesignorimplementation.Hastobewellproveninsomeprojects.ForcesorConsequencesResultsandtrade-offsofapplyingthepattern.Helpfulfordescribedesigndecisions,forevaluatingdesignalternatives.Benefitsofapplyingapattern.Impactsonasystem’sflexibility,extensibilityorportabilityRelatedPatternsThissectionmentionsthenamesoftheotherknownpatternswhicharerelatedtothispatternandareusedtogettothesolutionoftheproblemencounteredintheparticularcontext.Oritcanbegivethenamesofthepatternwhicharealmostthesameandcanbeusedassubstitutepatterns.KnownUsesAswehavealreadyseenthatinorderforapatterntobeatruepatternthereshouldbeatleastthreeindependentinstancesofthesolutionprovidedbythepattern.Sothissectionlistsomeoftheknownusesofthepattern.ClassificationofDesignPatternsThedesignPatternsmaybeClassifiesasCreationalDesignPatterns.StructuralDesignPatterns.BehavioralDesignPatterns.Classificationofdesignpatterns(aview)CreationalStructuralBehavioralFactoryMethodAdapterInterpreterTemplateMethodAbstractFactoryAdapterChainofResponsibilityBuilderBridgeCommandPrototypeCompositeIteratorSingletonDecoratorMediatorFaçadeMementoFlyweightObserverProxyStateStrategyVisitorClassObjectPurposeScopeCreationalDesignPatternsObjectiveConceptofcreationaldesignpattern.Understandingof5differentcreationaldesignpatternswithcodeexamples.Therightusageofcreationaldesignpatterns.GivinganideaofhowtocreateobjectusingDesignpatterntoapplyyourownapplication.WhatiscreationalDesignpattern?Abouthowanobjectcanbecreated.requestClientApplicationCreatingObjectCreationalPatternsReturnobjectEncapsulatedWhatiscreationalDesignpattern?(cont)Designpatternsthatabstractstheobjectinstantiationprocess.helpsystembeindependentofhowitsobjectsarecreate