What are design patterns?

Definition of “design pattern”
What are design patterns?



From Egoloisos

providers on the subject

Basically, any kind of design follows some kind of template or pattern. Both in architecture and in software development, the structure and processes follow certain patterns, so that these design patterns are also known here as design patterns.

Design patterns are used in software development to solve recurring problems according to a specific pattern.

(Image: A_Different_Perspective)

Design patterns are recurring patterns in software development and make the programming work much easier. Conceptually, the design pattern can be traced back to the architect Christopher Alexander.

The American created reusable templates as a collection. In doing so, the architect pursued the goal of involving future users of the buildings in the design process. The idea behind it is to simplify future similar constructions. The core idea has been taken up by several computer scientists.

The term made its breakthrough in software development with the publication “Design Patterns – Elements of Reusable Object-Oriented Software”. Often considered a seminal book, this book was published in 1994 by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (aka The Gang of Four or GoF).

Design patterns in software or programs are similar to the patterns or templates of architectural designs in terms of their basic principle. Similar to how certain patterns repeat themselves, computer programs are also recurring processes. In this sense, design patterns are design patterns that make the work of subsequent programmers easier.

Design patterns and how they work

Just as there are certain start and end specifications in product design, there are also certain loops and processes that must be run through in programming and software development. Basically, every mode of programming requires a specific decision about what to do in case of (non)over-alignment.

In corresponding calculations, the result is created from a combination of certain variables. Numerous individual programming steps result in a complete program flow. For certain processes and tasks, this program flow always has the same functions. Design patterns can thus be understood as a description of how a concrete problem should be tackled or solved.

Even in larger programming contexts, there are recurring processes that are used again and again to solve certain tasks. These call for recurring patterns that can be used multiple times. As proven building blocks in larger and more comprehensive software concepts, design patterns have established themselves as schemas because they have already proven themselves in practice.

Known design patterns in software development

Software development knows a multitude of concrete design patterns. They fall into one of the categories above. Among the most important are generational patterns, structural patterns and behavioral patterns. They differ in terms of how they work and their areas of application.

Design patterns in their various forms represent the respective application areas of the design patterns they contain. A fundamental distinction must be made between structural patterns, behavioral patterns and production patterns.

  • Structural patterns can be understood as design patterns for class relationships. The goal is an abstraction that is able to communicate with other solution approaches. This is particularly relevant in the context of interface programming.
  • must be distinguished from this behavioral patterns. These model the behavior of the software. These are patterns for simplifying complex management and control processes. For this purpose, it is possible to choose between algorithms and object responsibility.
  • Another type of design pattern is this Generation pattern or creation pattern. This is used to create objects that enable a simplified representation of the processes of specific instances. This happens regardless of the type of object creation in software.

In addition to the design patterns mentioned, there are other types of design patterns that do not fit into any of the categories mentioned. These additional types include, for example, design patterns for object-relational mapping. They are used to store objects and their relationships to each other in a relational database.

The generational patterns again include several design patterns. Builder patterns serve to separate object development from its representations. Factory patterns also belong to the generational patterns. Like a factory method, they create an object by calling a method. Another generational pattern is this singleton pattern. As a one-off, it contributes to the fact that there is only exactly one object from a class. It is a globally available pattern.

Several subcategories also fall within the area of ​​structural patterns. To composite pattern represents a composite pattern. It is designed for dynamic structures and is used, for example, for file organization or data compression. Decorator patterns integrate additional functionalities or responsibilities into existing classes. To facade pattern provides an interface to other systems and subsystems.

The behavior patterns can be divided into Observer, strategy and visitor patterns. Observer patterns propagate changes to objects to structures. Strategy patterns are used to define families of interchangeable algorithms. Visitor patterns serve to encapsulate executable operations in such a way that new operations are possible without making changes to the corresponding classes.

(ID:48662663)

Leave a Comment