Patterns in Architecture and Software

Recently, I started taking an architecture course, Building Beauty. While talking to friends and family, they asked me why. What does architecture even have to do with software?

In this post, I share an interesting connection between the work of architect Christopher Alexander and Software.

In programming, we are used to the term "pattern.” We use design patterns to solve common problems. It serves as a format and language for teams to improve code organization and reusability, among other benefits.

Where do patterns come from?

Alexander first introduced the concept of a pattern language in architecture in 1977 through the book A Pattern Language. Ward Cunningham and Kent Beck adapted the idea to object-oriented design, described a pattern language for programming, and introduced it to the community in 19871. Since then, patterns have been popularized, and hundreds of patterns have been developed.

Pattern languages inspired the computer programming field since the 80s. However, the point of a pattern language was not to have a neat format, solve common problems, or improve organization. Pattern languages (in architecture) were developed to generate coherent structures.

The fundamental goal of patterns was to create what Alexander calls a living structure2—a structure that is coherent with the whole and fosters life in a place. This is a more profound and moral idea, which I haven’t seen in software patterns literature.

Is the idea of living structure important for our discipline?

Patterns are not silver bullets. They can be destructive when misused. Using patterns does not necessarily lead to good software. A pattern is destructive when used for no specific reason or mechanically without considering the full context. So, maybe we are missing something. How can we know if a pattern generates a living structure in an abstract context such as programming?

It isn’t about forcing patterns whenever we can but finding why to use them, how they can enhance our programs, and how they benefit those who will use them. It’s mainly about how people feel when interacting with a program or a building.

In his latest book series, The Nature of Order, Alexander describes in great detail how to generate living structures using patterns. It’s a fascinating work, but despite inspiring software pioneers, it remains underrepresented in the modern software industry.

Understanding the deeper purpose behind pattern languages can transform our approach to software development. It's not just about solving technical problems or following trends but about creating harmonious and user-centric systems.

If there is a connection or parallel with software, and if Alexander’s theories, tools, and methods can continue being conceptualized into software design, programming, user interfaces, and processes, then it can help us build better things. We could objectively create better software, leading to life-enhancing computer experiences.


References

Footnotes

  1. Using Pattern Languages for Object-Oriented Programs

  2. Alexander explains the foundation of patterns in PLOP talk 1996