thomaskioko/tv-maniac

question

mikek9084 opened this issue · 1 comments

thank you very much ,
what are the ideas behind? why they cannot be in one module with three folders

  1. ":data:trailers:implementation"
    
  2. ":data:trailers:testing"
    
  3. ":data:upcomingshows:api"
    

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:

  1. 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.
  2. Modularity: I can easily swap out different data sources in the implementation module without affecting the rest of the application.
  3. 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.