Skip to content

Conversation

@Jo-Minseok
Copy link
Member

@Jo-Minseok Jo-Minseok commented Jan 8, 2025

🔨 테스크

데이터 전처리(TypeORM 엔티티 매핑) Repository vs Service?

함께 토론 해주신 @asn6878 @CodeVac513 감사드립니다!!

  • Repository 파

    • TypeORM 엔티티와 매핑하는 행위는 비즈니스 로직보다 DB와 더 밀접한 연관이 있다.
    • Service 계층이 비대해지면 비즈니스 로직 파악이 어렵다.
  • Service 파

    • 예외 경우가 있을 수 있다. ex) "loadRssFeeds의 글 작성자(feed.blog)는 newRssAccept이다.' 라는 것을 DB 입장에서도 볼 수 있지만, 서비스 입장에서도 보면 작성자를 대입해주는 것이기에 비즈니스 로직이다.
    • 레포지토리 계층은 간단하게 처리할 수록 재사용 가능성이 생긴다.

결론

  1. GPT를 사용해서 답을 찾아도 GPT 가스라이팅 하면 그대로 답이 나오기 때문에 의미가 없다.
  2. 그러므로 팀 내에서 결정한다.
  3. 정답은 없고, 나중에 어떻게 될지 모르기 때문에 우선은 작업자의 선택에 따른다. -> Repository 계층에서 TypeORM 매핑, 전처리 수행

📋 작업 내용

  • RSS 승인시 데이터 전처리 부분 Repository 계층으로 위임

@Jo-Minseok Jo-Minseok self-assigned this Jan 8, 2025
@Jo-Minseok Jo-Minseok added the 🔨 Refactor 리팩토링 (구조 변경) label Jan 8, 2025
Copy link
Member

@asn6878 asn6878 left a comment

Choose a reason for hiding this comment

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

확인 했습니다!
고생 하셨어요 👍

Copy link
Collaborator

@CodeVac513 CodeVac513 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Jo-Minseok Jo-Minseok merged commit 70923c1 into main Jan 8, 2025
1 check passed
@Jo-Minseok Jo-Minseok deleted the refactor/preprocessing-hierarchy branch January 8, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 리팩토링 (구조 변경)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants