上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 118 下一页
摘要: /** * Proxy Pattern 代理是一种结构型设计模式, 让你能提供真实服务对象的替代品给客户端使用。 代理接收客户端的请求并进行一些处理 (访问控制和缓存等), 然后再将请求传递给服务对象。 * The Subject interface declares common operatio 阅读全文
posted @ 2023-10-10 16:45 ®Geovin Du Dream Park™ 阅读(30) 评论(0) 推荐(0)
摘要: /** * Flyweight Pattern 享元是一种结构型设计模式, 它允许你在消耗少量内存的情况下支持大量对象。 * https://refactoringguru.cn/design-patterns/flyweight/typescript/example#lang-features * 阅读全文
posted @ 2023-10-10 13:20 ®Geovin Du Dream Park™ 阅读(27) 评论(0) 推荐(0)
摘要: printf("hello world, c \n"); printf("你好,中国\n"); int duArry[] = {0,1,2,3,4,5} ; int* pArr; pArr = duArry; pArr = &duArry[0] ; int l=sizeof(duArry)/size 阅读全文
posted @ 2023-10-09 22:13 ®Geovin Du Dream Park™ 阅读(17) 评论(0) 推荐(0)
摘要: /** * Facade pattern 外观是一种结构型设计模式, 能为复杂系统、 程序库或框架提供一个简单 (但有限) 的接口。 * The Facade class provides a simple interface to the complex logic of one or * sev 阅读全文
posted @ 2023-10-08 11:56 ®Geovin Du Dream Park™ 阅读(18) 评论(0) 推荐(0)
摘要: /** * Decorator Pattern 装饰是一种结构设计模式, 允许你通过将对象放入特殊封装对象中来为原对象增加新的行为。 * The base Component interface defines operations that can be altered by * decorato 阅读全文
posted @ 2023-10-08 06:43 ®Geovin Du Dream Park™ 阅读(17) 评论(0) 推荐(0)
摘要: /** * Composite Pattern 组合是一种结构型设计模式, 你可以使用它将对象组合成树状结构, 并且能像使用独立对象一样使用它们。 * https://refactoringguru.cn/design-patterns/composite/typescript/example#la 阅读全文
posted @ 2023-10-08 06:20 ®Geovin Du Dream Park™ 阅读(15) 评论(0) 推荐(0)
摘要: /** * Bridge Pattern 桥接是一种结构型设计模式, 可将业务逻辑或一个大类拆分为不同的层次结构, 从而能独立地进行开发。 * https://dev.to/takaakit/uml-diagram-for-gof-design-pattern-examples-in-typescr 阅读全文
posted @ 2023-10-07 10:55 ®Geovin Du Dream Park™ 阅读(18) 评论(0) 推荐(0)
摘要: /** * Adapter pattern 适配器是一种结构型设计模式, 它能使不兼容的对象能够相互合作。 * file: Adapterts.ts * * */ /** * The Target defines the domain-specific interface used by the c 阅读全文
posted @ 2023-10-06 20:03 ®Geovin Du Dream Park™ 阅读(22) 评论(0) 推荐(0)
摘要: npm init -ynpm install -g typescripttsc --version npm install -g ts-nodenpm install eslint --save-dev npm install typescript typescript-eslint-parser 阅读全文
posted @ 2023-10-06 14:58 ®Geovin Du Dream Park™ 阅读(25) 评论(0) 推荐(0)
摘要: /** *file: prototypets.ts * Prototype Pattern 原型是一种创建型设计模式, 使你能够复制对象, 甚至是复杂对象, 而又无需使代码依赖它们所属的类。 * The example class that has cloning ability. We'll se 阅读全文
posted @ 2023-10-05 21:20 ®Geovin Du Dream Park™ 阅读(28) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 118 下一页