最病 A Pattern Definition Review o A Pattern is a solution to a problem in a context. a Context: the recurring situation in which the pattern applies a Problem: the goal you are trying to achieve in this context and any constrains that occur in the context. a Solution: a general design that anyone can apply which resolves the goal and set of constraints Institute of Computer Software 2021/2/7 Nanjing University
Pattern Definition Review A Pattern is a solution to a problem in a context. Context: the recurring situation in which the pattern applies Problem: the goal you are trying to achieve in this context and any constrains that occur in the context. Solution: a general design that anyone can apply which resolves the goal and set of constraints 2021/2/7 Institute of Computer Software Nanjing University 12
最病 A Pattern Categories I -- Goal o Creational Patterns: involve object instantiation and all provide a way to decouple a client from the objects it needs to instantiate a Structural Patterns: compose classes or objects into larger structures a Behavioral patterns: concerned with how classes and objects interact and distribute responsibility Institute of Computer Software 2021/2/7 Nanjing University
Pattern Categories I -- Goal Creational Patterns: involve object instantiation and all provide a way to decouple a client from the objects it needs to instantiate. Structural Patterns: compose classes or objects into larger structures. Behavioral Patterns: concerned with how classes and objects interact and distribute responsibility 2021/2/7 Institute of Computer Software Nanjing University 13
最病 A Pattern Categories ll -Scope 口C| ass patterns a Describe how relationships between classes are defined via inheritance a Relationships in class patterns are established at compile time. Template Method Factory Method Interpreter Adapter Institute of Computer Software 2021/2/7 Nanjing University
Pattern Categories II -- Scope Class Patterns Describe how relationships between classes are defined via inheritance. Relationships in class patterns are established at compile time. 2021/2/7 Institute of Computer Software Nanjing University 14 Template Method Interpreter Adapter Factory Method
最病 A Pattern Categories ll -Scope 口 Object Patterns a Describe relationships between objects and are primarily defined y com position. a Relationships in object patterns are typically created at runtime and are more dynamic and flexible Composite Visitor Decorator Iterator Command Proxy Strategy Facade Observer Chain of Responsibility Prototype Flyweight Mediator Bridge State Builder Memento Singleton Abstract Factory Institute of Computer Software 2021/2/7 Nanjing University
Pattern Categories II -- Scope Object Patterns Describe relationships between objects and are primarily defined by composition. Relationships in object patterns are typically created at runtime and are more dynamic and flexible 2021/2/7 Institute of Computer Software Nanjing University 15 Composite Visitor Decorator Iterator Command Memento Proxy Facade Observer Chain of Responsibility Builder Singleton Prototype Flyweight Mediator Bridge State Abstract Factory Strategy
最病 o More about Pattern 口 Patterns of patterns 口Anfi- paftern 口J2 EE patterns Institute of Computer Software 2021/2/7 Nanjing University
More about Pattern Patterns of Patterns Anti-pattern J2EE patterns 2021/2/7 Institute of Computer Software Nanjing University 16