![]() ![]() Patterns And ArtJames O. Coplien, Bell LabsC++ Report 12(1), January 2000, pp. 41 - 43
IntroductionHello, hello... If you're reading this, then, congratulations, it's a sign that some computers indeed have survived until Y2K and that there may after all be hope for humanity. Welcome to a new millenium. Back in September I gave a keynote in Oxford Union for the ACCU conference. It was my first time there though Francis Glassborow has been encouraging me to drop by for years. It was a great program in a wonderful venue along with many of my favorite people, and I'll surely go back. Reflecting on what I should say in way of a keynote, I settled on talking about some broad changes I've seen happening in the industry. Many of these themes came together at the GCSE (Generative and Component-Based Software Engineering; see http://www-stja.transit-online.de/gcse/) conference at Messe Erfurt in Germany two weeks later, where I gave the same keynote to a different audience. I'll explore those themes further in this article. But more to the point here, any musings on new software directions should place patterns in their proper context. Though my keynote focused on the material outside patterns, here I'll focus on the pattern-centric worldview. The Arts and Crafts MovementThe Great Exhibition of 1851 in the Crystal Palace of London was an important event in the history both of industrialization and of art. The exhibition popularized mass-produced furniture, household objects that would grow in use at the expense of hand crafted works over the next decade. The Arts and Crafts movement in 1861 was a reaction against this mechanization, a return to the values of hand crafted objects, of "honest art", a value that had weakened since the industrial revolution. But critics called it "The work of a few for a few." It was costly and didn't fit the opportunities offered by the industrial era. The movement all but died out until experiencing a resurgence at the hands of the Arts and Crafts exhibition society in London starting in 1888. The movement slowly showed that industrial goods could have some of the lustre of hand crafted works through the sponsorship of pioneers like the architect (of buildings, not software) Wright and the artist Mackintosh (the Scot, not the computer). This perspective was having strong influence by the turn of the century and ushered in Art Nouveau and Bauhaus. Art NouveauArt Nouveau (in German, Jugendstil)--inspired by nature and featuring Tiffany lamps and similar works--gained favor around1900. Artists, artisans and architects drew on the art of Java (the island, not the language) to produce an art that aimed at the enlightened elite and nouveau riches. It lasted only a decade or so. Its adherents such as Munch and Toulouse-Lautrec found it more suitable to the industrial age than the classical Ecole des Beaux Arts. In Vienna, there was a branch of Art Nouveau known as the Secession Movement. This movement would more fully integrate art and industry and eventually ushered in Art Deco. Art DecoArt Deco pushed the pendulum back; Art Nouveau had moved away from some folk art principles, and Art Deco restored them. It was characterized by classic motifs reduced to geometric stylizations, and featured artists such as Gustav Klimt (The Kiss). Together with Bauhaus, Art Deco achieved an integration of industry and art that the world had been seeking since the industrial age. On to modernism and softwareSoftware, too, has seen this see-saw between art and science, between craft and mechanization. Early software was a craft, a craft that perhaps reached its height in the Lisp hacker culture of the 1960s and 1970s. Then came structured design with its formalism and automation--an echo of the London Exhibition of 1851. The human side of software was repressed in the interest of making it a science. Objects came to the rescue in the 1980s and attempted to move the pendulum back the other way. Early object-oriented practice, particularly in Smalltalk, was reminiscent of the arts and crafts movement: building software in small shops, building small objects that were carefully hand crafted over time. But somehow Smalltalk didn't seem suited to the industrial age that demanded performance and that took advantage of advances in widespread conventional hardware architectures instead of custom hardware. This led to a later phase of objects where CASE tools, automation, and technology again took the lead. But this went beyond the artistic swing from Arts and Crafts to Art Nouveau, with a bit more of an industrial flavor aimed at enterprise software development. After art deco, the art world saw the advent of modernism starting in the 1900s and flourishing by the 1920s. Modernism appealed to intuition, influenced by the advent of modern psychology under the influence of Jung and Freud. Modernism celebrated the value of technology in art; it broke with structure in favor of abstract geometry in architecture, and free and sometimes even random verse in literature. There was a strong focus on language for its own sake, as one finds, for example, in the novels of James Joyce. It placed a strong focus on--now get this--objects, the individual artifacts from which things were built. And so, after following the cycles of the art world from classicism in its earliest days through industrialism in the structured analysis era, arts and crafts in the Smalltalk era, software embrace the modernistic world of objects. It was a break with structured programming to flatter approaches. In techniques such as CRC cards, it celebrated intuition above formalism. The focus on (programming) language resurged to levels unseen since the early days of the structured (programming) era. But it was a complex and diverse world. Some parts of software held onto the more artistic notions of design in ways more reminiscent of art nouveau, which would be the expected successor to the Arts and Crafts movement metaphor that held for the early Smalltalk era. Rooted in the dissatisfaction with both the individualism of craftsmanship and the technological agenda of modernistic object thinking, patterns came on the scene as a collection of postmodern ideas that were both humble and radical at the same time. We'll return to patterns shortly and explore their role in more depth. As far as the keynote goes, its goal was to show that the modern analog of Art Deco is a rich new movement taking place largely in Europe around the themes of generative programming, generic programming, intentional programming, aspect-oriented programming and, last but not least, multi-paradigm design. Generative programming goes beyond objects to focus on ideas. In aspect-oriented programming, one focuses on aspects like performance and look-and-feel instead of the underlying objects. In generative programming, one generates systems using objects as an underlying assembly language, using higher level expression for domain constructs of interest. And as conference attendees walked away from the keynote, they would see the techniques of generative programming, intentional programming, generic programming, and multi-paradigm design all thriving at the GCSE conference. These techniques have come into their own, and all seem to advocate the same kind of balance of technology and art that Art Deco brought to the art world. So, now, back to our question: Where does this leave patterns? Are the GCSE technologies the successor to patterndom? Objects were around from the mid-1980s through the mid-1990s, and though they didn't go away, patterns took the spotlight starting in the early- to mid-1990s. Patterns have been popular almost as long as objects were popular before patterns came along. Is it just that the masses have tired of that fad and are looking for another? Whither patterns?The question of where to place patterns in this progression is in fact a difficult one, though it seems simple at first glance. Patterns are a postmodern response to the reductionism and mechanization of that part of the object movement whose ideas paralleled those of modernism. Postmodernism discarded the objects of modernism in favor of ideas. So instead of finding all of the objects necessary to make a system function, we want to look more at the ideas that relate to human concerns. Traditional compositional strategies, intentionality, and themes from classicism dominate postmodernism. Instead of concretizing designs, postmodernism focuses on processes of change. Pattern Theory and PostmodernismIf you look inside the theory of patterns, it maps very closely onto the postmodern school of art. As regards mechanization, Alexander says: But though this method is precise, it cannot be used mechanically. ([Alexander1979], p. 12) Automation takes away control where you need it and makes it difficult to make fine-grain, piecemeal change. In software, much automatically generated code has very poor properties of continuity: Small changes lead to large recompilations, which is expensive in terms of time, distribution, target installation, etc. It leads to code that is hard to analyze (debug or evolve) to the degree the automation is non-linear. I've seen a lot of projects using Shlaer/Mellor-based CASE tools that become horridly gridlocked because of the mismatch between the automation structure and the structure of changes in the domain. In patterns, the human is the generator, the knower of the interweaving of patterns, so this is less of an issue. As regards objects, Alexander notes that "it's impossible to form anything which has the character of nature by adding preformed parts" ([Alexander1979], p. 368), and Our emphasis on objects, has blinded us to the essential fact that it is above all the genetic process which creates our buildings and our towns, that it is above all this genetic process which must be in good order... ([Alexander1979], p. 240) As regards compositional strategies, he says: Again, the patterns operate upon the whole: they are not parts, which can be added--but relationships, which get imposed upon the previous ones, in order to make more detail, more structure, and more substance -- so the substance of the building emerges gradually, but always as a whole, at each stage of its growth ([Alexander1979], p. 459) As regards classicism, Alexander writes: There is one timeless way of building. But, by contrast, in the early phases of industrial society which we have experienced recently, the pattern languages die. ([Alexander1979], p. 231) As regards change, Alexander writes: No building is ever perfect. So it's pretty clear that patterns are squarely situated in a postmodern mind set. Paradise MisplacedWhat's sad is that this is true only from a theoretical perspective. If you look at the practice of patterns, with very few exceptions, you'll see that pattern practice adheres to few of these principles. Let's have a peek at the literature: As regards automation, John Vlissides and his colleagues write: This paper describes the architecture and implementation of a tool that automates the implementation of design patterns. [Budinsky+1996] Shlaer and Mellor are even more incredible: [B]ecause all the code other than purchased packages is automatically generated, use of the patterns (archetypes) is absolutely required. If a pattern must be modified, the change is made and all affected system components are regenerated. ([SM1997], p. 63) These stand in contrast to Alexander's: But though this method is precise, it cannot be used mechanically. By "use", Alexander means "implement." That's what patterns do: They build things. As regards objects, Jiri Soukup says of his pattern classes: Shows how pattern classes encapsulate the high-level object-oriented design [Soukup1994] As regards compositional strategies, Walter Tichy says regarding compound patterns (whatever those might be): These patterns [such as Model View Controller] are composed from the others... Because compound patterns consist of several others... [Tichy1999] as contrasted with Alexander's "they are not parts, which can be added." And we've seen something similar in some recent columns here in C++ Report, too. These are very traditional compositional models unlike the way Alexander sees patterns composing. As regards classicism, the industry fascination is certainly with object-oriented patterns rather than patterns of the mature design structures of the past decades. Why? Because of the fascination with novelty, technology, and modernity. The software pattern movement is embedded not in postmodernism, but firmly in modernism. It is antithetical to most of what Alexandrian patterns stand for. Where are we?So, patterns, which came on the scene out of disenchantment with modernistic values, have rolled out in the industry to embrace those values. I don't think the above characterizations are caricatures or isolated cases; I think they represent how good, hard-working people are trying to take their understanding of patterns forward. Does this mean that the generative programming crowd indeed has moved further into the future than the pattern discipline has? Maybe. Maybe patterns tried to jump too far and stumbled over short-term focus. The generative programming community is making more deliberate and arguably incremental steps away from objects and towards ideas than patterns did. This is good news for the generative programming folks, and why I thought it would make a good keynote. But as I was speaking to the generative programming people I was thinking of the pattern folks in the back of my head and I started to worry; how would this talk play out to a patterns audience, emphasizing patterns instead of generative programing? The pattern state-of-the-practice as we roll into the new millennium fits squarely into where objects have been for at least a decade. That goes a long way to explain the success of works such as the GOF book. Metaphor and ThingThis column has taken art history as a metaphor to shed light on the evolution of recent software disciplines. But the artistic component in fact goes deeper than metaphor. Much of what we do is, in fact, art, and it's crucial that our industry find the right balance between art and science. The parallels to art history aren't accidental; they're isomorphic, shifted in time. I've always viewed patterns as an artistic adjunct to technology. Both art and technology have scientific aspects to them. I'm convinced that this balance of science, art, and technology can serve the software discipline well. But to do so, it will need to take a different heading than it is today; today, there is a bad imbalance away from the artistic component. Software has made precious little progress on patterns in the last millenium. Can we aspire to do better this one? More about that later. SignpostsSign up for ChiliPLoP, 13 - 16 March 2000, in Phoenix. And if you hurry, there still may be time to get in your papers for KoalaPLoP, 23 - 26 May, 2000, in Melbourne. And if you want to hear the talk that is the followup to this article, register for the Association of C and C++ Users Conference in Oxford, 24 - 25 March, 2000. See you there. [Alexander1979] Alexander, C. A. The Timeless Way of Building. New York: Oxford University Press, 1979.[Budinsky+1996] Budinsky, F. J., M. A. Finnie, J. M. Vlissides, and P. S. Yu. Automatic Code Generation from design patterns. IBM Systems Journal:35(2), 1996.
[SM1997]
Shlaer, S. and S. J. Mellor. Recursive Design of an Application-Independent Architecture. In IEEE Software:14(1), January/February 1997.
[Soukup1994] Soukup, J. Taming C++. Reading, MA: Addison-Wesley, 1994. [Tichy1999] Tichy, Walter. Compound Patterns. http://wwwipd.ira.uka.de/~tichy/patterns/compound.html. 14 October 1999. |

