Skip to content

How to pass the android dependent data from data-layer to presentation-layer #182

@ghost

Description

Hi all, I am currently learning about android-clean architecture.
Related to #64 , I am thinking about how to pass the Android-specific data (like bitmap) from data-layer to presentation-layer through domain-layer.

IMO, I have to answer for that.

  1. Data-layer should only handle ID for the ImageView (like url or column for DB), and never hold android-specific data (like android.graphics.Bitmap). In that case, presentation-layer should have the role to fetch data from Web (like AutoLoadImageView in this project) or access data-layer directly.
  2. Add another layer as a helper for domain-layer (domain-service) and handling flow of framework dependent data. Now it's ok to pass Bitmap from data-layer to presentation-layer through domain-service .

How do you think ?
And thank you for the great project !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions