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
nenick edited this page Nov 23, 2014
·
8 revisions
Reason for this structure
you can only access classes from the direct underlying layer
clear separated responsibility for view, domain and data logic
App
Wires all modules together to an android app. Integrations tests based on Robolectric and Espresso are done here.
Data
Storage (database, file, ...) and network handling. Synchronisation between network and storage. Hides how to access necessary data.
The DataRepository module is the connection between Data and Domain.
Domain
Implements use cases which are offered at presentation.
The DomainInteractor module is the connection between Domain and Presentation.
Presentation
View logic.
Shared
Contains data transfer object, perhaps later comes a better solution.
Structure functional vs technical
I'm prefer the functional approach to structure the packages. This conflicts a bit with clean architecture module structure but inside each module is the functional package approach. This not implies that each package is contained in each module. Each module will have its own functional view how organise the classes.
See also http://www.javapractices.com/topic/TopicAction.do;jsessionid=0BF4844350780B6F55476E1137FF4893?Id=205