OUTLINE ● Adapter Factory Singleton e Strategy e Composition ● Facade o Observer
OUTLINE Adapter Factory Singleton Strategy Composition Facade Observer
Factory o who creates the adapters? a domain object(such as a Register)? ●如何确定创建哪种 adapter? such as Tax/aster-Adapter or GoodAs Gold T axProAdapter?
Factory who creates the adapters? ⚫ a domain object (such as a Register)? 如何确定创建哪种adapter? such as TaxMaster-Adapter or GoodAsGoldTaxProAdapter?
another fundamental design principle Design to maintain a separation of concerns 般作为 architectural design principle one of the essential principles in software engineering o modularize or separate distinct concerns into different areas, so that each has a cohesive purpose
another fundamental design principle Design to maintain a separation of concerns. ⚫ 一般作为architectural design principle ⚫ one of the essential principles in software engineering ⚫ modularize or separate distinct concerns into different areas, so that each has a cohesive purpose
● domain layer软件对象相对强调纯应用逻 辑的职责 另一组软件对象负责与外部系统的连接
domain layer软件对象相对强调纯应用逻 辑的职责 另一组软件对象负责与外部系统的连接
Context/ Problem 当有特殊考虑时如何创建对象?(如创建 对象的逻辑很复杂,或想将创建对象的 职责分离出来以获得更高的内聚度等) e Solution o Create a pure fabrication object called a Factory that handles the creation
Context I Problem 当有特殊考虑时如何创建对象? (如创建 对象的逻辑很复杂,或想将创建对象的 职责分离出来以获得更高的内聚度等) Solution Create a Pure Fabrication object called a Factory that handles the creation