The application uses Dagger2 to inject repositories
(whom maintain data layer and business logic) into different components of the app (fragments, activities, views, services, test cases, presenters, etc...).
Important Note: All presenters and classes interacts with the repositories
interfaces only and does not interact with Preference Helper directly.
Repositories interfaces can be found under data.repositories
package. Each repository is responsible for handling its side of the business logic.
Dagger2 should maintain only one copy of each repository per app session (Singlton behaviour).
- GeofenceRepository: Responsible for all geofence data such as (adding geofences, fetching geofences, removing geofences,and etc...).
Model View Preseneter known as MVP is the the architecture pattern used to develop SlateStudio Geofence TEst application UI. Model: It is responsible for handling the data part of the application. View: It is responsible for laying out the views with specific data on the screen. Presenter: It is a bridge that connects a Model and a View. It also acts as an instructor to the View. To read more about MVP Architecture you may refer to these links:
- Dagger2 - Dependency injection framework
- Anko - Set of Kotlin extensions to make android development faster
- RxJava and RxAndroid - Reactive programming, simplifies work with threading and concurrency in java and android.
- Mockito and Robolectric - Unit test framework and mocking tools.