上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 119 下一页
摘要: /** * Observer Pattern 观察者是一种行为设计模式, 允许一个对象将其状态的改变通知其他对象 * file: Observerts.ts * The Subject interface declares a set of methods for managing subscrib 阅读全文
posted @ 2023-10-12 18:16 ®Geovin Du Dream Park™ 阅读(21) 评论(0) 推荐(0)
摘要: /** * * Mediator pattern 中介者是一种行为设计模式, 让程序组件通过特殊的中介者对象进行间接沟通, 达到减少组件之间依赖关系的目的。 * file: Mediatorts.ts * The Mediator interface declares a method used b 阅读全文
posted @ 2023-10-12 13:18 ®Geovin Du Dream Park™ 阅读(30) 评论(0) 推荐(0)
摘要: /** * * Command Pattern 命令是一种行为设计模式, 它可将请求或简单操作转换为一个对象。 * file: Commandts.ts * The Command interface declares a method for executing a command. * */ i 阅读全文
posted @ 2023-10-12 13:17 ®Geovin Du Dream Park™ 阅读(19) 评论(0) 推荐(0)
摘要: /** * Template Method pattern 模版方法是一种行为设计模式, 它在基类中定义了一个算法的框架, 允许子类在不修改结构的情况下重写算法的特定步骤。 * file: Templatets.ts * The Abstract Class defines a template m 阅读全文
posted @ 2023-10-11 18:18 ®Geovin Du Dream Park™ 阅读(36) 评论(0) 推荐(0)
摘要: /** * State Pattern 状态是一种行为设计模式, 让你能在一个对象的内部状态变化时改变其行为。 * The Context defines the interface of interest to clients. It also maintains a * reference to 阅读全文
posted @ 2023-10-11 18:11 ®Geovin Du Dream Park™ 阅读(21) 评论(0) 推荐(0)
摘要: /** * Memento Pattern 备忘录是一种行为设计模式, 允许生成对象状态的快照并在以后将其还原。 * The Originator holds some important state that may change over time. It also * defines a me 阅读全文
posted @ 2023-10-11 18:02 ®Geovin Du Dream Park™ 阅读(27) 评论(0) 推荐(0)
摘要: /** * Iterator Pattern 迭代器是一种行为设计模式, 让你能在不暴露复杂数据结构内部细节的情况下遍历其中所有的元素 * file: Iteratorts.ts npm install -g babel-cli * Intent: Lets you traverse element 阅读全文
posted @ 2023-10-11 18:01 ®Geovin Du Dream Park™ 阅读(24) 评论(0) 推荐(0)
摘要: /** * Chain of Responsibility Pattern 责任链是一种行为设计模式, 允许你将请求沿着处理者链进行发送, 直至其中一个处理者对其进行处理。 * file: Chaints.ts * The Handler interface declares a method fo 阅读全文
posted @ 2023-10-11 08:52 ®Geovin Du Dream Park™ 阅读(41) 评论(0) 推荐(0)
摘要: /** * Proxy Pattern 代理是一种结构型设计模式, 让你能提供真实服务对象的替代品给客户端使用。 代理接收客户端的请求并进行一些处理 (访问控制和缓存等), 然后再将请求传递给服务对象。 * The Subject interface declares common operatio 阅读全文
posted @ 2023-10-10 16:45 ®Geovin Du Dream Park™ 阅读(36) 评论(0) 推荐(0)
摘要: /** * Flyweight Pattern 享元是一种结构型设计模式, 它允许你在消耗少量内存的情况下支持大量对象。 * https://refactoringguru.cn/design-patterns/flyweight/typescript/example#lang-features * 阅读全文
posted @ 2023-10-10 13:20 ®Geovin Du Dream Park™ 阅读(35) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 119 下一页