spy16 / droplets

Droplets is a platform for Gophers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

General question about the Dependency Rule

bj4rtmar opened this issue · comments

If a layer needs to import from an inner layer, should it only import something from their next inner layer or is it ok to "jump over" inner layers and import from there? For example, is it ok for the interface layer to import from the domain layer (skipping over the usecase layer)?

Skipping over is completely fine. The reason for this rule is that a change in an external dependency should have no effect on your core business logic.. since skipping over a layer does not break this promise it should be alright.