-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat #59 - 예약하기 API 구현 #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전략패턴과 템플릿 메소드 패턴으로 중복 로직은 최소화가 됐지만 이중 패턴으로 코드를 처음 보는 입장에서는 혼재가 있을 것 같아요.
저번에 논의로 결정했던추후에 서비스 로직만 분리한다고 했을 때 퍼사드 패턴으로 재구현해보는 것은 어떨까요?
서비스 로직단계에서 디자인패턴만 3가지를 한번에 쓰기에는 혼란스러우지 않을까 생각이됩니다
mung_manager/reservations/services/strategies/abstract_strategy.py
Outdated
Show resolved
Hide resolved
mung_manager/reservations/services/strategies/abstract_strategy.py
Outdated
Show resolved
Hide resolved
mung_manager/reservations/services/strategies/hotel_reservation_strategy.py
Outdated
Show resolved
Hide resolved
티켓 타입별로 유사하지만 서로 다른 알고리즘을 수행해야 하는 저희 상황에는 전략패턴이 적합하다고 생각하고, 내부 로직은 다르지만 같은 프로세스를 거치는 알고리즘을 템플릿 메소드 패턴을 통해 상태 보장과 중복되는 로직을 개선하는 것이 현재로서는 최선이 아닐까 하는 생각으로 이와 같이 구현했습니다. 추후에 관련해서 논의 해보는 시간 가지면 좋을 것 같네요:) |
PR 체크리스트
아래 항목을 확인해 주세요:
PR 유형
이 PR은 어떤 종류의 변경을 가져오나요?
관련 이슈
이슈 번호: #59
어떤 동작은 무엇인가요?
기타 정보