Hi Laurencio, Thank you for your comment! That's a good point. Based on Clean Architecture's "Nothing in an inner circle can know anything at all about something in an outer circle" rule, this may sound a bit weird. But I think that's acceptable as long as Usecase depends on the "interface" of Gateway, not the actual implementation of the Gateway.

The original blog (https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) shows that a Usecase is accessing Presenter via Presenter's interface(a.k.a Use Case Output Port). You can see a similar example on this page; https://paulovich.net/clean-architecture-for-net-applications/

So in a broad sense of Clean Architecture, Usecase could access Presenter/Gateway(DataAccess, Repository) via its interfaces.

In SCA, it prefers simpler one-way dependency: View => Presenter => Usercase => Gateway. So Usecase in SCA only has a dependency on Gateway "via its interface".

--

--

Genki Sano (Co-founder & CTO, Telexistence Inc.)
Genki Sano (Co-founder & CTO, Telexistence Inc.)

Written by Genki Sano (Co-founder & CTO, Telexistence Inc.)

Co-founder & CTO of Telexistence Inc. Roboticist to make End-to-End system for AI x Teleoperation x Robotics. https://www.linkedin.com/in/genkisano/

No responses yet