上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 118 下一页
摘要: /** * * Visitor Pattern 访问者是一种行为设计模式, 允许你在不修改已有代码的情况下向已有类层次结构中增加新的行为。 * file: Visitorts.ts * The Component interface declares an `accept` method that 阅读全文
posted @ 2023-10-13 18:12 ®Geovin Du Dream Park™ 阅读(18) 评论(0) 推荐(0)
摘要: /** * Strategy Pattern 策略是一种行为设计模式, 它将一组行为转换为对象, 并使其在原始上下文对象内部能够相互替换。 * * file: Strategyts.ts * The Context defines the interface of interest to clien 阅读全文
posted @ 2023-10-13 18:11 ®Geovin Du Dream Park™ 阅读(24) 评论(0) 推荐(0)
摘要: /** * 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™ 阅读(13) 评论(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™ 阅读(22) 评论(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™ 阅读(10) 评论(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™ 阅读(22) 评论(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™ 阅读(15) 评论(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™ 阅读(21) 评论(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™ 阅读(17) 评论(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™ 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 118 下一页