Design Patterns

347 단어·2 분·원문(.md)

What are Design Patterns? #

"A great solution that can be reused when persistent problems that frequently occur in specific parts during software design arise again."

"Something that helps developers communicate efficiently when collaborating."

"Can efficiently improve code."

"Don't reinvent the wheel."

Even when developing various program systems with different software modules or functionalities, common design problems exist among them, and the commonalities in the methods to solve these are called patterns.

Literally, design patterns can be understood as a way to improve code quality and efficiency by structuring code patterns to facilitate better collaboration among developers.


Advantages and Disadvantages of Design Patterns #

Advantages #

  • Smooth communication among developers
  • Easy to grasp software structure
  • Reduced development time through reuse
  • Flexible response to design change requests
  • Early departure possible, without overtime
  • Prevention of unnecessary resource waste

Disadvantages #

  • Primarily used for object-oriented design / implementation.
  • Burden of initial investment cost.

Design Pattern Types #

  • Creation Pattern

    • Patterns related to object creation. They enhance flexibility by hiding the object creation logic.
  • Structural Pattern

    • Patterns related to the composition of classes and objects.
  • Behavioral Pattern

    • Patterns related to communication between objects.

Types of Design Patterns #

GoF Design Pattern Classification

NameDescription
Creational PatternsPatterns related to object creation. They encapsulate the creation and composition of objects, providing flexibility so that the program structure is not significantly affected even if a specific object is created or changed.
Structural PatternsPatterns that combine classes or objects to form larger structures. For example, patterns that combine two objects with different interfaces to provide a single interface, or patterns that group objects together to provide new functionality.
Behavioral PatternsPatterns related to algorithms or responsibility distribution between objects or classes. They focus on how to distribute tasks that a single object cannot perform alone among multiple objects, while minimizing coupling between objects.

GoF Design Pattern Types

  • Creational Patterns
    • Abstract Factory, Builder, Factory Method, Prototype, Singleton
  • Structural Patterns
    • Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
  • Behavioral Patterns
    • Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor
Design-Pattern/designp.md