随笔分类 -  Patterns

摘要:<template> <div> <input type="text" v-bind="$attrs" /> </div> </template> <script setup lang="ts" > // by default when you pass props to the component 阅读全文
posted @ 2025-03-04 15:30 Zhentiw 阅读(12) 评论(0) 推荐(0)
摘要:The Vendor Wrapper Pattern is about isolating a third-party (vendor) library behind your own abstraction. Instead of scattering vendor-specific API ca 阅读全文
posted @ 2025-03-03 15:33 Zhentiw 阅读(18) 评论(0) 推荐(0)
摘要:设计模式 设计模式基本介绍 单例模式 工厂模式 基本介绍 “模式”是由模式之父 Christopher Alexander(克里斯托弗·亚历山大)提出。 1991 年-1992 年之间,由 GoF: Erich Gamma Richard Helm Ralph Johnson John Vlissi 阅读全文
posted @ 2025-02-23 17:48 Zhentiw 阅读(12) 评论(0) 推荐(0)
摘要:This course is based on our Coding Better Composables blog series authored by Michael Thiessen. If you can get async code to work correctly, it can si 阅读全文
posted @ 2025-02-04 15:51 Zhentiw 阅读(14) 评论(0) 推荐(0)
摘要:This course is based on our Coding Better Composables blog series authored by Michael Thiessen. The composable you wrote last month returns an object, 阅读全文
posted @ 2025-02-04 15:35 Zhentiw 阅读(13) 评论(0) 推荐(0)
摘要:This course is based on our Coding Better Composables blog series authored by Michael Thiessen. What if your composable could change what is returned 阅读全文
posted @ 2025-02-04 15:05 Zhentiw 阅读(9) 评论(0) 推荐(0)
摘要:This course is based on our Coding Better Composables blog series authored by Michael Thiessen. When using composables in Vue.js, sometimes you alread 阅读全文
posted @ 2025-02-04 15:00 Zhentiw 阅读(10) 评论(0) 推荐(0)
摘要:ABT SDK Design The entire ABT SDK includes numerous APIs and tools to support application development, including: ABTCore: Provides the core functiona 阅读全文
posted @ 2024-12-07 04:12 Zhentiw 阅读(41) 评论(0) 推荐(0)
摘要:How to Control Requests? Controlling requests involves addressing several key issues: 1. How to Maximize Bandwidth Utilization In chunked uploads, a l 阅读全文
posted @ 2024-12-05 03:20 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要:Code design SDK has 3 layers: Upload Protocol: Defines the communication format between the frontend and backendt upload-core: Protocol-based API that 阅读全文
posted @ 2024-12-05 03:20 Zhentiw 阅读(13) 评论(0) 推荐(0)
摘要:How to coordinate frontend and backend? File upload involves interaction between the frontend and backend, requiring the establishment of a standard c 阅读全文
posted @ 2024-12-05 03:20 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要:Background Our SaaS platform includes the upload of large files such as company information and meeting videos. Without special handling, the followin 阅读全文
posted @ 2024-12-05 03:18 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要:When company's API become huge and always changing, if request-busis maintained by developers manually, it's not only time consuming but also error pr 阅读全文
posted @ 2024-12-01 18:57 Zhentiw 阅读(17) 评论(0) 推荐(0)
摘要:Idempotency is a mathematical concept often abstracted as: f(n) = 1n, no matter what's the value of n, f(n) alwayhs equals 1 In network requests, many 阅读全文
posted @ 2024-12-01 17:42 Zhentiw 阅读(11) 评论(0) 推荐(0)
摘要:Usage of a cached request: const req = createCacheRequestor(); req.get('/a') // request req.get('/a') // use cache req.get('/b') // request req.get('/ 阅读全文
posted @ 2024-12-01 17:32 Zhentiw 阅读(14) 评论(0) 推荐(0)
摘要:Three layers design Low level implementation Layer: using low level implementation to complete basic operation. For the network request, we can use th 阅读全文
posted @ 2024-12-01 17:14 Zhentiw 阅读(15) 评论(0) 推荐(0)
摘要:Creational patterns provide object creation mechanisms that increase flexibility and reuse of existing code. Factory method: Provides an interface for 阅读全文
posted @ 2024-01-23 15:11 Zhentiw 阅读(23) 评论(0) 推荐(0)