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)

Dynatrace image

Highlights from KubeCon Europe 2025

From platform engineering to groundbreaking advancements in security and AI, discover the KubeCon Europe 2025 insights that are shaping the future of cloud native observability.

Learn more

AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️