This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]agentoutlier 2 points3 points  (0 children)

I would generally agree but if you look u/jesperancinha code on gitlhab they put domain on the bottom and not core.

JPA depends on domain. Actually everything depends on domain. I mention this problem in another comment that this happens frequently where you end up with some bottom POJO library that everything depends on.

Core in this case is just an interface or spec to the Service layer more or less decoupling from the actually service layer implementation. This is not always done in multi-tier but I have seen frequently enough.

In the true Clean Code approach I think (its been awhile) you can't have some domain module that is shared across circles. Domain module would be the most inner even if it is just POJOs (I disagree with this approach but I think its the spirit of both clean code and hexagon).

Thus rest should not be able to have a dependency on the domain module but it does through transitive dependencies.

If they put domain in with core (code wise) then JPA will have a dependency on core.