카테고리 Design Patterns

Day 12 – Template Pattern

The Template Method Design Pattern is a behavioral pattern that defines the skeleton of an algorithm in a base class and allows subclasses to override specific steps without changing the overall algorithm’s structure. Let’s dive into an example to understand it better.

Day 11 – Factory Method Pattern

The Factory Method Design Pattern is a creational pattern that allows objects to be created without tightly coupling the object creation code to the client code. It defines an interface for creating objects in a superclass but lets subclasses decide which class to instantiate.

Day 10 – Decorator Pattern

Decorator Pattern is a structural design pattern that allows you to dynamically add new functionality to an object without altering its structure. It provides a flexible way to extend the behavior of existing classes without modifying them directly.

Day 9 – Adapter Pattern

The Adapter Pattern is a structural design pattern that allows objects with incompatible interfaces to work together. It acts as a bridge between two incompatible interfaces.

Day 8 – Observer Pattern

관찰자 패턴은 객체 간의 일대다 종속성을 정의합니다. 이 패턴을 사용하면 한 개체의 상태가 변경되면 해당 개체에 종속된 다른 모든 개체에 자동으로 알림이 전달되고 업데이트됩니다. 이 패턴은 분산 이벤트 처리 시스템을 구현할 때 널리 사용됩니다. 구성 요소 관찰자 패턴에는 다음과 같은…

Day 7 – Prototype Pattern

The Prototype pattern is a generative design pattern used to create new objects by cloning existing objects when creating the object is expensive or complex. In C#, you can implement this pattern through the ICloneable interface.