0%

History of patterns

History of patterns

模式的历史

Who invented patterns? That’s a good, but not a very accurate, question. Design patterns aren’t obscure, sophisticated concepts—quite the opposite. Patterns are typical solutions to common problems in object-oriented design. When a solution gets repeated over and over in various projects, someone eventually puts a name to it and describes the solution in detail. That’s basically how a pattern gets discovered.
谁发明了模式?这是一个很好的问题,但不是很准确。设计模式不是晦涩难懂的复杂概念,恰恰相反。模式是面向对象设计中常见问题的典型解决方案。当一个解决方案在各种项目中一遍又一遍地重复时,最终会有人给它起一个名字并详细描述该解决方案。这基本上就是发现模式的方式。

The concept of patterns was first described by Christopher Alexander in A Pattern Language: Towns, Buildings, Construction. The book describes a “language” for designing the urban environment. The units of this language are patterns. They may describe how high windows should be, how many levels a building should have, how large green areas in a neighborhood are supposed to be, and so on.
模式的概念最早由克里斯托弗·亚历山大(Christopher Alexander)在《模式语言:城镇、建筑、建筑》中描述。该书描述了一种设计城市环境的“语言”。这种语言的单位是模式。它们可能会描述窗户应该有多高,建筑物应该有多少层,社区中的绿地应该有多大,等等。

The idea was picked up by four authors: Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm. In 1994, they published Design Patterns: Elements of Reusable Object-Oriented Software, in which they applied the concept of design patterns to programming. The book featured 23 patterns solving various problems of object-oriented design and became a best-seller very quickly. Due to its lengthy name, people started to call it “the book by the gang of four” which was soon shortened to simply “the GoF book”.
这个想法被四位作者采纳:Erich Gamma、John Vlissides、Ralph Johnson 和 Richard Helm。1994 年,他们出版了《设计模式:可重用面向对象软件的元素》,其中他们将设计模式的概念应用于编程。该书收录了 23 种模式,解决了面向对象设计的各种问题,并很快成为畅销书。由于名字很长,人们开始称它为“四人团的书”,很快就简称为《The GoF book》。

Since then, dozens of other object-oriented patterns have been discovered. The “pattern approach” became very popular in other programming fields, so lots of other patterns now exist outside of object-oriented design as well.
从那时起,已经发现了许多其他面向对象的模式。“模式方法”在其他编程领域变得非常流行,因此在面向对象设计之外也存在许多其他模式。

宇宙山河浪漫,赞赏动力无限

Welcome to my other publishing channels