Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch7.4-ch7.7.2: 브릿지 패턴 ~ 플라이웨이트 패턴 #25

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

ynoolee
Copy link
Contributor

@ynoolee ynoolee commented May 18, 2024

  • 브릿지 패턴
  • 컴포지트 패턴
  • 플라이 웨이트 패턴

- 브릿지 패턴
- 컴포지트 패턴
- 플라이 웨이트 패턴
@ynoolee ynoolee self-assigned this May 18, 2024
@ynoolee
Copy link
Contributor Author

ynoolee commented May 18, 2024

간단 정리

  • 데코레이터 패턴 : Interface는 바꾸지 않고, 책임(기능)만 추가
  • 어댑터 : 한 인터페이스를, 다른 인터페이스로 변환
  • Facade : interface를 간단하게 바꿈 (복잡한 인터페이스 사용에 대한 사용 편의성 증가한 통합 인터페이스 제공).
  • bridge 패턴 : 추상화와 구현체를 디커플링 하는 식으로 두 계층으로 만들어, 변경 유연 성 증가 시키는 것 -> 주로 컴포지션을 통해 구현 - ex) SLF4J 로깅 프레임워크의 Logger, Appender, Fromatter 들을 합성하여 다양한 로깅 형식을 결정할 수 있는 것 (Slf4j 는 Facade 패턴이기도 함)
  • 컴포지트 패턴 : Tree 구조의 데이터를 표현하는 객체 컬렉션. 하나의 타입의 데이터들을 공통적으로 처리할 수 있는 처리 방법을 재귀적으로 호출하며 해결할 수 잇는 문제들
  • 플라이웨이트 패턴 : 캐싱이 떠오르는 방식. 객체 재사용을 통해 메모리 절약 목적. 일부 중복되는 필드들만을 플라이웨이트로 별도 객체로 추출해 재사용 하기도 한다. Java 의 Integer 등 primitive type 들(중에서도 Wrapper 타이블) 에서 볼 수 있음.

@su-pernova su-pernova merged commit 1d9bd03 into main Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants