Skip to main content

66 docs tagged with "Programming"

View all tags

Adapter

适配器通过内部使用新接口规定的属性/方法, 创建一个外观与旧接口一致的方法

Bridge

Split large class or set of closely related classes into two separate hierarchies:

Builder

Flexible object creation with chain style calls.

Command

需要向某些对象发送请求:

Commit

- -a: 跳过暂存阶段(git add)

Composite

- 封装: 组合模式将对象组合成树形结构, 以表示 部分+整体 的层次结构.

Core

Command Priority

Decorator

- 重写/重载/扩展对象原有的行为 (Methods), 但不改变对象原有属性.

Diff

查看未暂存 (un-staged) 差异

Flyweight

减小内存开销 (Performance Optimization):

Git

Getting Started

IoC and DI

- IoC (Inversion of Control) 控制反转模式: 将组件间的依赖关系从程序内部提到外部来管理.

Iterator

一个 Iterator 对象封装访问和遍历一个聚集对象中的各个构件的方法:

Log

- -p: 打印 diff 差异信息

Mediator

一个 Mediator 对象封装对象间的协议 (中央集权的控制中心):

Mixin

将多个对象的属性混入同一个对象, 达到继承/扩展/组合的效果.

Observer

- 被观察者 (Subject) 维护一组观察者列表,

Patterns

Software design is the art of managing dependencies and abstractions.

Prototype

可以使用原型模式来减少创建新对象的成本:

Proxy

通过一个代理对象:

Pub-Sub

- 发布-订阅模式是借助第三方来实现调度, 发布者和订阅者之间互不感知.

Remote

添加与删除远程仓库源:

State

一个 State 对象封装一个与状态相关的行为,

Strategy

- 改变对象的内核/算法, 一个 Strategy 对象封装一个算法, 相互可以替换.

Terminal

- 电传打字机 (TeleTypeWriter, TTY) 是物理设备,

User

- w/who: 查看用户详细信息

Vim

Getting Started

Visitor

Separating an algorithm from an object structure on which it operates.