{"id":19763838,"url":"https://github.com/luohuidong/note-design-pattern","last_synced_at":"2026-05-14T15:32:57.887Z","repository":{"id":222096441,"uuid":"755183974","full_name":"luohuidong/note-design-pattern","owner":"luohuidong","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-26T15:31:27.000Z","size":28387,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T23:45:51.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luohuidong.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-09T15:47:50.000Z","updated_at":"2024-02-17T14:10:43.000Z","dependencies_parsed_at":"2024-02-24T15:39:14.151Z","dependency_job_id":null,"html_url":"https://github.com/luohuidong/note-design-pattern","commit_stats":null,"previous_names":["luohuidong/note-design-pattern"],"tags_count":0,"template":false,"template_full_name":"foambubble/foam-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luohuidong%2Fnote-design-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luohuidong%2Fnote-design-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luohuidong%2Fnote-design-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luohuidong%2Fnote-design-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luohuidong","download_url":"https://codeload.github.com/luohuidong/note-design-pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241096074,"owners_count":19908915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T04:11:17.037Z","updated_at":"2026-05-14T15:32:57.844Z","avatar_url":"https://github.com/luohuidong.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 设计模式\n\n\u003e [!NOTE]\n\u003e 所有例子均使用 TypeScript 实现\n\n设计模式是软件设计中常见问题的典型解决方案。大部分的设计模式解决的是代码可扩展性的问题。设计模式的核心是需要将逻辑中变与不变的部分分类，达到变化的部分灵活、不变的地方稳定的目的。\n\n设计模式可以分为三类：\n\n- 创建型：提供对象的创建机制，提升已有代码的灵活性和复用性。\n- 结构型：解释如何将对象和累组合成更大的结构，并且保持结构的灵活和高效。\n- 行为型：关注对象之间的高效沟通和指责委派。\n\n创建型的设计模式有：\n\n1. [[工厂模式]]\n2. [[生成器模式]]\n3. [[原型模式]]\n4. [[单例模式]]\n\n结构型的设计模式有：\n\n1. 代理模式\n2. 桥接模式\n3. [[装饰者模式]]\n4. 适配器模式\n5. 门面模式\n6. 组合模式\n7. 享元模式\n\n行为型的设计模式有：\n\n1. [[观察者模式]]\n2. 模板模式\n3. [[策略模式]]\n4. 职责链模式\n5. 状态模式\n6. 迭代器模式\n7. 访问器模式\n8. 备忘录模式\n9. 命令模式\n10. 解释器模式\n11. 中介模式\n\n[//begin]: # \"Autogenerated link references for markdown compatibility\"\n[工厂模式]: notes/%E5%B7%A5%E5%8E%82%E6%A8%A1%E5%BC%8F.md \"工厂模式\"\n[生成器模式]: notes/%E7%94%9F%E6%88%90%E5%99%A8%E6%A8%A1%E5%BC%8F.md \"生成器模式\"\n[原型模式]: notes/%E5%8E%9F%E5%9E%8B%E6%A8%A1%E5%BC%8F.md \"原型模式\"\n[单例模式]: notes/%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F.md \"单例模式\"\n[装饰者模式]: notes/%E8%A3%85%E9%A5%B0%E8%80%85%E6%A8%A1%E5%BC%8F.md \"装饰者模式\"\n[观察者模式]: notes/%E8%A7%82%E5%AF%9F%E8%80%85%E6%A8%A1%E5%BC%8F.md \"观察者模式\"\n[策略模式]: notes/%E7%AD%96%E7%95%A5%E6%A8%A1%E5%BC%8F.md \"策略模式\"\n[//end]: # \"Autogenerated link references\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluohuidong%2Fnote-design-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluohuidong%2Fnote-design-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluohuidong%2Fnote-design-pattern/lists"}