Adapter PatternWhat Is an Adapter Pattern?Problem: We wish to allow one class to use another’s methods without using direct inheritanceSolution: Allow an adapter class to hold an instance of the desired class and adapt its methods, properties, and events through the adapter’s methods, properties, and eventsComparison to Similar PatternsWhat We Have LearnedRelated PatternsBridge PatternWhat Is a Bridge Pattern?Problem: We need to allow a class to use functionality from a series of class types without using direct inheritanceSolution: Create a series of classes and allow a bridge class to hold the desired instance of the series and adapt its methods, properties, and events through the bridge’s methods, properties, and eventsComparison to Similar PatternsWhat We Have LearnedRelated PatternsComposite PatternWhat Is a Composite Pattern?Problem: A way is needed to allow a group of classes with a common method and different functionality to work together in sequence without compiling the sequence beforehandSolution: Group each class into a composite, which will manage when each class will have its common method called and will allow manipulation of the sequence of callsComparison to Similar PatternsWhat We Have LearnedRelated PatternsDecorator PatternWhat Is a Decorator Pattern?Problem: We wish to have certain functions associated with a class type only when desired, but not all the timeSolution: We allow a decorator that inherits from the class we are using to take its place and act as the class, but with the increased functionality of the decoratorComparison to Similar PatternsWhat We Have LearnedRelated PatternsFacade PatternWhat Is a Facade Pattern?Problem: We have several classes whose methods make up a process, but we need to control the order in which these classes are called by code outside the assemblySolution: Create a facade layer with interfaces to desired classes that are called in the proper order and allow the subsystem classes to only be called inside the facade assemblyComparison to Similar PatternsWhat We Have LearnedRelated PatternsFlyweight PatternWhat Is a Flyweight Pattern?Problem: A text document uses individual object instances for each character and quickly becomes unwieldySolution: Use shared flyweight objects to instantiate a limited number of character objects that use their current context to change the extrinsic stateComparison to Similar PatternsWhat We Have LearnedRelated PatternsProxy PatternWhat Is a Proxy Pattern?Problem: You have an object in a different domain or server address you would like to access in the current domain, but do not want to allow construction of the object in the local domainSolution: Use a proxy to bridge the two separate domains and allow access between programsComparison to Similar PatternsWhat We Have LearnedRelated Patterns