-
Notifications
You must be signed in to change notification settings - Fork 116
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
Dependency Rule is Violated #3
Comments
Typically the way I solve this is to put the interface of the gateway in the Use Cases component. The Gateway implementation is in the Gateway component. This keeps the arrows pointing in the right direction.
I’d be surprised if we didn’t do that in the series. If not, it was an oversight.
On Jun 29, 2018, at 0:12 , Curran Kelleher ***@***.***> wrote:
@unclebob <https://github.com/unclebob> Is it not true that all the arrows should point inward?
<https://user-images.githubusercontent.com/68416/42074236-b6537876-7b88-11e8-87be-cfee0f435b0b.png>
In this codebase, I see that CodecastDetailsUseCase (in package cleancoderscom.usecases) imports cleancoderscom.Context, which in turn imports cleancoderscom.gateways.CodecastGateway (from package cleancoderscom.gateways).
Therefore, doesn't the Use Case layer import from the Gateway layer, which violates the dependency rule?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#3>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AACQJVgXPTlN0FZlFTon20C2aqGUh8kPks5uBbcsgaJpZM4U8cmh>.
Robert C. Martin (Uncle Bob) | [email protected] <mailto:[email protected]>
Uncle Bob Consulting LLC. | @unclebobmartin
847.922.0563 | cleancoder.com <http://cleancoder.com/>
|
@unclebob Thank you so much for your response. I appreciate your presence here. Thank you for all your contributions to the field. I've become a huge fan recently, watching all your talks on YouTube and trying to really implement Clean Architecture in a large project. All the best. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@unclebob Is it not true that all the arrows should point inward?
In this codebase, I see that
CodecastDetailsUseCase
(in packagecleancoderscom.usecases
) importscleancoderscom.Context
, which in turn importscleancoderscom.gateways.CodecastGateway
(from packagecleancoderscom.gateways
).Therefore, doesn't the Use Case layer import from the Gateway layer, which violates the dependency rule?
The text was updated successfully, but these errors were encountered: