"The universe is not made of 'things,' but of patterns of complex interacting geometries" (Christopher Alexander).
"A pattern carries the essence of a proven solution to a recurring problem in a certain context."(Brad Appleton)
The Language of Patterns, by Christopher Alexander
The concept of "pattern language" was introduced in 1977 by architect Christopher Alexander in his book "A Pattern Language". Aiming to reduce the complexity of architecture and make it more human, he set out to identify and solve the essential problems encountered in architectural design, creating a new paradigm based on a set of fundamental patterns or solutions and a way to combine them to generate useful and effective designs. His practical and structured method put architecture within the reach of non-specialists, so that they could design their own homes, without the need for architects.
Alexander was inspired by the designs of ancient cultures and the attractive and harmonious medieval cities. His method is based on classic, real-world-tested, practical and beautiful patterns. He identified 15 recurring geometric or structural characteristics which he made the foundation of his method: 1) Levels of scale; 2) Strong centers; 3) Borders; 4) Alternating repetition; 5) Positive space; 6) Good form; 7) Local symmetries; 8) Deep interlocking and ambiguity; 9) Contrast; 10) Gradients; 11) Roughness; 12) Echoes; 13) Emptiness; 14) Simplicity and inner calm; 15) Non-separability.
These 15 properties are not independent. They overlap.
From these 15 geometrical characteristics he constructed 253 patterns, which he described in that book, also called "AIS book", after the initials of its authors: Alexander, Ishikawa and Silverstein (see Bibliography). Examples of architectural patterns used by Alexander are: promenade, gallery, shared patio, parking, etc. The book had a great impact in its time, and has been one of the best-selling books on architecture. In fact, it has become something of a bible for architects. Another later book by Alexander that delves into the subject of patterns is "The Timeless Way of Building", in which he advocates an architecture in intimate fusion with nature.
In later books (Nature of Order series), Alexander delved deeper into the philosophical aspects of pattern. His central concept is that of "creative unfolding," a metaphor for the growth of the human embryo, a process of increasing complexity:
Nature is the totality of life unfolding continuously. The unfolding of a living structure has its analogy with the unfolding of buildings and the planning of cities.
Patterns are processes and not mere objects or inert constructions. These processes are capable of generating a living structure.
The 15 geometric features characterize living systems.
In good design is life, as regions of space amplify each other to create a higher wholeness.
Each spatial region is a "center", which is not an isolated entity, but an embedded field within a higher system, with gradually decreasing contextual influences. It is a geometric holism.
A good design cannot be reduced to its constituent elements, but the elements must be considered totalities, each supporting and amplifying each other in an interwoven totality.
Patterns are living, interacting geometries, such that life in the universe does not emerge from complex interactions of an essentially dead universe, but rather, to a greater or lesser degree, emerges from pure geometric order, from its pure geometric essence. In this sense, Alexander follows the philosophy of Whitehead, Bergson and others.
Form evolves in any context and is governed by intrinsic forces that have to do with geometric configurations.
Everything that exists contains life and the degree (greater or lesser) to which it manifests itself can be determined objectively by the internal (subjective) world.
Beauty is a resonance between objective forms and internal, subjective sensations.
A pattern represents a qualitative essence of a problem (revealing its true identity) and a solution that harmonizes and balances its internal forces.
All good designs share "the quality that cannot be named", something that cannot be expressed in a formal way. These good designs can be described as living, complete, free, exact, objective and eternal.
Some reflections by Alexander:
"A pattern language gives anyone who uses it the power to create an infinite variety of new and unique constructs, just as a common language gives you the power to create an infinite variety of sentences."
"A pattern describes a problem that occurs over and over again in our environment, then describes the core of the solution to that problem in such a way that that solution can be used over a million times without doing it even twice in the same way."
"Each pattern is a three-part rule, expressing a relationship between a context, a problem and a solution. Like an element in the world, each pattern is a relationship between a context, a system of forces that occur repeatedly in that context, and a spatial configuration that allows those forces to resolve each other."
Alexander established a new theory of the nature of space and matter and their relationship to our consciousness, to our view of the world. His theory attempts to avoid the schism between the objective and the subjective.
The 253 patterns proposed by Alexander are just one example. Each particular community or group must design its own set of patterns. Although there are also archetypal or essential patterns, which are patterns common to all human beings.
With architectural patterns, a structural view is available, a high-level abstraction, which facilitates the work of designers. It would even allow users to make their own designs, the ones suited to their needs.
Alexander was also a pioneer of CAD (computer-aided design) methodology. His book "Notes on the Synthesis of Form" is a classic in the field. He was also part of the group of scientists who developed Systems Theory (along with Herbert Simon).
Although Alexander applied the pattern language to architectural design, his system has transcended the discipline of architecture, having had a major influence in different domains, where this generic philosophy can also be applied. The idea of pattern language is universal, it is applicable to any domain that requires design engineering. In fact, its way of presenting patterns has inspired computer scientists, who have applied its creative ideas to software design. In this sense we speak of "software architecture" instead of "software engineering". Alexander was as influential in his time as Edsger Dijkstra's structured programming. He has also influenced the modern movement called "Extreme Programming", XP.
The concept of pattern
A pattern can be defined as a unit of information that captures the essence of a family of solutions relative to a problem (or set of problems) within a certain domain or context.
A well-structured system can be systematized by patterns. Patterns can be defined at different levels of abstraction. They have the following characteristics:
They help the designer to discover the most important problems of a domain.
They synthesize proven, effective and useful solutions. Solutions must be non-obvious. They capture good practices. They have a strong pragmatic basis, a product of experience.
They encode the specific knowledge accumulated by experience in a given domain.
It is an effective system of transmitting experience. They reduce the learning curve in non-expert designers.
They are not a solution in themselves, but are descriptions of effective solutions, the result of experience. The patterns are a starting point, not a destination.
The design of a system is related to the function it has to perform. This is why similar functions share a common design, with similar design patterns, allowing to establish analogies between systems. It is the old principle of "function creates form".
Pattern language
Just as patterns have semantics and syntax, design patterns must be related to each other through a pattern language. A pattern language can be defined as a system for describing a series of elements (patterns) and their relationships, so that good solutions to the different problems that appear in a specific context can be constructed.
A pattern language is composed of a set of basic patterns and a set of combinatorial rules of those patterns (its grammar).
A pattern language must have the following characteristics:
It must be easily understandable.
It must be practical and useful in solving a category of problems.
It must provide a discipline for problem solving.
It should enable the identification of relationships between patterns and facilitate their connection.
It must provide combinatorial flexibility, offering design alternatives.
A pattern language provides a common formal language between specialists of a domain, a conceptual reference of the domain. It is really a metalanguage.
Software patterns
Software patterns have been applied to many areas of computer science, although mainly in object-oriented software design. The goal is the same as in architecture: to reduce complexity, formalize knowledge of good solutions and even make program development easier for users.
In 1987 Ward Cunningham and Kent Beck developed 5 patterns of human-computer interaction (see Bibliography).
The most famous catalog of software patterns is included in the book by Gamma et al. [2002], also called "GoF book" (Gang of Four), after its four authors. This book had a great impact on the computer world. They started collecting patterns in 1990 and published it in 1994. It includes 23 patterns divided into 3 categories: object creation, structural (adapter, bridge, proxy, etc.) and behavioral (observer, visitor, mediator, interpreter, etc.). An example of a text editor design is presented in chapter 2.
Ward Cunningham has created the "Portland Pattern Repository" on the Internet, with hundreds of patterns in different fields, including many on Extreme Programming (eXtreme Programming).
Other well-known pattern systems are POSA [Buschmann et al., 1996] and PEAA [Fowler, 2003]. In POSA, three categories of systems are considered: distributed, interactive and adaptive. In PEAA the following categories are considered: layers, logic, databases, web presentation, concurrency, session states and distribution.
Critique of software patterns
There has been much criticism of the use of software patterns. In fact, the GoF was subjected to a show-trial in which they were accused of "crimes" against computer science. Some of the criticisms are:
There is no formal language. A natural language is used for its representation.
Many patterns are not really necessary because high-level languages (such as Lisp or Dylan) already support them.
To use a pattern you have to copy it. There are no mechanisms for labeling and cataloging patterns.
Patterns are not directly implementable, since they are abstract descriptions, not detailed. They are not reusable classes or components or tools or code generators. Patterns have to be programmed into every application that uses them, which is technically a step backwards. In fact, many developers have turned patterns into reusable components.
Patterns are overly complex. This means that the pattern language is not powerful enough.
Pattern technology is borrowed from architecture, when in computer science there are already powerful abstraction mechanisms that do not differ significantly from patterns.
Excessive reliance on patterns means moving away from the implementation language and making implementation more difficult.
A flexible high-level language should allow designing and building with patterns, which can even become extensions of the language itself.
The documentation of a pattern is excessive and too literary. It includes aspects such as: name, context, problem, motivation, related patterns, applicability, examples, etc.
MENTAL as Universal Pattern Language
MENTAL can be used as a universal pattern language for the following reasons:
Universal semantic primitives are universal patterns, the patterns of consciousness. In addition to these universal patterns, specific patterns can be created by parameterized generic expressions. The number of parameters of a parameterized generic expression indicates its dimensionality. These specific patterns are reusable.
Higher order patterns (pattern patterns) can be created by combining lower level patterns.
It is applicable to a wide variety of domains, given its generic and flexible nature.
It allows to represent all kinds of expressions (objects, classes, procedures, functions, rules, events, etc.).
Allows to specify different levels of abstraction, from the most generic to the most detailed.
Allows you to use parameters in all kinds of expressions. A parameter is not just a value; it can be any expression (a rule, a code segment, etc.), including higher-order parameters (parameter parameters).
Allows to unify design and executable code, i.e. design and programming patterns (knowledge and practical utility).
Allows to create patterns of the language itself and patterns of applications.
Addenda
Antipatrones
Just as patterns are good solutions to problems, antipatterns are bad solutions to problems. Anti-patterns are also documented, as they alert designers not to choose wrong paths. The book "AntiPatterns" [Brown et al., 1998] describes many software antipatterns.
Bibliography
Patterns in architecture
Alexander, Christopher. Tres aspectos de matemática y diseño. Tusquets, Barcelona, 1969.
Alexander, Christopher; Ishikawa, Sara; Silverstein, Murray. El lenguaje de patrones. Gustavo Gili, Barcelona, 1980.
Alexander, Christopher. The Oregon Experiment. Oxford University Press, 1975.
Alexander, Christopher. El modo intemporal de construir. Gustavo Gili, Barcelona, 1981.
Alexander, Christopher. The Phenomenon of Life: Nature of Order, Book 1: An Essay on the Art of Building and the Nature of the Universe (The Nature of Order). Center for Environmental Structure, 2004.
Alexander, Christopher. The Process of Creating Life: Nature of Order, Book 2: An Essay on the Art of Building and the Nature of the Universe (The Nature of Order). Center for Environmental Structure, 2004.
Alexander, Christopher. Notes on the Synthesis of Form. Harvard University Press, 2006. Presenta un método para desarrollar la creatividad y crear nuevos conceptos.
Alexander, Christopher. La estructura del medio ambiente. Tusquets, 1980.
Alexander, Christopher. Tres aspectos de matemática y diseño. Tusquets, 1969.
Alexander, Christopher. Ensayo sobre la síntesis de la forma. Editorial Infinito, Buenos Aires, 1969.
Sitio web de Christopher Alexander: www.patternlanguage.com
Software patterns
Aedo Cuevas, Ignacio. Ingeniería de la web y patrones de diseño. Pearson Alhambra, 2005.
Ambler, Scott W.; Hanscome, Barbara. Process Patterns: Building Large-Scale Systems Using object Technology. Cambridge University Press, 1998.
Brown, William; Malveau, Raphael; McCormick, Skip; Mowbray, Tom. AntiPatterns. Refactoring Software, Architecture and Projects in Crisis. Wiley, 1998.
Buschmann, Frank; Meunier, Regine; Rohnert, Hans; Sommerland, Peter; Stal, Michael. Problem-Oriented Software Architecture. Vol. 1: A System of Patterns. Wiley &Sons, 1996. (El sistema de patrones se denomina POSA, por sus iniciales).