
Strategy Pattern
Strategy Pattern Strategy Pattern 은 런타임 동안 계속해서 변경될 수 있는 객체들의 인터페이스를 정의하는 디자인 패턴이다. Strategy Pattern 의 클래스 다이어그램을 살펴보자 Object using a strategy - iOS 개발을 진행할 때면 주로 View Controller 가 된다. Strategy Protoocl, 즉 전략을 직접 사용하는 객체가 된다. Strategy Protocol - 프로토콜을 준수하는 모든 객체가 구현해야 할 메소드, 혹은 프로퍼티를 정의한다. Strategies - Strategy Protocol 을 준수한 모든 Concrete object (구현체) 언제 Strategy Pattern 을 사용해야 할까? 두 개 혹은 그 이상의 같..
Comment