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)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

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

Okay