android / architecture-samples

A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.
Apache License 2.0
44.38k stars 11.63k forks source link

Why is the domain model located in the data folder? #985

Open sean5940 opened 10 months ago

sean5940 commented 10 months ago

Why is the domain model located in the data folder?

From what I understand, I think the dependency rules are directed inwards and there is a domain area at the very inside. When I think about the directory structure of this architecture and look at the directory structure of the sample project, I wonder why there are no models in the domain folder.

Is there perhaps a special reason?

When I think about it myself, I think that ultimately most of the things expressed in apps are strongly dependent on data received from outside. Is this correct?

And would it be very strange to move the models from the data folder to the domain folder?

gulamsounov commented 10 months ago

Why is the domain model located in the data folder?

From what I understand, I think the dependency rules are directed inwards and there is a domain area at the very inside. When I think about the directory structure of this architecture and look at the directory structure of the sample project, I wonder why there are no models in the domain folder.

Is there perhaps a special reason?

When I think about it myself, I think that ultimately most of the things expressed in apps are strongly dependent on data received from outside. Is this correct?

And would it be very strange to move the models from the data folder to the domain folder?

Where did you find the domain folder?

sean5940 commented 9 months ago

@gulamsounov The 'domain' folder was visible in sample projects that promoted a clean architecture. I used to see the "domain" folder in the repository branches, but now the branches have been reorganized.