摘要:定义 解释器模式(Interpreter Pattern)是一种按照规定语法对表达式进行解析的方案,在项目中较少使用。 英文:Given a language,define a representation for its grammer along with an interpreter that
阅读全文
摘要:定义 状态模式(State Pattern)又称为状态对象模式,该模式允许一个对象在其内部状态改变的时候改变行为。 英文:Allow an object to alert its behavior when its internal state changes.The object will app
阅读全文
摘要:定义 访问者(Visitor Pattern)的目的是封装一些施加于某种数据结构元素之上的操作,即使这些操作需要修改,接收这个操作的数据结构却可以保持不变。 英文原话:Represent an operation to be performed on the elements of an objec
阅读全文
摘要:定义 备忘录模式(Memento Pattern)又称为快照(Snapshot)模式或Token模式。 英文原话:Without violating encapsulation,capture and externalize an object's internal state so that th
阅读全文
摘要:定义 观察者(Observer Pattern)模式也称为发布订阅模式,它是一种在项目中经常使用的模式。 英文原话:Define a one-to-many dependency between objects so that when one object changes state,all it
阅读全文
摘要:定义 中介者模式(Mediator)也称调停者模式,是一种比较简单的模式。 英文:Define an object that encapsulates how a set of objects interact.Mediator promotes loose coupling by keeping
阅读全文
摘要:定义 迭代器模式(Iterator Pattern)是使用率最高的几个模式之一,被广泛地应用到Java的API中。例如:Java的集合(Collection)框架中,就广泛使用迭代器来遍历集合中元素。 英文原话:Provide a way to access the elements of an a
阅读全文
摘要:定义 策略模式(Strategy Pattern)也叫政策模式,是一种比较简单的模式。 英文原话:Define a family of algorithms,encapsulate each one,and make them interchangeable. 翻译:定义一组算法,将每个算法都封装起
阅读全文
摘要:定义 责任链模式(Chain of Responsibility Pattern)是一种常见的行为模式。 责任链模式英文原话是:Avoid coupling the sender of a request to its receiver by giving more than one object
阅读全文
摘要:定义 命令模式(Command Pattern)又称为行动(Action)模式或者交易(Transaction)模式。 英文原话:Encapsulate a request as an object,thereby letting you parameterize clients with diff
阅读全文
摘要:sql语句执行顺序: from > join > on > where > group by > avg,sum.... > having > select > distinct > order by > limit 存储过程优点: 存储过程是一组予编译的 SQL 语句,它的优点有: 允许模块化程序
阅读全文