Skip to content
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

๐Ÿ”จ[refactor] ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ ๊ด€๋ จ Converter์™€ ResponseDTO๋“ค ๋ฆฌํŒฉํ† ๋ง #85

Closed
2 tasks done
koojun99 opened this issue Apr 4, 2024 · 0 comments ยท Fixed by #99
Assignees
Labels

Comments

@koojun99
Copy link
Contributor

koojun99 commented Apr 4, 2024

๐Ÿ”จ ๋ฆฌํŒฉํ† ๋ง์ด ํ•„์š”ํ•œ ๋ถ€๋ถ„

Converter ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๋ฅผ static์œผ๋กœ ์„ ์–ธํ•˜๋Š” ๊ฒƒ์€ ํ•„์ˆ˜๋Š” ์•„๋‹ˆ์ง€๋งŒ, ์ผ๋ฐ˜์ ์œผ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ด์œ ๋กœ ๊ถŒ์žฅ๋ฉ๋‹ˆ๋‹ค:

  1. ์ƒํƒœ ๋…๋ฆฝ์„ฑ: ๋Œ€๋ถ€๋ถ„์˜ ๋ณ€ํ™˜(Converter) ๋กœ์ง์€ ์ƒํƒœ(state)๋ฅผ ๊ฐ€์ง€์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ฆ‰, ์ž…๋ ฅ ๊ฐ’๋งŒ ์žˆ์œผ๋ฉด ๋™์ผํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ์ˆœ์ˆ˜ ํ•จ์ˆ˜(pure function)์˜ ํ˜•ํƒœ๋ฅผ ๋ฑ๋‹ˆ๋‹ค. ๋ฉ”์„œ๋“œ๋ฅผ static์œผ๋กœ ์„ ์–ธํ•จ์œผ๋กœ์จ ์ด ๋ฉ”์„œ๋“œ๊ฐ€ ์–ด๋–ค ์ƒํƒœ์—๋„ ์˜์กดํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฒƒ์„ ๋ช…์‹œ์ ์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  2. ํŽธ์˜์„ฑ: static ๋ฉ”์„œ๋“œ๋Š” ๊ฐ์ฒด์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•˜์ง€ ์•Š๊ณ ๋„ ์ง์ ‘ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, ์‚ฌ์šฉํ•˜๊ธฐ๊ฐ€ ํŽธ๋ฆฌํ•ฉ๋‹ˆ๋‹ค. ๋ณ€ํ™˜ ๋กœ์ง์„ ํ•„์š”๋กœ ํ•˜๋Š” ๊ณณ ์–ด๋””์—์„œ๋‚˜ ์‰ฝ๊ฒŒ ์ ‘๊ทผํ•˜์—ฌ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  3. ์„ฑ๋Šฅ: static ๋ฉ”์„œ๋“œ๋Š” ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ ๋น„์šฉ์ด ๋“ค์ง€ ์•Š์œผ๋ฏ€๋กœ, ๋ฏธ์„ธํ•˜๊ฒŒ๋‚˜๋งˆ ์„ฑ๋Šฅ์ ์ธ ์ด์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ณ€ํ™˜ ๋กœ์ง์ด ๋ณต์žกํ•˜์ง€ ์•Š๊ณ  ์ž์ฃผ ํ˜ธ์ถœ๋˜๋Š” ์ƒํ™ฉ์—์„œ ์ด์ ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

API ๋ช…์„ธ์„œ์— ์ˆ˜์ •์ด ์ด๋ฃจ์–ด์ง์— ๋”ฐ๋ผ ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ ๊ด€๋ จ DTO๋“ค์˜ ํ•„๋“œ๋ช…์„ ๋ณ€๊ฒฝํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋ฆฌํŒฉํ† ๋ง ์ž‘์—… ๋ธŒ๋Ÿฐ์น˜

โœ… refactoring TODO

  • Converter ํด๋ž˜์Šค ์† ๋ฉ”์„œ๋“œ๋“ค์„ static์œผ๋กœ ๋ณ€ํ™˜
  • ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ ๊ด€๋ จ DTO๋“ค์˜ ํ•„๋“œ๋ช…์„ ๋ณ€๊ฒฝ
@koojun99 koojun99 self-assigned this Apr 4, 2024
@koojun99 koojun99 added the โ™ป๏ธ refactor Refactoring code label Apr 4, 2024
@koojun99 koojun99 changed the title ๐Ÿ”จ[refactor] Converter ํด๋ž˜์Šค ์† ๋ฉ”์„œ๋“œ๋ฅผ static์œผ๋กœ ์„ ์–ธํ•˜๊ธฐ ๐Ÿ”จ[refactor] ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ ๊ด€๋ จ Converter์™€ ResponseDTO๋“ค ๋ฆฌํŒฉํ† ๋ง Apr 10, 2024
CYY1007 added a commit that referenced this issue Apr 10, 2024
[REFACTOR]/#85 - Converter์™€ ResponseDTO๋“ค ๋ฆฌํŒฉํ† ๋ง
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant