随笔分类 -  PM / 软件设计模式

摘要:Visitor: Problem Example: exporting the graph into XML format 示例:将图表导出为 XML 格式 Visitor: Solution Place the new behavior into a separate class called v 阅读全文
posted @ 2024-12-24 18:27 Mephostopheles 阅读(4) 评论(0) 推荐(0) 编辑
摘要:State: Problem A finite number of states The program behaves differently within a state Can be switched from one state to another, and switching rules 阅读全文
posted @ 2024-12-24 14:25 Mephostopheles 阅读(6) 评论(0) 推荐(0) 编辑
摘要:Memento: Problem Example: supporting undo in a text editor app Problem 1: private fields cannot be accessed Problem 2: when fields are made public, re 阅读全文
posted @ 2024-12-24 11:27 Mephostopheles 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Iterator: Problem Collections are one of the most used data types in programming There should be a way to go through each element of the collection Mo 阅读全文
posted @ 2024-12-23 22:38 Mephostopheles 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接 Chain of Responsibility: Problem Example: an online ordering system 示例:在线订购系统 – The request must pass a series of checks – New requirements: vali 阅读全文
posted @ 2024-10-31 20:30 Mephostopheles 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接 Flyweight: Problem Each particle, such as a bullet, a missile or a piece of shrapnel was represented by a separate object containing plenty of da 阅读全文
posted @ 2024-10-31 19:14 Mephostopheles 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接 Composite: Problem Using the Composite pattern makes sense only when the core model of your app can be represented as a tree. 仅当应用程序的核心模型可以表示为树时, 阅读全文
posted @ 2024-10-31 13:41 Mephostopheles 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接 Adaptor: Problem Imagine that you’re creating a stock market monitoring app. The app downloads the stock data from multiple sources in XML format 阅读全文
posted @ 2024-10-28 20:18 Mephostopheles 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接 Singleton: Intent Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global acce 阅读全文
posted @ 2024-10-24 23:41 Mephostopheles 阅读(5) 评论(0) 推荐(0) 编辑
摘要:原文链接 Builder: Problem Example: a complex object that requires laborious, step-by-step initialization of many fields and nested objects 一个复杂对象的创建通常由多个部 阅读全文
posted @ 2024-10-24 21:05 Mephostopheles 阅读(11) 评论(0) 推荐(0) 编辑
摘要:原文链接 Factory Method: Problem Example: a logistics management application 示例:物流管理应用程序 – First version: handling transportation by trucks, with a Truck 阅读全文
posted @ 2024-10-24 11:13 Mephostopheles 阅读(5) 评论(0) 推荐(0) 编辑
摘要:软件设计原则 阅读全文
posted @ 2024-09-13 20:05 Mephostopheles 阅读(25) 评论(0) 推荐(0) 编辑
摘要:OOP 和 UML 类图 OOP 与 Java 阅读全文
posted @ 2024-09-13 16:18 Mephostopheles 阅读(9) 评论(0) 推荐(0) 编辑
摘要:软件设计中常见问题的典型解决方案,例如预制蓝图,创造模式、结构模式和行为模式 阅读全文
posted @ 2024-09-13 12:01 Mephostopheles 阅读(9) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示