Open zkdzegede opened 7 years ago
I think you took the UserEntity class found in the data module literally as entity inside the domain layer. In the project you find three modules: data, presentation and domain. data knows about domain but not the other way around actually. Just refer to this image for it to be clear: https://8thlight.com/blog/assets/posts/2012-08-13-the-clean-architecture/CleanArchitecture-8b00a9d7e2543fa9ca76b81b05066629.jpg Data module is found in the outermost layer in that picture. So it actually is pointing inwards there's just a misunderstanding between the class name UserEntity and the Entities layer
I keep seeing people do this in their clean architecture examples.
They put the mapper in the entity layer, pointing to a domain object. Doesn't this break the dependency rule?
Or am I missing where the entity -> use case -> presenter -> ui boundary is being implemented....
https://github.com/android10/Android-CleanArchitecture/blob/master/data/src/main/java/com/fernandocejas/android10/sample/data/entity/mapper/UserEntityDataMapper.java#L19