本文介绍了设计模式和企业设计模式有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道设计模式与企业设计模式之间的区别,例如有些书将 ActiveRecord 称为企业设计模式,而单例则是设计模式。

I want to know the difference between design pattern and enterprise design pattern e.g. some books call ActiveRecord an enterprise design pattern, while singleton is a design pattern.

推荐答案

与它的书本息息相关。 Singleton最初由四人帮在设计模式中推广。 在Martin Fowler撰写的企业应用程序体系结构模式中。

It probably has the most to do with what book it came from. Singleton was first popularized in "Design Patterns" by the Gang of Four. ActiveRecord was in "Patterns of Enterprise Application Architecture", by Martin Fowler.

四人帮将设计模式描述为通常有用的面向对象的类结构。

The Gang of Four described Design Patterns as generally useful object-oriented class structures.

Fowler的书是关于如何访问企业部分的(数据库,消息传递主干等)。

Fowler's book is about how to access enterprise pieces (databases, messaging backbones, etc) in object-oriented code.

这篇关于设计模式和企业设计模式有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 18:15