Skip to content

Conversation

@Kiyoung-Kim-57
Copy link
Member

🤔 배경

  • 기존에 우선적으로 P2P 연결을 위해 도메인에 위치시켰던 클라이언트들을 데이터 모듈로 연결시켰습니다.

📃 작업 내역

  1. 아래 그림과 같이 기존(AS-IS)에서 현재 형태(TO-DO)로 구조를 바꿨습니다
    image

  2. 데이터 모듈로 옮긴 ConnectionClient 객체들을 관리하는 ConnectionRepository를 생성했습니다

  • Interface는 DomainInterface에 구현체는 Domain에 구현했습니다
  1. UseCase 적용을 위해 간단한 CountClientsUseCase를 생성했습니다.

  2. UseCase 테스트를 위해 필요한 Mock 객체들과 UseCaseTests를 생성하고 테스트했습니다.

✅ 리뷰 노트

  • Repository에는 Connection들에 대한 전역 상태가 들어있고 UseCase에서는 이를 가져다 사용하는 상세 로직을 구현할 예정입니다~~

🎨 스크린샷

iPhone SE(2세대) iPhone 14 iPhone 16 Pro Max
스샷 스샷 스샷

🚀 테스트 방법

  • Domain Testing에 CountClientsUseCaseTests에서 테스트하실 수 있습니다

Kiyoung-Kim-57 and others added 14 commits November 20, 2024 14:14
- Signaling Client, WebRTC Client, Connection Client를 Data 모듈로 이동
- 기존 Domain과 DomainInterface를 의존하던 것을 수정했습니다

Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
- ConnecionClient Interface에서 채택하고 있던 Delegate를 이동하는 과정에서 제거했습니다.
- 이에 따라 ConnectionClientImpl에서 명시적으로 Delegate들을 채택했습니다.

Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
- 임시로 Clients의 수를 제공하는 UseCase를 생성했습니다

Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
- ConnectionClient Mock 생성
- ConnectionRepository Mock 생성
- CountClientsUseCase Mock 생성

Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
@Kiyoung-Kim-57 Kiyoung-Kim-57 added ✨ feat 새로운 기능 추가 ⚙️ refactor 코드 정상화 labels Nov 20, 2024
@Kiyoung-Kim-57 Kiyoung-Kim-57 linked an issue Nov 20, 2024 that may be closed by this pull request
4 tasks
Kiyoung-Kim-57 and others added 2 commits November 20, 2024 16:12
Co-Authored-By: Youngkyu Song <ace_lephant@naver.com>
컨플릭트를 해결하면서 의존성이 날아갔었음..
Copy link
Collaborator

@hsw1920 hsw1920 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UseCase만 알아도 돼서 훨씬 부담이 적어져서 좋네요 ㅎㅎㅎ

Copy link
Collaborator

@0Hooni 0Hooni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

좋은 리팩토링이네요!

사용성이 더 좋아진것 같아요 👍

@youn9k youn9k merged commit 02d6d93 into develop Nov 21, 2024
1 check failed
@youn9k youn9k deleted the feat/#61-architecture-refactoring branch November 21, 2024 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 새로운 기능 추가 ⚙️ refactor 코드 정상화

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Domain에 있는 Client들을 Data로 이사

5 participants