Giter VIP home page Giter VIP logo

20th-all-rounder-team-2-android's People

Contributors

laco-dev avatar toastmeister1 avatar yjyoon-dev avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

yjyoon-dev

20th-all-rounder-team-2-android's Issues

유저 도메인 모델

data class User(
   val hashId: String,
   val profile: Profile // 프로필을 null로 둘지 기본 값을 둘지?
)
data class Profile(
   val nickname: String, // 닉네임
   val imageUrl: String, // 프로필 이미지
   val selfIntroduction: String, // 자기소개
   val webUrls: List<String>, // 웹사이트 (0개 이상)
)

임시 스플래시 화면

  • 앱이 시작하면 스플래시 화면이 보여야 한다.
  • 별도 디자인 시안이 없기 때문에 아무런 UI도 보여주지 않아도 된다.
  • 1.5초 후 MainActivity로 이동한다.

[클린 아키텍쳐 연습] 이름을 가져오는 기능

개요

  • 클린 아키텍쳐 기반의 프로젝트에서 하나의 비즈니스 로직을 구현 해 보는 과정

요구사항

  • 화면에 이름을 보여준다.
  • UI 레이어는 구현하지 않는다 (ViewModel 까지만)
  • 이름은 로컬 메모리에서 가져올 수 있으며 로컬에 데이터가 없는 경우 서버로부터 가져온다.
  • 실제 디비나 서버를 구현하는게 아닌 가정 하에 결과 값을 반환한다.
internal class UserLocalDataSourceImpl: UserLocalDataSource {
    suspend fun getName(): Result<String?> {
      return Result.success(null)
   }
}

internal class UserRemoteDataSourceImpl: UserRemoteDataSource {
    suspend fun getName(): Result<String> {
      return Result.success("Android")
   }
}
...
  • 뷰모델에서는 GetNameUseCase()를 사용해서 이름을 가져와야 한다.
  • Hilt를 이용해 각 컴포넌트를 주입받도록 한다.

임시 로그인 화면

시나리오

스플래시 화면

  • 로그인 되어 있는 경우 : MainActivity
  • 로그인 되어 있지 않은 경우 : LoginActivity
    : 뷰모델에서 비즈니스 로직 수행 후 적절한 State로 결과를 알림

로그인 화면

  • 카카오 버튼 : MainActivity 이동
  • 구글 버튼 : MainActivity 이동

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.