question
mikek9084 opened this issue · 1 comments
mikek9084 commented
thank you very much ,
what are the ideas behind? why they cannot be in one module with three folders
-
":data:trailers:implementation"
-
":data:trailers:testing"
-
":data:upcomingshows:api"
thomaskioko commented
Hey @mikek9084, Thanks for dropping by.
We could easily combine api
and implementation
modules together. However, it was a pain to maintain. I wrote an article about it sometime back. (It's due for an update).
I went with this approach for various reasons:
- Code organization & Separation: This pattern allows me to divide the app into distinct layers. By doing so, we only expose the API modules to the
presenter
modules. - Modularity: I can easily swap out different data sources in the
implementation
module without affecting the rest of the application. - Testing:
data:trailers:testing
is explicitly used for Testing. It allows us to provide fakes with working implementations instead of using mocks in Unit tests.
I hope this answers your question or gives you some insight into why I chose this approach.