Skip to content.

Sections
Personal tools
You are here: Home » コミュニティ » XP-jp » XP関連記事 » XP and Patterns Ralph Johnson's View

Document Actions

XP and Patterns Ralph Johnson's View
[Japanese]

Ralph Johnson   http://st-www.cs.uiuc.edu/users/johnson/
(edited by Kenji Hiranabe)
Date:2002, 12/7

Very often, questions like;

"Are there any links between XP(Extreme Programming) and Patterns?"

are asked. The following two articles are Ralph Johnson(one of the GoF ... authors of Design Patterns)'s view in response to those questions. They are originally discussed in the 'pattern-discussion@cs.uiuc.edu'mailing list (edited Kenji Hiranabe).
   Re: Patterns, QWAN and Extreme Programming

Subject: Re: Patterns, QWAN and Extreme Programming
From: Ralph Johnson < johnson@cs.uiuc.edu >
To: Michael.Pont@tesco.net, patterns-discussion@cs.uiuc.edu
Date: Tue, 12 Feb 2002 06:13:39 -0600 (CST)

> From: "Michael Pont" < Michael.Pont@tesco.net >

> Can anyone recommend any (good) papers, etc, that discuss the links between
> XP and patterns?

As far as I know, there are none. The closest is one by Joshua Kerievsky(*1)that argues that patterns and XP go together, but it isn't really about the links. There are extremely strong links, which isn't surprising if you realize that the same people invented both of them, that they both grew out of the same little corner of the programming community. So, there are VERY strong social connections, and there are also strong philosophical connections. I think the latter are due to the former.

The way I tell the story, Kent Beck invented both XP and patterns. "Invented" is too strong a word, since all his good ideas were learned with Ward Cunningham. But Kent is the salesman/publicist, and he got other people involved. Ward and Kent discovered Christopher Alexander in the mid 80's, and spent several years trying to get other people to take him seriously. I read A Timeless Way of Building (*2) and A Pattern Language (*3) in 1988 or 1989, and thought it was interesting, but couldn't see how to apply it. At OOPSLA'90, Kent and I worked on a pattern language for Hotdraw (*4) and I was converted into an Alexander fan. Kent had a workshop in Colorado in 1993 where he convinced Jim Coplien and Grady Booch that patterns were important. As far as I know, all the early XP leaders were either from the patterns community or from the Smalltalk community.

Kent took a different approach to marketing XP than he did to marketing patterns. One of the many differences was that none of his XP literature depends on Chistopher Alexander. I think that he thought that pointing typical software developers to Alexander was a mistake, because they wouldn't understand him and talking about Alexander's ideas tended to make people go off-topic very fast. He wanted people to stick to talking about software. He figured that the people who would get a lot out of Alexander would read him anyway because of the patterns literature. Nevertheless, XP is based on Alexander's ideas just as much as patterns are. (Note that software patterns are certainly not 100% Alexanderian)

When I read Alexander the first three or four times, the ideas that caught my attention were extreme incremental design and the evil of master plans. He claimed that the best places were designed by a lot of people over time and that their coherency proved that these people shared a common set of patterns, since they did not share a master plan. Alexander thought of patterns as transformations to a design.

Kent thought that the patterns in Design Patterns (*5) were too big. (See "Smalltalk Best Practice Patterns" (*6) ). His idea of patterns were more like the catalog of refactorings that Martin Fowler eventually wrote (*7). But XP itself is a sort of pattern language. I think Kent was influenced by Jim Coplien's process patterns. Patterns in "Design Patterns" and "Smalltalk Best Practice Patterns" are product patterns. XP is a set of process patterns (*8). But if you think of XP as a set of process patterns, it is a very well defined pattern language that is Alexanderian in many ways. In particular, it is generative. There are no patterns for reliability or ease of understanding, but the "practices" work together to generate systems that are reliable and easily understood. Like patterns, each practice has a name and can be learned on its own. Like patterns, practices work together and the whole is greater than the sum of its parts. It is extremely iterative, and plans as little as possible.

So, in my opinion, XP is a pattern language for software development that shows how to use Alexander's style of development for software.

-Ralph


   Re: Do design sequences make sense for software?

Subject: Re: Do design sequences make sense for software?
From: Ralph Johnson < johnson@cs.uiuc.edu >
To: Mike Beedle < beedlem@e-architects.com >, < patterns-discussion@cs.uiuc.edu >
Date: Wed, 04 Dec 2002 07:16:45 -0600

On 11/28/02 7:12 AM, "Mike Beedle" < beedlem@e-architects.com > wrote:

> Some of the most important overlap between Agile processes and
> the Alexanderian style of building things is in the nature of its
> underlying process:
>
> - teams of self-organized individuals create
> high quality emergent products by fostering dense social
> interactions, based on cycles of inspection and adaptation,
> through piecemeal growth.

I am amused when people say that XP conflicts with the QWAN, or that patterns are incompatible with XP. As far as I am concerned, patterns and XP are "the first try" and "the second try" of Kent Beck to put Christopher Alexander's ideas into practice. Both of them are derivatives of the Alexanderian philosophy. XP is more derived from Christopher Alexander's work than "Design Patterns" (*5), because Kent was more strongly influenced by Alexander than any of the gang of four.

When I read "A Timeless Way of Building" (*2) back in 87 or 88, I was most attracted by its emphasis on piecemeal growth. Peacemeal growth is the way nature works, it is how you get the QWAN, it is the ideal. Software engineering tends to denigrate piecemeal growth. I'm a fan of refactoring (*9), so I resonated with it right away. XP emphasizes this more than the pattern literature. A lot of people read "Design Patterns" and think that they are supposed to use the patterns in up-front design. We didn't say that, but they are reading their assumptions into it. The GOF are fans of piecemeal growth, but we didn't make that point in our book, and few pattern writers do. When it comes to piecemeal growth, XP is more Alexanderian than most patterns literature.

Kent thought that "Design Patterns" did not emphasize emergent properties enough, that they weren't "generative" enough. XP emphasizes this much more. XP is propagated by a dozen patterns (there are actually a lot more) that do not mention things like "ease of change" or "reliability" but that are supposed to generate these properties if you follow the patterns. XP proponents claim that XP projects are more predictable and more likely to deliver software on time, even though XP downplays long-term schedules.

On Kent's second try, he very carefully avoided mentioning Alexander. Perhaps he thought that Alexander just confused people, and that it was better to avoid ideas like the QWAN. So, he invented a whole bunch of new vocabulary to convey these ideas, things like "code smell" and "do the simplest thing that could possibly work". It reminds me of what Gregor Kiczales has done repackaging reflection and calling it aspect-oriented programming (*10). If your ideas aren't selling in one package, repackage them and see if you can reach a different market with them. It is a good strategy.

So, as far as I am concerned, Kent started two movements that are based on Alexaderian philosophy, and the fact that we talk about Alexander more than the XP crowd doesn't mean that we are closer to Alexander than they are.

-Ralph


   References(by editor)


Kenji Hiranabe <hiranabe@esm.co.jp>
Last modified: Tue Jan 28 09:16:37 2003