HOME

TheInfoList



OR:

In
software engineering Software engineering is a branch of both computer science and engineering focused on designing, developing, testing, and maintaining Application software, software applications. It involves applying engineering design process, engineering principl ...
, behavioral design patterns are
design pattern A design pattern is the re-usable form of a solution to a design problem. The idea was introduced by the architect Christopher Alexander and has been adapted for various other disciplines, particularly software engineering. The " Gang of Four" ...
s that identify common communication patterns among objects. By doing so, these patterns increase flexibility in carrying out communication.


Design patterns

Examples of this type of design pattern include: ; Blackboard design pattern : Provides a computational framework for the design and implementation of systems that integrate large and diverse specialized modules, and implement complex, non-deterministic control strategies ;
Chain-of-responsibility pattern In object-oriented design, the chain-of-responsibility pattern is a behavioral design pattern consisting of a source of command objects and a series of processing objects. Each processing object contains logic that defines the types of command ob ...
: Command objects are handled or passed on to other objects by logic-containing processing objects ;
Command pattern In object-oriented programming, the command pattern is a Behavioral pattern, behavioral Design pattern (computer science), design pattern in which an object is used to Information hiding, encapsulate all information needed to perform an action or ...
: Command objects encapsulate an action and its parameters ;"Externalize the stack" : Turn a recursive function into an
iterative function In mathematics, an iterated function is a function that is obtained by composing another function with itself two or several times. The process of repeatedly applying the same function is called iteration. In this process, starting from some ...
that uses a
stack Stack may refer to: Places * Stack Island, an island game reserve in Bass Strait, south-eastern Australia, in Tasmania’s Hunter Island Group * Blue Stack Mountains, in Co. Donegal, Ireland People * Stack (surname) (including a list of people ...
; Interpreter pattern : Implement a specialized computer language to rapidly solve a specific set of problems ;
Iterator pattern In object-oriented programming, the iterator pattern is a design pattern in which an iterator is used to traverse a container and access the container's elements. The iterator pattern decouples algorithms from containers; in some cases, algorithms ...
:
Iterator In computer programming, an iterator is an object that progressively provides access to each item of a collection, in order. A collection may provide multiple iterators via its interface that provide items in different orders, such as forwards ...
s are used to access the elements of an aggregate object sequentially without exposing its underlying representation ;
Mediator pattern In software engineering, the mediator pattern defines an object that Encapsulation (computer programming), encapsulates how a set of objects interact. This pattern is considered to be a behavioral pattern due to the way it can alter the program's ...
: Provides a unified interface to a set of interfaces in a subsystem ;
Memento pattern The memento pattern is a software design pattern that exposes the private internal state of an object. One example of how this can be used is to restore an object to its previous state (undo via rollback), another is versioning, another is custom s ...
: Provides the ability to restore an object to its previous state (rollback) ;
Null object pattern In object-oriented computer programming, a null object is an object with no referenced value or with defined neutral (''null'') behavior. The null object design pattern, which describes the uses of such objects and their behavior (or lack thereof) ...
: Designed to act as a default value of an object
Observer pattern In software design and software engineering, the observer pattern is a software design pattern in which an object, called the ''subject'' (also known as ''event source'' or ''event stream''), maintains a list of its dependents, called observers (a ...
Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. The variant weak reference pattern decouples an observer from an observable to avoid memory leaks in environments without automatic weak references.
;
Protocol stack The protocol stack or network stack is an implementation of a computer networking protocol suite or protocol family. Some of these terms are used interchangeably but strictly speaking, the ''suite'' is the definition of the communication protoc ...
: Communications are handled by multiple layers, which form an encapsulation hierarchy ;
Publish–subscribe pattern In software architecture, the publish–subscribe pattern (pub/sub) is a messaging pattern in which message senders, called publishers, categorize messages into classes (or ''topics''), and send them without needing to know which components ...
A messaging pattern where senders (publishers) and receivers (subscribers) are decoupled via message topics and brokers. Commonly used in distributed systems, this pattern supports asynchronous, many-to-many communication.
;
Scheduled-task pattern A scheduled-task pattern is a type of software design pattern used with real-time systems. It is not to be confused with the "scheduler pattern". While the scheduler pattern delays access to a resource (be it a function, variable, or otherwise) onl ...
: A task is scheduled to be performed at a particular interval or clock time (used in
real-time computing Real-time computing (RTC) is the computer science term for Computer hardware, hardware and software systems subject to a "real-time constraint", for example from Event (synchronization primitive), event to Event (computing), system response. Rea ...
) ; Single-serving visitor pattern : Optimise the implementation of a visitor that is allocated, used only once, and then deleted ; Specification pattern : Recombinable
business logic In computer software, business logic or domain logic is the part of the program that encodes the real-world business rules that determine how data can be created, stored, and changed. It is contrasted with the remainder of the software that might ...
in a
boolean Any kind of logic, function, expression, or theory based on the work of George Boole is considered Boolean. Related to this, "Boolean" may refer to: * Boolean data type, a form of data with only two possible values (usually "true" and "false" ...
fashion ;
State pattern The state pattern is a Behavioral pattern, 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 inter ...
: A clean way for an object to partially change its type at runtime ;
Strategy pattern In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code receives runtime ins ...
: Algorithms can be selected on the fly, using composition ;
Template method pattern In object-oriented programming, the template method is one of the behavioral pattern, behavioral Software design pattern, design patterns identified by Gamma et al. in the book ''Design Patterns''. The template method is a method in a superclas ...
: Describes the
skeleton A skeleton is the structural frame that supports the body of most animals. There are several types of skeletons, including the exoskeleton, which is a rigid outer shell that holds up an organism's shape; the endoskeleton, a rigid internal fra ...
of a program; algorithms can be selected on the fly, using
inheritance Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
;
Visitor pattern A visitor pattern is a software design pattern that separates the algorithm from the object structure. Because of this separation, new operations can be added to existing object structures without modifying the structures. It is one way to follo ...
: A way to separate an algorithm from an object


See also

*
Concurrency pattern In software engineering, concurrency patterns are those types of design patterns that deal with the multi-threaded programming paradigm. Examples of this class of patterns include: * Active object * Balking pattern * Barrier * Double-check ...
*
Creational pattern In software engineering, creational design patterns are design patterns that deal with object creation Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not ex ...
*
Structural pattern In software engineering, structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships among entities. Examples of Structural Patterns include: * Adapter pattern: 'adapts' one interface fo ...


References

{{Design Patterns patterns Software design patterns