Skip to content
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

Some questions #1

Closed
devtronic opened this issue Jun 24, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@devtronic
Copy link

commented Jun 24, 2019

Hi, I've read your tutorial on medium. It's very well explained, thank you.

I'm new in this topic and I've some questions about your source

src/
|- data
   |- repository  <- Contains the implementations
      |- ApiWeatherRepository.src
|- domain
   |- entity <- Contains your business objects
      |- Weather.src
   |- repository <- Contains the interfaces for dependency inversion
      |- WeatherRepository.src
|- feature1
   |- data <- optional; data layer; only contains things for this feature
   |- domain <- optional; domain layer; only contains things for this feature
   |- presentation
      |- presenter
         |- Feature1Presenter.src
      |- view
         |- Feature1View.src
|- feature2
   |- presentation
      |- presenter
         |- Feature2Presenter.src
      |- view
         |- Feature2View.src
|- ...
Pros Cons
Screaming Architecture If you look for a piece of code you've to search in multiple places
Layer based structure
Scalable / No messy big directories

What do you think about it?

Can you give an example, how you would implement the presenter / view logic?
Image

@vince-nyanga

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2019

Hi,
I'm also fairly new to this and still learning.
I agree with you -- the interface should be named IWeatherApi. With respect to the code structure, like you said, when one would have to search in multiple locations to find a piece of code even though it will scale very well. In my opinion your code structure works well except for that one disadvantage.

@devtronic

This comment has been minimized.

Copy link
Author

commented Jun 25, 2019

Thanks for your reply 🙂

@devtronic devtronic closed this Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.