23.07.2012 Views

Design Patterns Explained

Design Patterns Explained

Design Patterns Explained

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

194 Part IV • Putting It All Together: Thinking in <strong>Patterns</strong><br />

This was compounded by the fact that many key designers in the<br />

software community were espousing the development of "pattern<br />

languages"— looking for formal ways to apply Alexander to<br />

software. I interpreted this to mean that we were close to being<br />

able to apply Alexander's approach directly in software design (I<br />

no longer believe this to be true). Since Alexander said patterns<br />

in architecture had predetermined orders of context, I assumed<br />

patterns in software also had this predetermined order. That is,<br />

one type of pattern would always create the context for another<br />

type. I began to evangelize about Alexander's approach— as I<br />

understood it— while teaching others. A few months and a few<br />

projects later, I began to see the problems. There were cases<br />

where a preset order of contexts did not work.<br />

Having been trained as a mathematician, I only needed one<br />

counterexample to disprove my theory. This started me questioning<br />

everything about my approach— something I usually did, but<br />

had forgotten in my excitement.<br />

Since that early stage, I now look at the principles upon which<br />

Alexander's work is based. While they manifest themselves differently<br />

in architecture and in software development, these principles<br />

do apply to software design. I see it in improved designs. I<br />

see it in more rapid and robust analysis. I experience it every<br />

time I have to maintain my software.<br />

Summary<br />

In this chapter <strong>Design</strong> is normally thought of as a process of synthesis, a process of<br />

putting things together. In software, a common approach is to look<br />

immediately for objects and classes and components and then think<br />

about how they should fit together.<br />

In The Timeless Way of Building, Christopher Alexander described a<br />

better approach, one that is based on patterns:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!