Printer Friendly
The Free Library
19,607,050 articles and books
Member login
User name  
Password 
 
Join us Forgot password?

Design patterns in software engineering.


In software engineering, a design pattern is a general solution to a common problem in software design. A design pattern isn't a finished design that can be transformed directly into code; it is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design Transforming an object-oriented model into the specifications required to create the system. Moving from object-oriented analysis to object-oriented design is accomplished by expanding the model into more and more detail.  patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Algorithms are not thought of as design patterns, since they solve computational problems In theoretical computer science, a computational problem is a mathematical object representing a question that computers might want to solve. For example, "given any number x, determine whether x is prime" is a computational problem.  rather than design problems.

History

Patterns originated as an architectural concept by Christopher Alexander Christopher Alexander (born October 4, 1936 in Vienna, Austria) is an architect noted for his theories about design, and for more than 200 building projects in California, Japan, Mexico and around the world. . In 1987, Kent Beck Kent Beck is the creator of Extreme Programming and is one of the authors of the Agile Manifesto.

Beck has pioneered software patterns, the rediscovery of Test-driven development and the commercial application of Smalltalk.
 and Ward Cunningham "Howard Cunningham" redirects here. For the fictional character, see the article on Happy Days.
Howard G. "Ward" Cunningham (born May 26, 1949) is the American computer programmer who developed the first wiki.
 began experimenting with the idea of applying patterns to programming and presented their results at the OOPSLA OOPSLA - Conference on Object-oriented Programming Systems, Languages and Applications.  conference that year. In the following years, Beck, Cunningham and others followed up on this work.

Design patterns gained popularity in computer science after the book Design Patterns: Elements Reusable re·use  
tr.v. re·used, re·us·ing, re·us·es
To use again, especially after salvaging or special treatment or processing.



re·us
 Object-Oriented Software was published in 1994. That same year, the first Pattern Languages of Programs conference was held and the following year, the Portland Pattern Repository The Portland Pattern Repository (PPR) is a repository for computer programming design patterns. It was accompanied by a companion website, WikiWikiWeb, which was the world's first wiki.

The repository has an emphasis on extreme programming.
 was set up for documentation of design patterns. The scope of the term remained a matter of dispute into the next decade.

Uses

Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns.

Often, people only understand how to apply certain software design techniques to certain problems. These techniques are difficult to apply to a broader range of problems. Design patterns provide general solutions, documented in a format that doesn't require specifics tied to a particular problem.

Patterns allow developers to communicate using well-known, well understood names for software interactions. Common design patterns can be improved over time, making them more robust than ad-hoc designs.

Classification

Design patterns can be classified based on multiple criteria, the most common of which is the basic underlying problem they solve. According to according to
prep.
1. As stated or indicated by; on the authority of: according to historians.

2. In keeping with: according to instructions.

3.
 this criterion, design patterns can be classified into various classes, some of which are:

* Fundamental patterns * Creational patterns In software engineering, creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design.  * Structural patterns * Behavioral patterns In software engineering, behavioral design patterns are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.  * Concurrency patterns In software engineering, concurrency patterns are one of the types of design patterns. Examples of this class of patterns include:
  • Active Object
  • Balking pattern
  • Double checked locking pattern
  • Guarded suspension
  • Leaders/followers pattern
 * Event handling patterns

Documentation

The documentation for a design pattern should contain enough information about the problem that the pattern addresses, the context in which it is used, and the suggested solution. Nonetheless, authors use their own layouts to document design patterns, and these layouts usually resemble the essential parts. The authors usually include additional sections to provide more information, and organize the essential parts in different sections, possibly with different names.

A commonly used format is the one used by the Gang of Four which contains the following sections:

* Pattern Name and Classification: Every pattern should have a descriptive and unique name that helps in identifying and referring to it. Additionally, the pattern should be classified according to a classification such as the one described earlier. This classification helps in identifying the use of the pattern.

* Intent: This section should describe the goal behind the pattern and the reason for using it. It resembles the problem part of the pattern.

* Also Known As: A pattern could have more than one name. These names should be documented in this section.

* Motivation: This section provides a scenario consisting of a problem and a context in which this pattern can be used. By relating the problem and the context, this section shows when this pattern is used.

* Applicability: This section includes situations in which this pattern is usable. It represents the context part of the pattern.

* Structure: A graphical representation of the pattern. Class diagrams In the Unified Modeling Language (UML), a class diagram is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, and the relationships between the classes.  and Interaction diagrams can be used for this purpose.

* Participants: A listing of the classes and objects used in this pattern and their roles in the design.

* Collaboration: Describes how classes and objects used in the pattern interact with each other.

* Consequences: This section describes the results, side effects Side effects

Effects of a proposed project on other parts of the firm.
, and trade offs caused by using this pattern.

* Implementation: This section describes the implementation of the pattern, and represents the solution part of the pattern. It provides the techniques used in implementing this pattern, and suggests ways for this implementation.

* Sample Code: An illustration of how this pattern can be used in a programming language

* Known Uses: This section includes examples of real usages of this pattern.

* Related Patterns: This section includes other patterns that have some relation with this pattern, so that they can be used along with this pattern, or instead of this pattern. It also includes the differences this pattern has with similar patterns.

Critique

Some feel that the need for patterns results from using computer languages or techniques with insufficient abstraction ability. Under ideal factoring, a concept should not be copied, but merely referenced. But if something is referenced instead of copied, then there is no "pattern" to label and catalog. It is also said that design patterns encourage navigational database Navigational databases incorporate both the network model and hierarchical model of database interfaces and have evolved into Set-oriented systems [1]. Navigational techniques use "pointers" and "paths" to navigate among data records (also known as "nodes").  like structures instead of the allegedly cleaner relational approach where such structures are viewpoints instead of hardwired into programming code. However, critics of the relational approach suggest it does not integrate well enough with behaviour. The level of coupling that should be supplied between behavior and data is a contentious
COPYRIGHT 2006 A.P. Publications Ltd.
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2006, Gale Group. All rights reserved. Gale Group is a Thomson Corporation Company.

 Reader Opinion

Title:

Comment:



 

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:SOFTWARE ENGINEEERING
Publication:Software World
Geographic Code:1USA
Date:Jan 1, 2006
Words:886
Previous Article:Principles of Extreme Programming.
Next Article:Three steps to becoming an agile operator.
Topics:



Related Articles
CMI International opens Tech Center.
Pattern shop uses CAD/CAM software to aid Grede, Cummins with turbocharger.
3-D solid modeling puts thermoforming tools in the fast lane.
A brighter approach to development: Guide Crop. is using software skills and cross-functional teams to create better lighting solutions for its...
Computer software reference guide.
Defense ARJ executive editor.
If a machine falls in the forest.
Designing patterns.
Tire contact pressure.

Terms of use | Copyright © 2012 Farlex, Inc. | Feedback | For webmasters | Submit articles