Skip to content

[H팀 서지민] 백엔드 API 과제 제출 - #1

Open
Lauiee wants to merge 13 commits into
jinu0328:mainfrom
2024-Techeer-Partners-5th-Team-H:main
Open

[H팀 서지민] 백엔드 API 과제 제출#1
Lauiee wants to merge 13 commits into
jinu0328:mainfrom
2024-Techeer-Partners-5th-Team-H:main

Conversation

@Lauiee

@Lauiee Lauiee commented Nov 20, 2024

Copy link
Copy Markdown

No description provided.

@Lauiee Lauiee changed the title [techeer-partners-api-session] 서지민 과제 제출 [H팀 서지민] 과제 제출 Nov 21, 2024
@Lauiee Lauiee changed the title [H팀 서지민] 과제 제출 [H팀 서지민] 백엔드 API 과제 제출 Nov 21, 2024

@jinu0328 jinu0328 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

추가 요구사항까지 아주 뚝딱 구현하셨군요 👍 원래 API 서버 구현에 능숙하신 건 알고있었지만 생각보다 더 꼼꼼히 구현해주셔서 잘 보았습니다. 과제하시느라 고생 많으셨습니다!

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

모든 API가 동일한 형태의 응답을 반환하도록 템플릿을 정해주신 것도 너무 좋습니다!
다만 data가 없는 경우 빈 문자열보다는 명시적으로 null을 할당하는 것이 의미 전달이 더 잘 될 것 같습니다.
추가로 타입 추론을 하지 않는 Object보다는 제네릭 타입 T를 활용하시는 것도 한번 고려해보시면 좋을 것 같습니다 👍

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

image image

피드백 반영해봤는데 맞게 수정했는지는 모르겠네요

다만 타입 안정성 면에서 확실히 더 좋아보이긴 합니다

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

현재 코드에서 Task 클래스는 @Getter 어노테이션을 사용하여 모든 필드의 Getter 메서드를 자동으로 생성하고 있습니다. DTO들이 잘 구성되어있는 만큼 엔티티의 Getter를 사용하지 않아도 될 방식이 존재할 것 같습니다. 엔티티 <-> DTO의 변환을 담당하는 Mapper 클래스의 도입이 예시가 될 수 있겠네요. 도메인 객체에 대한 Setter뿐만 아니라 Getter가 지양되는 이유도 한번 찾아보시면 도움이 될 것 같습니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Setter안쓰는건 쉬운데 Getter안쓰기가 은근 어렵더라구요 좀 더 공부해보고 이부분은 다음 프로젝트나 해커톤 하게 될 때 반영해보겠습니다...

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.

2 participants