Skip to content

Layman's Magazine

Everyday's tech for the everyday's layman

Menu
  • Home
  • News
  • Best picks
  • How To
  • Reviews
  • Other
    • Smart Home
    • Smartphones & tablets
    • Computers
    • Gadgets
    • Streaming
    • Gaming
    • Web
    • Software
    • Hardware
    • Cybersecurity
    • VR
    • Design
    • Programming
    • AI
    • Database
    • Network
    • Audio
    • Video
    • Crypto
    • Other technologies
  • Privacy Policy
Menu
person holding white pen on brown wooden table

Design pattern

Posted on March 5, 2023

Because of the changing ecosystem of technology, burgeoning tendencies, evolving user requirements, and the complexity of the software system, developers are constantly facing analogous problems in different contexts of projects.

To save us the hassle of repeatedly rethinking solutions to problems that we have encountered before, design patterns have been devised  as a set of proven solutions to common problems; they enable developers to quickly and efficiently solve these problems without having to reinvent the wheel every time. This not only saves time and effort but also ensures that the resulting software is more reliable, maintainable, and scalable.

The design pattern stereotype

Think of a design pattern as a dynamic high-level portrait of a problem’s solution rather than a static algorithm that contains a clear set of instructions to achieve a purpose, in this context, a design pattern is not a fixed set of code or algorithm, but rather a general concept or approach for addressing a particular software design problem. By understanding the underlying principles of it, developers can implement a solution that is tailored to the specific requirements and constraints of their own program, while still adhering to the overall pattern structure.

In other words, a design pattern provides a flexible blueprint or template that can be adapted and customized to fit the unique needs of different software systems. This enables developers to benefit from the experience and insights of others who have solved similar problems, while still retaining the freedom and creativity to develop a solution that is optimized for their own program.

The difference between  design patterns and architecture patterns 

Design patterns and architecture patterns are both important concepts in the fields of software engineering and architecture, but they differ in scope and level of abstraction. 

The subtle nuance of difference is conspicuous at the stage of implementation : design patterns are applied at the level of individual software components or modules and they are typically concerned with low-level details such as object interactions, algorithms, and data structures.Examples of design patterns include the Singleton pattern, the Observer pattern, and the Adapter pattern.

 Architecture patterns, on the other hand, are high-level design structures that define the overall organization and interaction of software components within a system. They are concerned with issues such as system scalability, maintainability, and performance. Examples of architecture patterns include the client-server pattern, the microservices pattern, and the layered architecture pattern.

A more subtle nuance between the design patterns and architecture patterns lies in the scope and level of abstraction

Succinct history

It’s a human tendency to tag usual acquaintances, by extension it was a matter of time until someone come to notice the repeating nature of those problem and their generic solutions, the concept was first introduced by the civil engineer Christopher Alexander (4 October 1936 – 17 March 2022) in the field of urban construction, to be inserted in 1995 in the programming realm by four authors: Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm in their book : Design Patterns: Elements of Reusable Object-Oriented Software, that goes as well by the name “the GoF book”.

Their importance

In nowadays workplace, projects are conducted by a team of programmers that have to communicate and collaborate to carry it through. For consistency and standardization reasons, design patterns ensure the reusability and serve as a common language to communicate more efficiently. For example: use can say : use a builder, or a producer-consumer and every one of your teammates will be able to understand your proposition. Furthermore, The solution promotes the creation of tightly integrated modules that are loosely connected, resulting in a more comprehensible and manageable system as a whole.

Classification

Design patterns can be classified into three main categories: creational patterns, structural patterns, and behavioral patterns.

  • Creational patterns: These patterns deal with object creation and initialization, and help to abstract the process of object creation so that it is more flexible and modular. Examples of creational patterns include the Singleton pattern, the Factory pattern, and the Builder pattern.
  • Structural patterns: These patterns are concerned with the composition of objects and classes to form larger structures or subsystems. They help to define relationships between objects and provide a framework for organizing code. Examples of structural patterns include the Adapter pattern, the Decorator pattern, and the Facade pattern.
  • Behavioral patterns: These patterns are concerned with the communication and interaction between objects and classes. They help to define the behavior of objects in different scenarios, and provide a framework for implementing algorithms and workflows. Examples of behavioral patterns include the Observer pattern, the Command pattern, and the Strategy pattern.

Design patterns can also be categorized as either class patterns or object patterns. Class patterns deal with relationships between classes and their subclasses, while object patterns deal with relationships between objects and their classes. Class patterns are more focused on inheritance and polymorphism, while object patterns are more focused on object composition and delegation.

Tags

academics ai android apple artificial intelligence comet crypto design elon musk ESA gaming google google scholar intel interceptor iphone Java keywords linux machine learning mysql NASA overleaf pattern pico H pico W pico WH plagiarism checker python R raspberry Pi reasearchgate research reverso robots search engine optimization SEO spacex spam telescope tesla testing twitter whatsapp youtube

©2023 Layman's Magazine | Design: Newspaperly WordPress Theme
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}