设计模式和库之间有什么区别? [英] What is the difference between design patterns and libraries?
问题描述
设计模式和库之间有什么区别?
What is the difference between design patterns and libraries?
我似乎在任何地方都找不到差异.
I cannot seem to find the difference anywhere.
推荐答案
DesingPatterns被认为可以通过解决已知问题来帮助开发人员.例如,ObserverPattern用于观察创建对象并执行特定的操作,中介程序用于使应用程序逻辑居中并处理对对象的依赖关系,合成器用于对树结构进行建模等.通常,DesignPatterns可以分为三种不同类型的模式.
DesingPatterns are considered to assist the developer by solveing already known problems. For instance, the ObserverPattern is used to observe a concreate object and carry out specific actions, the mediator is used to center the application logic and handle dependencies on a object, the composite is used to model a tree structure, etc. In general DesignPatterns can be categorized into three different types of patterns.
- 娱乐性
- 行为
- 结构
相比之下,库是完全不同的东西.这是一段通用源代码,可以供其他应用程序使用.
In contrast, a library is a complete different thing. It's a piece of generic source code that can be used by other applications.
这篇关于设计模式和库之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!