Giter VIP home page Giter VIP logo

design-patterns's Introduction

设计模式(Swift)

设计模式程序员必备的基础知识,但是没有点年份,掌握也不是这么容易,所以例子就非常重要。概念是抽象的,例子是具象的。具象的东西,记忆和理解都会容易些。

项目的初衷就是收集比较经典合适的案例,来帮助理解设计模式,这样大家在写代码,看别人的代码也会容易一些。非常希望您的参与,我们一起维护。

支持线上浏览https://oldbird.run/design-patterns

关注官方公众号 OldBirds

基础

  • 类间的关系
  • 设计原则

创建型

这些设计模式提供了一种在创建对象的同时隐藏创建逻辑的方式,而不是使用 new 运算符直接实例化对象。这使得程序在判断针对某个给定实例需要创建哪些对象时更加灵活。

  • 工厂模式
  • 建造者模式
  • 原型模式
  • 单例模式

结构型

这些设计模式关注类和对象的组合。继承的概念被用来组合接口和定义组合对象获得新功能的方式。

  • 适配器模式
  • 桥接模式
  • 过滤器模式
  • 组合模式
  • 装饰器模式
  • 外观模式
  • 享元模式
  • 代理模式

行为型

这些设计模式特别关注对象之间的通信。

  • 责任链模式
  • 命令模式
  • 解释器模式
  • 迭代器模式
  • 中介者模式
  • 备忘录模式
  • 观察者模式
  • 状态模式
  • 空对象模式
  • 策略模式
  • 模板模式
  • 访问者模式

交流

如果您有更好的案例,不防提 issue,或者提 PR。当然如果文字有不当之处也欢迎指出。

如果您想加入我们的 Swift 微信交流群,可以关注微信公众号 OldBirds

design-patterns's People

Contributors

oheroj avatar fradser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.