DEV Community

LiHan
LiHan

Posted on • Edited on

[Android] UserListApp - Folder Create - Part2

Package

  • feature_user
    • data
      • repository
      • local
        • model
      • remote
        • model
    • domain
      • model
      • repository
    • di
    • presentation

Data

  • local -> Roomdatabase (Android內建的資料庫)
    model -> XXXEntity.class

  • remote -> Retrofit (需要調用網路)
    model -> XXXDto.class

  • repository -> “實作”獲取資料的介面Interface


Domain

  • model -> 主要是內部使用的class(用來顯示的類別)
  • repository -> 獲取資料的介面Interface
  • util -> mapper (Dto , Entity to Model) ex: UserDto , UserEntity -> User

Presentation
-> Screen(Compose)
-> ViewModel
-> Component

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay