Design pattern

Last updated

A design pattern is the re-usable form of a solution to a design problem. The idea was introduced by the architect Christopher Alexander [1] and has been adapted for various other disciplines, particularly software engineering. [2]

Contents

Details

An organized collection of design patterns that relate to a particular field is called a pattern language. This language gives a common terminology for discussing the situations designers are faced with.

The elements of this language are entities called patterns. Each pattern describes a problem that 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.

Christopher Alexander, A Pattern Language [1]

Documenting a pattern requires explaining why a particular situation causes problems, and how the components of the pattern relate to each other to give the solution. [3] Christopher Alexander describes common design problems as arising from "conflicting forces"—such as the conflict between wanting a room to be sunny and wanting it not to overheat on summer afternoons. A pattern would not tell the designer how many windows to put in the room; instead, it would propose a set of values to guide the designer toward a decision that is best for their particular application. Alexander, for example, suggests that enough windows should be included to direct light all around the room. He considers this a good solution because he believes it increases the enjoyment of the room by its occupants. Other authors might come to different conclusions, if they place higher value on heating costs, or material costs. These values, used by the pattern's author to determine which solution is "best", must also be documented within the pattern.

Pattern documentation should also explain when it is applicable. Since two houses may be very different from one another, a design pattern for houses must be broad enough to apply to both of them, but not so vague that it doesn't help the designer make decisions. The range of situations in which a pattern can be used is called its context. Some examples might be "all houses", "all two-story houses", or "all places where people spend time".

For instance, in Christopher Alexander's work, bus stops and waiting rooms in a surgery center are both within the context for the pattern "A PLACE TO WAIT".

Examples

Business models also have design patterns. [4] See Business model § Examples.

See also

Related Research Articles

In computer programming and software design, code refactoring is the process of restructuring existing source code—changing the factoring—without changing its external behavior. Refactoring is intended to improve the design, structure, and/or implementation of the software, while preserving its functionality. Potential advantages of refactoring may include improved code readability and reduced complexity; these can improve the source code's maintainability and create a simpler, cleaner, or more expressive internal architecture or object model to improve extensibility. Another potential goal for refactoring is improved performance; software engineers face an ongoing challenge to write programs that perform faster or use less memory.

<span class="mw-page-title-main">Unified Modeling Language</span> Software system design modeling tool

The unified modeling language (UML) is a general-purpose visual modeling language that is intended to provide a standard way to visualize the design of a system.

The state pattern is a behavioral software design pattern that allows an object to alter its behavior when its internal state changes. This pattern is close to the concept of finite-state machines. The state pattern can be interpreted as a strategy pattern, which is able to switch a strategy through invocations of methods defined in the pattern's interface.

In software engineering, a design pattern describes a relatively small, well-defined aspect of a computer program in terms of how to write the code.

A pattern language is an organized and coherent set of patterns, each of which describes a problem and the core of a solution that can be used in many ways within a specific field of expertise. The term was coined by architect Christopher Alexander and popularized by his 1977 book A Pattern Language.

Software design is the process of conceptualizing how a software system will work before it is implemented or modified. Software design also refers to the direct result of the design process – the concepts of how the software will work which consists of both design documentation and undocumented concepts.

Pattern in architecture is the idea of capturing architectural design ideas as archetypal and reusable descriptions. The term pattern in this context is usually attributed to Christopher Alexander, an Austrian born American architect. The patterns serve as an aid to design cities and buildings. The concept of having collections of "patterns", or typical samples as such, is much older. One can think of these collections as forming a pattern language, whereas the elements of this language may be combined, governed by certain rules.

In software and systems engineering, the phrase use case is a polyseme with two senses:

  1. A usage scenario for a piece of software; often used in the plural to suggest situations where a piece of software may be useful.
  2. A potential scenario in which a system receives an external request and responds to it.
<span class="mw-page-title-main">Grady Booch</span> American software engineer

Grady Booch is an American software engineer, best known for developing the Unified Modeling Language (UML) with Ivar Jacobson and James Rumbaugh. He is recognized internationally for his innovative work in software architecture, software engineering, and collaborative development environments.

In computing, an abstraction layer or abstraction level is a way of hiding the working details of a subsystem. Examples of software models that use layers of abstraction include the OSI model for network protocols, OpenGL, and other graphics libraries, which allow the separation of concerns to facilitate interoperability and platform independence.

James O. Coplien, also known as Cope, is a writer, lecturer, and researcher in the field of computer science. He held the 2003–4 Vloeberghs Leerstoel at Vrije Universiteit Brussel and has been a visiting professor at University of Manchester.

In computer programming, a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate the development of software applications, products and solutions.

<i>A Pattern Language</i> Book by Christopher Alexander

A Pattern Language: Towns, Buildings, Construction is a 1977 book on architecture, urban design, and community livability. It was authored by Christopher Alexander, Sara Ishikawa and Murray Silverstein of the Center for Environmental Structure of Berkeley, California, with writing credits also to Max Jacobson, Ingrid Fiksdahl-King and Shlomo Angel. Decades after its publication, it is still one of the best-selling books on architecture.

Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development process to guide stakeholder communication and product quality.

Design methods are procedures, techniques, aids, or tools for designing. They offer a number of different kinds of activities that a designer might use within an overall design process. Conventional procedures of design, such as drawing, can be regarded as design methods, but since the 1950s new procedures have been developed that are more usually grouped together under the name of "design methods". What design methods have in common is that they "are attempts to make public the hitherto private thinking of designers; to externalise the design process".

Interaction design patterns are design patterns applied in the context human-computer interaction, describing common designs for graphical user interfaces.

An architectural pattern is a general, reusable resolution to a commonly occurring problem in software architecture within a given context. The architectural patterns address various issues in software engineering, such as computer hardware performance limitations, high availability and minimization of a business risk. Some architectural patterns have been implemented within software frameworks. There are two main categories of architectural patterns: monolithic and distributed.

Software analysis patterns or analysis patterns in software engineering are conceptual models, which capture an abstraction of a situation that can often be encountered in modelling. An analysis pattern can be represented as "a group of related, generic objects (meta-classes) with stereotypical attributes, behaviors, and expected interactions defined in a domain-neutral manner."

Organizational patterns are inspired in large part by the principles of the software pattern community, that in turn takes it cues from Christopher Alexander's work on patterns of the built world. Organizational patterns also have roots in Kroeber's classic anthropological texts on the patterns that underlie culture and society. They in turn have provided inspiration for the Agile software development movement, and for the creation of parts of Scrum and of Extreme Programming in particular.

<span class="mw-page-title-main">Object-oriented programming</span> Programming paradigm based on the concept of objects

Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code: data in the form of fields, and code in the form of procedures. In OOP, computer programs are designed by making them out of objects that interact with one another.

References

  1. 1 2 Alexander, Christopher (1977). A Pattern Language: Towns, Buildings, Construction . Center for Environmental Structure series. Vol. 2. New York: Oxford University Press. ISBN   0-19-501919-9. OCLC   3132495.
  2. Gamma, Erich; Helm, Richard; Johnson, Ralph; Vlissides, John (1994). Design Patterns: Elements of Reusable Object-Oriented Software . Addison-Wesley professional computing series. Reading, Mass.: Addison-Wesley. ISBN   0-201-63361-2. OCLC   31171684. The "Gang of Four" book.
  3. Maioriello, James (2002-10-02). "What are design patterns and do I need them?". developer.com. Retrieved 2011-03-21.
  4. For example: Mettler, Tobias; Eurich, Markus (June 2012). "A 'design-pattern'–based approach for analyzing e-health business models". Health Policy and Technology . 1 (2): 77–85. doi:10.1016/j.hlpt.2012.04.005.

Further reading