Git Product home page Git Product logo

cleanarchitecturestudy's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

cleanarchitecturestudy's Issues

DI 적용

프로그래밍 요구사항

  • Hilt를 사용해서 의존성을 주입해주세요.
    • UseCase가 Inject되어있는 빈 ViewModel까지 만들어주세요.
      • ViewModel을 만들어야만 정상적으로 DI가 적용되서 빌드가 되는지 확인이 가능합니다.
  • data 모듈에는 internal 키워드를 유지해주세요.
  • app 모듈을 제외한 나머지 모듈에서는 hilt-core를 사용하시면 됩니다.

data, domain 모듈 만들기

요구 사항

  • 순수 코틀린 모듈인 domain 모듈을 만든다.
  • 순수 코틀린 모듈인 data 모듈을 만든다.
  • data 모듈은 domain 모듈을 implementation 해야 한다.
  • app 모듈은 data, domain 모듈을 implementation 해야 한다.

Flow

image

HTTP 연동

요구 사항

네이버 API를 사용해서 영화 정보를 가져와야 합니다

  • GET, v1/search/movie.json

프로그래밍 요구 사항

  1. 영화 정보를 가져오는 API는 data 모듈에 구현되어야 합니다
  2. data 모듈의 구현체는 모두 internal 키워드가 붙어야 합니다

UseCase 구현

요구 사항

UseCase를 구현합니다.

UseCase 사용 시 장점

  • ViewModel에서 사용자가 어떤 행위를 하는지 쉽게 파악이 가능합니다.
  • 행위를 추가하고 제거할 때 코드 변경이 적습니다.

UseCase 사용 시 단점

  • 코드가 많이 생성됩니다.
  • ViewModel의 생성자가 많이 생길 수 있습니다. (Home 화면일 경우)

프로그래밍 요구 사항

  • Repository 인터페이스는 domain 모듈에 있어야 하며, 구현체는 data 모듈에 있어야 합니다.
  • Repository 구현체에서 리턴하는 타입은, data 모듈에 정의된 모델이 아닌 domain 모듈에 정의된 모델로 리턴해야 합니다.

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.