As various pattern FAQs has already been posted in my colleague’s blogs and they have done a wonderful job answering them, I would rather not restate the same Questions and answers. I believe, the main purpose of Patterns Blogs is to share knowledge about patterns. Therefore, I tried to find out the answers of the issues and questions that came out during the class and from my individual thoughts about Patterns.
1. Where does pattern exist? In which fields is pattern used?
Starting from Civil Engineering with Christopher Alexander, the study and use of pattern has come a long way. Pattern is no longer the new kid in the block. It has left it’s footprint in many areas. In fact, there is pattern everywhere. Golden Ratio is a recurring theme found in nature that states a+b to a is as a is to b. It also has a direct relation to Fibonacci number. Pattern exists is the spirals of flowers as well as to the symmetry of human body which was expressed by Leonardo Da Vinci in his famous art Vitruvian Man.
"A pattern has an integrity independent of the medium by virtue of which you have received the information that it exists. Each of the chemical elements is a pattern integrity. Each individual is a pattern integrity. The pattern integrity of the human individual is evolutionary and not static." [5]
After Alexander discovered the problem solving methodology using pattern, it has been implemented in many fields/areas. For example, Civil engineering, Computer Science, Art, Science and Mathematics, Geometry, Music, Psychology, Ethology and so on. [6][7]
2. How does pattern solve a problem?
A pattern does not solve a problem itself. However, patterns define a recurring problem, its context and the solution. Therefore, for a particular problem the user search for the particular pattern, checks if the context is the same and if yes, the pattern is implemented. And that is how pattern solves a problem.
3. How did Design Patterns evolve?
Since the civil engineer Christopher Alexander discovered the idea of patterns; it has come a long way being implemented in many sectors including Software Engineering. Software design patterns are structural idioms used in the development of software systems. Many design patterns have qualities that should allow them to accommodate a wide variety of change over time. However, to date there has not been any analysis of how design patterns actually did evolve over time. [1] Let’s take a brief look at the evolution of Software Patterns.
In their early years, patterns have been mainly used within the community close to the group that described them. A number of fundamental patterns have been refined, in particular at the level of design [2], and are now widely used among software engineers. They are involved in the construction of most medium-size and large object-oriented systems. Some have also been integrated in programming platforms, such as Java, becoming thus readily available for application programming. As the result of almost a decade of pattern mining [Described in Question 5], a large quantity (hundreds) of patterns have been described, reviewed, and catalogued. However there have been few initiatives to structure and organise this knowledge [3] into a consistent representation framework.
The rate of growth varies with respect to the level of abstraction--with reference to the specification of a solution--but more so with the level of generality--with reference to the reusability across application domains. General or core patterns tend to be considered as fundamental abstractions and, in time, become integrated into programming languages and tools. Their number is limited and essentially constant. A rate of growth is displayed by patterns specified at the level of middleware. This is because software applications are increasingly complex and, thus, have to be developed around middleware platforms (e.g. J2EE). A higher rate can be predicted at the level of particular application domains or within particular software development companies. Patterns can naturally describe expertise regarding a specific software development application. Furthermore, they can also naturally express specific policies regarding software development within different organisations. The focus, here, is on promoting the use of explicit, locally defined constructs, motivated by concerns like quality, security, performance or code management.
4. What is the structure of a pattern?
According to Alexander, “Each pattern is a three part rule, which expresses a relation between a certain context, a problem and a solution”. [4] So, the problem, the context and the solution are the main components of a pattern. But in some cases they mention a few more points apart from these. For example, we can mention the pattern components used in Lucent telecommunication products such as the Switching System® (extracted informally from Adams, 1996): [4]
Ø Name
Ø Problem
Ø Context
Ø Forces
Ø Solution
Ø Resulting context
Ø Rationale
But we might not use all of them. According to the discussion in the class, we can use the following standard components.
Ø Name: Name of the problem
Ø Problem: Description of the problem
Ø Context: Every problem should have a definite context. A pattern is never a solution to all problems under all different contexts. Therefore, in the context section, we clearly define the context of the particular problem.
Ø Solution: The solution to the problem
5. How do I write/document/preserve a pattern for future use?
Writing good patterns is very difficult. Patterns should not only provide facts (like a reference manual or user's guide), but should also tell a story which captures the experience they are trying to convey. A pattern should help its users to:
Ø Comprehending existing systems
Ø Customizing systems to fit user needs and
Ø Constructing new systems.
The process of looking for patterns to document is called pattern mining (or sometimes reverse-architecting).
The best way to learn how to recognize and document useful patterns is by learning from others who have done it well! Picking up several books and articles which describe patterns (don't choose just one) and trying to find if you all the necessary pattern elements and desirable qualities can be recognized that were mentioned in Question 4.
Further assistance for writing a pattern, or a pattern language, may be found in Ward Cunningham's "Tips for Writing Pattern Languages", and in Gerard Meszaros' and Jim Doble's "A Pattern Language for Pattern Writing". Both of these papers are indispensable resources for writing patterns and pattern languages. So, how do the experts decide what makes a good pattern? The PLoP conferences have several criteria which they feel submitted pattern papers should meet. These are as follows (summarized from Buschmann et. al. in Pattern-Oriented Software Architecture):
Ø Focus on practicability: Patterns should describe proven solutions to recurring problems rather than the latest scientific results.
Ø Aggressive disregard of originality: Pattern writers do not need to be the original inventor or discoverer of the solutions that they document.
Ø Non-anonymous review: Pattern submissions are shepherded rather than reviewed. The shepherd contacts the pattern author(s) and discusses with them how the patterns might be clarified or improved upon.
Ø Writer's workshops instead of presentations: Rather than being presented by the individual authors, the patterns are discussed in writer's workshops: an open forum where all attending seek to improve the patterns presented by discussing what they like about the patterns as well as other areas in which they are lacking.
Ø Careful editing: The pattern authors have the opportunity to incorporate all the comments and insights during the shepherding and writer's workshops before presenting the patterns in their finished form.
6. Does using pattern bar/prevent innovation? Why?
In today’s class we had an argument about using pattern? The argument was does pattern bar innovation, because some individuals just go for the patterns to solve a particular problem. Therefore, patterns stand on the way of inventions.
My opinion is NO, patterns don’t bar innovations. Pattern is there to be a proven solution for a particular problem. It is a reusable solution that can be applied to recurring problem. But that doesn’t mean someone must use that solution and he/she can’t create a solution of his/her own. Patterns came from the idea of making life easier and to provide expert knowledge in a field. Let’s take Software Development as an example; there are so many different methodologies to develop software. There is the traditional scripting method and there is OOP. OOP is proven to be a very good methodology as it creates reusable classes and methods. But that doesn’t definitely mean that someone can’t use VB 6.0 instead of VB .NET (OOP structured). A developer can still use VB 6.0 and create or use his/her own problem solving methods. Hence, my opinion is, NO, patterns doesn’t bar/prevent individuals from creating new methodologies or problem solving solutions.
Reference:
[1] Design Pattern evolution [Online]
Available from URL:
http://www.cse.ucsc.edu/classes/cmps290g/Winter07/term-project.html
[Accessed on: 15 March, 2007]
[2] Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995)
[3] Gamma, E.: Design patterns ten years later. In Broy, M., Denert, E., eds.: Software Pioneers: Contributions to Software Engineering, Springer-Verlag (2001) 689-699
[4] A pattern definition [Online]
Available from URL: http://hillside.net/patterns/definition.html
[Accessed on: 15 March, 2007]
[5] R. Buckminster Fuller (1895-1983), U.S. American philosopher and inventor. Critical Path, 1981
[6] Patterns [Online]
Available from: http://en.wikipedia.org/wiki/Pattern
[Accessed On: 29 March, 2007]
[7] Pattern [Online]
Available from: http://www.answers.com/pattern&r=67
[Accessed On: 29 March, 2007]
Monday, 12 March 2007
Subscribe to:
Post Comments (Atom)
2 comments:
Hi Zaman
Thanks a lot for publishing Pattern FAQ section. Because I was able to clear one of my doubts, after reading “How do I write?, document and preserve a pattern for future use” section.
Well done
Hi M Nuruzzaman
Thanks for your Pattern's FAQ. I do agree with most of your answers to the questions you came up with. patterns do exist in every aspect of life. I do believe in the application/ use of a well proven catalogue pattern as it can really save time and cost, especially in software development.
Cheers
Marville
Post a Comment