You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of this repo is to demo what using uncle bob's clean coding principles looks like on android but, doesn't the package structure completely go against what he suggests. Packages shouldn't be named presenters or views, MVP is a pattern not a specific part of the application. Instead, I believe that each activity should be in its own package with all of its components(presenter, interactor ...). This also has the benefit of being able to make the presenters package local. What are your thoughts?
@japplin This repo is just an example and possible interpretation of Clean Architecture. You should not follow the same way, this is like understanding of @android10 of Uncle Bob's architecture.
As for naming convention again it depends.
You are trying to achieve something like VIPER in Android world (ViewController)
I try to think of activity as a view. In Android SDK activity is god object, but however its main purpose to display information, so I try to delegate some parts provided by activity to specific component which should be responsible for that, for example Permission Handler, Context...
Your proposal also have a lot of benefits, personally I've used approach of acting Activity as Fragment container and in this case one module contained one activity and a lot of Fragments.
You can implement your idea and share your experience with others, it would be great.
You're right, @android10 has address this in this talk. He said something like,
Do as I say, not as I do
Maybe because primary usage for this repo is to demonstrate Clean Architecture in Android, not a full blown implementation. I've been using your approach for some of my apps and it works fine.
Reacted by Fernando Cejas, Oleksandr Molochko and David Aguiar
@japplin that can be interpreted in different ways but there is actually a refactor to get rid of the modules and have every feature in its own package. Neither silver bullets nor perfect solution.
@japplin you should separate the initial directories by data, domain and presentation, but you should make sure that you separate presentation layer by features instead of activity/adapter/etc
Activity
CROSP commentedon Dec 3, 2016
@japplin This repo is just an example and possible interpretation of
Clean Architecture. You should not follow the same way, this is like understanding of @android10 of Uncle Bob's architecture.As for naming convention again it depends.
You are trying to achieve something like VIPER in Android world (ViewController)
I try to think of activity as a view. In Android SDK activity is god object, but however its main purpose to display information, so I try to delegate some parts provided by activity to specific component which should be responsible for that, for example Permission Handler, Context...
Your proposal also have a lot of benefits, personally I've used approach of acting Activity as Fragment container and in this case one module contained one activity and a lot of Fragments.
You can implement your idea and share your experience with others, it would be great.
aldoKelvianto commentedon Dec 9, 2016
You're right, @android10 has address this in this talk. He said something like,
Maybe because primary usage for this repo is to demonstrate Clean Architecture in Android, not a full blown implementation. I've been using your approach for some of my apps and it works fine.
android10 commentedon Dec 9, 2016
@aldoKelvianto exactly 😄
android10 commentedon Dec 9, 2016
@japplin that can be interpreted in different ways but there is actually a refactor to get rid of the modules and have every feature in its own package. Neither silver bullets nor perfect solution.
Check it out: #103
Zhuinden commentedon Mar 5, 2017
@japplin you should separate the initial directories by
data,domainandpresentation, but you should make sure that you separatepresentationlayer by features instead ofactivity/adapter/etc