-
Notifications
You must be signed in to change notification settings - Fork 46
[7팀 박희정] Chapter 3-3 기능 중심 아키텍처와 프로젝트 폴더 구조 #38
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
Open
Pheejung
wants to merge
22
commits into
hanghae-plus:main
Choose a base branch
from
Pheejung:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 각 feature에 model/과 ui/ 구조로 수정 - TanStack Query를 활용한 데이터 fetching 로직 구현 - 사용자 액션별 비즈니스 로직 분리
- shared/lib: fetch 클라이언트, queryKeys 설정 - shared/store: Jotai atoms 초기 설정
- post widget 수정(ui/와 model/ 구조로 변경) - PostsWidgetView, PostsControls, PostsDialogs 컴포넌트 구현 - 여러 features를 조합하는 위젯 레벨 상태 관리 - UI 컴포넌트와 비즈니스 로직 통합
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://pheejung.github.io/front_7th_chapter3-3/?limit=10&sortOrder=asc
과제 체크포인트
기본과제
목표 : 전역상태관리를 이용한 적절한 분리와 계층에 대한 이해를 통한 FSD 폴더 구조 적용하기
체크포인트
심화과제
목표: 서버상태관리 도구인 TanstackQuery를 이용하여 비동기코드를 선언적인 함수형 프로그래밍으로 작성하기
체크포인트
최종과제
과제 셀프회고
이번 과제를 통해 이전에 비해 새롭게 알게 된 점이 있다면 적어주세요.
이번 과제를 통해 FSD(Feature-Sliced Design) 아키텍처를 처음으로 적용해보면서 관심사 분리의 중요성을 깊이 이해하게 되었습니다. 특히 entities와 features의 개념적 차이를 명확히 구분하는 것이 어려웠지만 조금이나마 fsd 아키텍처를 알게 된 주차였던 것 같습니다.
entities와 features의 개념
entities (비즈니스 엔티티):
src/entities/post/,src/entities/user/- 게시물과 사용자라는 비즈니스 개념 그 자체features (사용자 기능/액션):
src/features/post/list/- 게시물 목록 표시 기능,src/features/post/editor/- 게시물 작성/수정 기능** 적용된 FSD 폴더 구조:**
실제 프로젝트에서 보면
이러한 구분을 통해 코드의 재사용성과 유지보수성이 크게 향상되겠구나 라는 걸 알았습니다.
본인이 과제를 하면서 가장 애쓰려고 노력했던 부분은 무엇인가요?
가장 애썼던 부분은 FSD 구조를 올바르게 적용하는 것이었습니다.
폴더 구조 설계: 각 파일이 어느 계층에 속해야 하는지 결정하는 과정이 어려웠습니다. "이 컴포넌트는 shared인가 feature인가?", "이 로직은 entities에 속하는가 features에 속하는가?"라는 고민을 많이 했습니다.
관심사 분리: 하나의 큰 컴포넌트를 여러 계층으로 나누는 작업이 특히 힘들었습니다. PostsManagerPage.tsx가 800줄이 넘는 거대한 컴포넌트였는데, 이를 entities, features, shared로 적절히 분리하는 과정에서 많은 시행착오를 겪었습니다.
TanStack Query 구현: 사실 TanStack Query 서버 상태관리로 적용을 했지만 왜인지 모른 에러로 인해 시행착오를 많이 겪었습니다. 초기 구현을 AI 코드 예제로 급히 적용하면서 캐시 동기화와 키 설계에서 오류가 발생했습니다. 결국에는 수정하지 못한채로 원복을 하여 배포를 하는 과정이 있었습니다.
아직은 막연하다거나 더 고민이 필요한 부분을 적어주세요.
shared와 features의 경계: shared/ui에 있는 컴포넌트들이 features에서 어떻게 재사용되어야 하는지, 그리고 어느 정도까지 shared로 분리해야 하는지에 대한 기준이 아직 모호합니다.
상태 관리의 위치: 전역 상태를 어느 계층에서 관리해야 하는지 아직 고민이 됩니다. entities에서 관리해야 할 도메인 상태와 features에서 관리해야 할 UI 상태의 구분이 필요할 것 같습니다.
TanStack Query: 시간이 없어 제대로 들여다보지 못하고 ai의 도움을 받아 작성을 했는데 그래서인지 에러가 나는 상황이었습니다. 그래서 좀 더 공부를 해야할 것 같습니다.
이번에 배운 내용 중을 통해 앞으로 개발에 어떻게 적용해보고 싶은지 적어주세요.
이번에 배운 FSD 구조와 관심사 분리를 앞으로의 프로젝트에 적극적으로 적용하고 싶습니다:
팀 협업 효율화: 지금 회사에서 다른 개발자들이 코드를 쉽게 이해하고 기여할 수 있도록 명확한 폴더 구조와 네이밍 컨벤션을 적용하고 싶습니다.
재사용성 극대화: entities와 shared 계층을 잘 설계하여 여러 features에서 재사용할 수 있는 컴포넌트와 로직을 만들고 싶습니다.
챕터 셀프회고
클린코드: 읽기 좋고 유지보수하기 좋은 코드 만들기
결합도 낮추기: 디자인 패턴, 순수함수, 컴포넌트 분리, 전역상태 관리
응집도 높이기: 서버상태관리, 폴더 구조
리뷰 받고 싶은 내용이나 궁금한 것에 대한 질문
과제를 하면서 제 역량의 한계를 더 명확히 보게 됐습니다. 시니어 직전으로 인정받기 위해 제가 만들어야 할 구체적 결과물은 무엇이고, 4~5년차에게 요구되는 기준(역할·기술·협업)은 어디까지인지 궁금합니다.