bxcodec / go-clean-arch

Go (Golang) Clean Architecture based on Reading Uncle Bob's Clean Architecture
MIT License
9.03k stars 1.19k forks source link

What is the entity, is it swollen in the domain? #60

Open helios741 opened 3 years ago

helios741 commented 3 years ago

image Do the innermost entities in the neat architecture correspond to Auther and Article in the domain? Feel they are more like parameters.

aitsuki commented 2 years ago

I think the circles is not represent layers. This picture only use to explain the dependencies rules. The innermost circle means that it can be accessed by all members within the system. So you can move entites to other package, for example to a "data" package, in the same place as the Repository. You can refer to this 👇 project, although it is an Android project, but there is a reference value. architecture-samples-usecases

bxcodec commented 2 years ago

agree on @aitsuki

The entity on the diagram, I move it to the domain package. So all other layers can import it easily without a cyclic import problem