Object Thinking kitabını okurken karşıma çıkan önemli bir bölümü not alayım. Chapter 5: Vocabulary: Words toThink With – Extension Terms (linkler ve vurgular bana ait).
Pattern is a term with one description and at least two meanings. The common description is, “A named solution to a recurring problem-in-context that has instructional value.” The original meaning of pattern came from Christopher Alexander and reflected his focus on the problem space?a pattern was observable in the world, it could be described, and the description could be used to replicate the pattern when useful. The most common meaning of the term comes from the book Design Patterns, by the Gang of Four (GoF) ?Erich Gamma, Richard Helms, Ralph Johnson, and John Vlissides? for whom a pattern is a programming design solution to a recurring programming problem.
Most of the people using the term have been inspired by the work of Christopher Alexander, an architect who proposed a pattern language of design parameters that would allow the construction of anything from an “independent region” to a montage of photos on the wall of a dwelling.
Alexander’s goal was the discovery of the principles behind a “Timeless Way of Building“, including structural, organizational, and aesthetic elements. Alexander?s work tends to oscillate between the highly pragmatic and the semimystical. It?s unsurprising that his work is subject to a wide range of interpretation. In fact, the intensity of argument regarding what patterns really should be is rivaled only by that of the original arguments about object programming.
Richard Gabriel, James Coplein, et al. represent those who believe that the semimystical aspects of Alexander represent the true essence of his message. For them, a pattern ?and even more important, a pattern language? is quite different from what has been popularized as a pattern. The popular GoF view presents patterns as elegant solutions to discrete design problems. Numerous patterns of this sort might be incorporated into any given application.
Patterns for object thinkers are mental shortcuts or cues that direct thinking along known paths and facilitate the discovery of a problem solution. Of course, this means that the patterns themselves must be consistent with object thinking philosophy and principles, or their use will be counterproductive.
Patterns most useful to object thinkers should be derived from the problem domain, just as objects are. They should facilitate thinking about coordination and scripting of objects or about useful ways of assembling objects into components or applications. They could be considered Alexandrian patterns. Few of the patterns (about 6 of the 23) presented in the GoF book satisfy this demand. Martin Fowler?s book on Analysis Patterns presents examples derived from a domain and is much closer to Alexander?s intent than the GoF book.
Patterns that reflect the solution space are useful to the object thinker but in a very different way. If you have thought about and designed an object solution to a problem, you must still implement your solution using a programming language. Not all languages directly support object ideas, and many languages contradict object principles. If you must use such a nonoptimal language, design patterns of the sort in the GoF book provide insights that can minimize the distortion caused by the implementation language.
GoF patterns might better be called implementation patterns than design (or thinking) patterns. Other types of implementation patterns would include the coding standards that constitute one of the twelve XP practices. In particular, programming idiom or style provides a powerful pattern for implementation as well as for communication among developers. Apple?s style guide for Macintosh GUIs, Kernigan and Ritchie?s style for the C programming language, and Kent Beck?s Smalltalk Best Practice Patterns are all examples of programmer idiom.