Giter Site home page Giter Site logo

Comments (1)

suyeon0 avatar suyeon0 commented on July 28, 2024

05.17 코드 리뷰 반영

  • UserRepository 는 domain 패키지 하위
  • Address Value Object : 배송과 같은 도메인에서도 사용할 수 있으므로 common 의 성격을 갖고 있음. common 패키지 하위로 이동
  • Valid 어노테이션을 사용하는 것이 아닌 코틀린스러운 validation 로직으로 수정
  • UserCreateCommand 및 API 세분화 : AdditionalInfo(mobile, address) 추가
  • 코틀린의 String <> 자바의 String --> org.apache.commons:commons-lang3 같은 외부 라이브러리로 null 체크 안됨
  • interface 내 abstract 제외
  • 서비스 로직에 requestCommand 가 넘어가면 안된다(requestCommand 는 표현 영역 소속) --> DTO 를 따로 만들거나 3개 이하라면 필드값을 각각 넣어서 서비스 메소드를 호출하자
  • findByEmail: Optional
  • 도메인 로직과 서비스 로직의 분리
* 구현 필요한 로직 : 삭제된 유저는 DELETED 상태로 변경되고 조회할 수 없다
* 유저가 삭제된 상태인지 확인하는 것 -> 도메인 기능(User)
* 삭제된 유저는 조회 API 에서 exception 을 발생시키는 것 -> 서비스 기능(UserService)
  • return 타입이 있는 메소드 : if 에서 Exception 을 발생시킬 수 있다면 else 에서 return 로직을 명확하게 표기하기

from racket.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.