Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Movie vs MovieEntity #24

Closed
carterhudson opened this issue May 25, 2018 · 7 comments
Closed

Question about Movie vs MovieEntity #24

carterhudson opened this issue May 25, 2018 · 7 comments

Comments

@carterhudson
Copy link

Are these models both part of the domain?

@android10
Copy link
Owner

Movie = Domain
MovieEntity = DataLayer

@carterhudson
Copy link
Author

carterhudson commented May 29, 2018

Is it the case that the "entities" or "domain" layer is the innermost ring, yet data structures are suffixed with "entity" in the data layer? If so, that seems confusing. Maybe I'm misunderstanding something?

@ghost
Copy link

ghost commented May 29, 2018

@carterhudson "Naming is hard" ))

Each layer can have its own models.

@carterhudson
Copy link
Author

carterhudson commented May 29, 2018

Sure, I get that naming is hard and each layer can have its own models, but what other entities are being referred to as being part of the domain layer? I see that it includes UseCases, Entities, and Repositories, so I'm trying to find out if there's some concept I'm missing.

EDIT: I did more searching and found this on the older, non-kotlin clean repo, so perhaps this answers my question. It does seem to me, however, that since the goal of this project is education, perhaps the naming conventions could be more clear? Perhaps MovieEntity could be MovieData denoting the data layer, the domain could have the canonical Movie or MovieEntity and the presentation layer could be MovieView? I'm just spitballing, but I'm trying to advocate for adopting clean and I'd like to head off any confusion if and when I have to explain these concepts to others.

@jaychang0917
Copy link

jaychang0917 commented Jun 2, 2018

IMHO, the current naming conventions is well-known in software engineering field. For example, Room uses Entity annotation to annotate a class as a db entity.

However, I am confused by the MovieView, it makes me think it is an android View but a model in presentation layer.

@carterhudson
Copy link
Author

carterhudson commented Jun 7, 2018

I think both of those conventions are well-known in-general, but when you put it in the context of Clean and accompany it with graphics and illustrations of layers that are named differently, terms start to be conflated.

@mochadwi
Copy link

mochadwi commented Jun 27, 2019

Sure, I get that naming is hard and each layer can have its own models, but what other entities are being referred to as being part of the domain layer? I see that it includes UseCases, Entities, and Repositories, so I'm trying to find out if there's some concept I'm missing.

EDIT: I did more searching and found this on the older, non-kotlin clean repo, so perhaps this answers my question. It does seem to me, however, that since the goal of this project is education, perhaps the naming conventions could be more clear? Perhaps MovieEntity could be MovieData denoting the data layer, the domain could have the canonical Movie or MovieEntity and the presentation layer could be MovieView? I'm just spitballing, but I'm trying to advocate for adopting clean and I'd like to head off any confusion if and when I have to explain these concepts to others.

Like stated here and detail explanation here for the difference. Solely, it's just naming but this convention make us a little easier to understand the architecture in the first impressions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants