Difference between revisions of "Patterns"

From HaFrWiki
Jump to: navigation, search
m (Classification)
m (Introduction)
Line 1: Line 1:
 
{{TOCright}}
 
{{TOCright}}
 
== Introduction ==
 
== Introduction ==
Patterns exist in nature (Dunes, Grand Canyon), art (Modern, Impressionism), science and mathematics (Fractals, Crystals) and Computer Science (Design Patterns).  
+
Patterns exist in nature (Dunes, Grand Canyon), art (Modern, Impressionism), science and mathematics (Fractals, Crystals) and Computer Science (Design Patterns).
 +
 
 +
Christopher Alexander says, ''Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice'' <ref>Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King, and Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977.</ref>. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns
 +
 
 +
Designing object-oriented software is hard, and designing reusable object-oriented software is even harder.
 +
Experienced object-oriented designers will tell you that a reusable and flexible design is difficult if not impossible to get "right" the first time.
 +
Before a design is finished, they usually try to reuse it several times, modifying it each time. <ref>Design Patterns: Elements of Reusable Object-Oriented Software, 1994, ''The Gang of Four (GoF), ISBN 0-201-63361-2, Authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides with a foreword by Grady Booch. There are PDF files of the book on the internet.</ref>
  
 
== Computer Science Patterns (Design Patterns) ==
 
== Computer Science Patterns (Design Patterns) ==

Revision as of 10:42, 18 June 2017

Introduction

Patterns exist in nature (Dunes, Grand Canyon), art (Modern, Impressionism), science and mathematics (Fractals, Crystals) and Computer Science (Design Patterns).

Christopher Alexander says, Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice [1]. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns

Designing object-oriented software is hard, and designing reusable object-oriented software is even harder. Experienced object-oriented designers will tell you that a reusable and flexible design is difficult if not impossible to get "right" the first time. Before a design is finished, they usually try to reuse it several times, modifying it each time. [2]

Computer Science Patterns (Design Patterns)

All well-structured systems are full of patterns. A pattern provides a common solution to a common problem in a given context. A mechanism is a design pattern that applies to a society of classes; a framework is typically an architectural pattern that provides an extensible template for applications within a domain.

Patterns are used to specify mechanisms and frameworks that shape the architecture of your system.

Classification

top

Design Pattern Sub-Design Pattern
Fundamental Delegation
Functional
Interface
Proxy
Immutal
Marker Interface
Creational Abstract Factory
Anonymous Subroutine
Builder
Factory Method
Lazy initialization
Prototype
Singleton
Structural Adapter
Bridge
Composite
Container
Decorator
Extensibility
Facade
Flyweight
Proxy
Pipes and Filters
Private Class
Design Pattern Sub-Design Pattern
Behavioral Chain of responsibility
Command
Event listener
Interpreter
Iterator
Mediator
Memento
Observer
State
Strategy
Template method
Visitor
Single-serving visitor
Hierarchical visitor
Concurrency Action at a distance
Active Object
Balking pattern
Double checked locking
Guarded suspension
Half-Sync/Half-Async
Leaders/followers
Monitor Object
Read write lock
Scheduler
Thread pool
Thread-Specific Storage
Event handling  
Architecture  

See also

Modeling

Books

top

Reference

top

  1. Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King, and Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977.
  2. Design Patterns: Elements of Reusable Object-Oriented Software, 1994, The Gang of Four (GoF), ISBN 0-201-63361-2, Authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides with a foreword by Grady Booch. There are PDF files of the book on the internet.