iOS-Clean-Architecture-MVVM icon indicating copy to clipboard operation
iOS-Clean-Architecture-MVVM copied to clipboard

[Question] `Data` package depends on `Networking` package?

Open hoangelec opened this issue 2 years ago • 2 comments

First of all, thank you for your brilliant work publishing your article and the example source code.

I have a question regarding the diagram in your article, according to your diagram, the dependency direction should be from the "Networking" package to "Data" package image

However in your example code, Data is depending on Networking, is this a violation of dependency direction? image

hoangelec avatar Oct 22 '23 16:10 hoangelec

The dependency of the network layer on the data repository comes from this method: APIEndpoints.getMovies(with moviesRequestDTO: MoviesRequestDTO)

dodomarocgenex avatar Oct 22 '23 18:10 dodomarocgenex

Hello, yes Data Layer Module can dependent on Networking Module. It needs it in order to fetch data from network.

kudoleh avatar Oct 22 '23 19:10 kudoleh