Behavioral pattern

Last updated

In software engineering, behavioral design patterns are design patterns that identify common communication patterns among objects. By doing so, these patterns increase flexibility in carrying out communication.

Contents

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
Command objects are handled or passed on to other objects by logic-containing processing objects
Command pattern
Command objects encapsulate an action and its parameters
"Externalize the stack"
Turn a recursive function into an iterative function that uses a stack [1]
Interpreter pattern
Implement a specialized computer language to rapidly solve a specific set of problems
Iterator pattern
Iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation
Mediator pattern
Provides a unified interface to a set of interfaces in a subsystem
Memento pattern
Provides the ability to restore an object to its previous state (rollback)
Null object pattern
Designed to act as a default value of an object
Observer pattern
a.k.a. Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object
Weak reference pattern
De-couple an observer from an observable [2]
Protocol stack
Communications are handled by multiple layers, which form an encapsulation hierarchy [3]
Scheduled-task pattern
A task is scheduled to be performed at a particular interval or clock time (used in real-time computing)
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 a boolean fashion
State pattern
A clean way for an object to partially change its type at runtime
Strategy pattern
Algorithms can be selected on the fly, using composition
Template method pattern
Describes the skeleton of a program; algorithms can be selected on the fly, using inheritance
Visitor pattern
A way to separate an algorithm from an object

See also

Related Research Articles

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 follow the open/closed principle in object-oriented programming and software engineering.

<i>Design Patterns</i> 1994 software engineering book

Design Patterns: Elements of Reusable Object-Oriented Software (1994) is a software engineering book describing software design patterns. The book was written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, with a foreword by Grady Booch. The book is divided into two parts, with the first two chapters exploring the capabilities and pitfalls of object-oriented programming, and the remaining chapters describing 23 classic software design patterns. The book includes examples in C++ and Smalltalk.

<span class="mw-page-title-main">Abstract factory pattern</span> Software design pattern

The abstract factory pattern in software engineering is a design pattern that provides a way to create families of related objects without imposing their concrete classes, by encapsulating a group of individual factories that have a common theme without specifying their concrete classes. According to this pattern, a client software component creates a concrete implementation of the abstract factory and then uses the generic interface of the factory to create the concrete objects that are part of the family. The client does not know which concrete objects it receives from each of these internal factories, as it uses only the generic interfaces of their products. This pattern separates the details of implementation of a set of objects from their general usage and relies on object composition, as object creation is implemented in methods exposed in the factory interface.

In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time. This information includes the method name, the object that owns the method and values for the method parameters.

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 are necessarily container-specific and thus cannot be decoupled.

In software engineering, the mediator pattern defines an object that 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 running behavior.

In computer programming, the strategy pattern is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code receives run-time instructions as to which in a family of algorithms to use.

In computer programming, an iterator is an object that enables a programmer to traverse a container, particularly lists. Various types of iterators are often provided via a container's interface. Though the interface and semantics of a given iterator are fixed, iterators are often implemented in terms of the structures underlying a container implementation and are often tightly coupled to the container to enable the operational semantics of the iterator. An iterator performs traversal and also gives access to data elements in a container, but does not itself perform iteration.

<span class="mw-page-title-main">LightWave 3D</span> 3D computer graphics program

LightWave 3D is a 3D computer graphics program developed by LightWave Digital. It has been used in films, television, motion graphics, digital matte painting, visual effects, video game development, product design, architectural visualizations, virtual production, music videos, pre-visualizations and advertising.

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. Another example is Media Transfer Protocol.

In computing, an interface is a shared boundary across which two or more separate components of a computer system exchange information. The exchange can be between software, computer hardware, peripheral devices, humans, and combinations of these. Some computer hardware devices, such as a touchscreen, can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to a given system.

<span class="mw-page-title-main">Glade Interface Designer</span> Graphical user interface builder

Glade Interface Designer is a graphical user interface builder for GTK, with additional components for GNOME. In its third version, Glade is programming language–independent, and does not produce code for events, but rather an XML file that is then used with an appropriate binding. See List of language bindings for GTK for the available ones.

A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web. Web frameworks aim to automate the overhead associated with common activities performed in web development. For example, many web frameworks provide libraries for database access, templating frameworks, and session management, and they often promote code reuse. Although they often target development of dynamic web sites, they are also applicable to static websites.

Domain-driven design (DDD) is a major software design approach, focusing on modeling software to match a domain according to input from that domain's experts.

Service-oriented programming (SOP) is a programming paradigm that uses "services" as the unit of computer work, to design and implement integrated business applications and mission critical software programs. Services can represent steps of business processes and thus one of the main applications of this paradigm is the cost-effective delivery of standalone or composite business applications that can "integrate from the inside-out". It inherently promotes service-oriented architecture (SOA), however, it is not the same as SOA. While SOA focuses on communication between systems using "services", SOP provides a new technique to build agile application modules using in-memory services as the unit of work.

The front controller software design pattern is listed in several pattern catalogs and is related to the design of web applications. It is "a controller that handles all requests for a website," which is a useful structure for web application developers to achieve flexibility and reuse without code redundancy.

<span class="mw-page-title-main">Comparison of 802.15.4 radio modules</span>

An 802.15.4 radio module is a small device used to communicate wirelessly with other devices according to the IEEE 802.15.4 protocol.

Hector is a high-level client API for Apache Cassandra. Named after Hector, a warrior of Troy in Greek mythology, it is a substitute for the Cassandra Java Client, or Thrift, that is encapsulated by Hector. It also has Maven repository access.

<span class="mw-page-title-main">Libav</span> Multimedia framework

Libav is an abandoned free software project, forked from FFmpeg in 2011, that contains libraries and programs for handling multimedia data.

The hexagonal architecture, or ports and adapters architecture, is an architectural pattern used in software design. It aims at creating loosely coupled application components that can be easily connected to their software environment by means of ports and adapters. This makes components exchangeable at any level and facilitates test automation.

References

  1. "Externalize The Stack". c2.com. 2010-01-19. Archived from the original on 2011-03-03. Retrieved 2012-05-21.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  2. Nakashian, Ashod (2004-04-11). "Weak Reference Pattern". c2.com. Archived from the original on 2011-03-03. Retrieved 2012-05-21.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  3. "Protocol Stack". c2.com. 2006-09-05. Archived from the original on 2011-03-03. Retrieved 2012-05-21.{{cite web}}: CS1 maint: bot: original URL status unknown (link)