From 46f54a5ae1bb6a8e30e6027774edf9a1122d7ca3 Mon Sep 17 00:00:00 2001 From: Emmanuel Guerra Date: Tue, 28 Jul 2020 11:16:33 -0400 Subject: [PATCH] Created ARCHITECTURE.md Removed MainActivity unused --- ARCHITECTURE.md | 40 ++++++++++++++++++ app/src/main/AndroidManifest.xml | 1 - .../eagskunst/apps/myngs/ui/MainActivity.kt | 15 ------- app/src/main/res/layout/activity_main.xml | 18 -------- arch_diagram.jpg | Bin 0 -> 15461 bytes .../eagskunst/apps/myngs/base/ColdEvent.kt | 20 --------- 6 files changed, 40 insertions(+), 54 deletions(-) create mode 100644 ARCHITECTURE.md delete mode 100644 app/src/main/java/com/eagskunst/apps/myngs/ui/MainActivity.kt delete mode 100644 app/src/main/res/layout/activity_main.xml create mode 100644 arch_diagram.jpg delete mode 100644 base/src/main/java/com/eagskunst/apps/myngs/base/ColdEvent.kt diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 0000000..27ab1a6 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,40 @@ +# Architecture + +This app follows the Clean Architecture pattern with separated modules. + +* base: Holds common code shared between all the modules, like Constants, Result wrappers and Async utilities. +* base-android: Common code for android modules. For time, this app has all the features on the app module. But +if the module decouples it's features to separated modules, it will be less painful to migrate. +* data: Holds the DAOs, Entities, Stores, Sources, Services, Repositories and the DB abstraction. +* domain: Have the interactors that will make request to the repositories and return `DataResults`. +* data-android: Creates the Room Database and the modules used for dependency injection. +* app: Main module, which have the views, viewmodels that use the interactors for requesting data and +the states of the application. Has three folders: +** app: Koin modules for app's dependencies (ViewModels mostly) and the Application class. +** ui: Separated by features, almost all have 3 things in common: an activity, a view state and a viewmodel. +** utils: Just a Constants file. +* tests: Centralized module to test the others ones. + +As most of stuff, and image say more than words: + +[Diagram](arch_diagram.jpg) + +UI observes LiveData exposed by the ViewModel. The UI makes request to the ViewModel. +The ViewModel launches a coroutine that awaits for the results to be returned by the Interactor. +One the results arrives, they get dispatched to the LiveData as a new ViewState + +## Test coverage + +The unit test are run against the ViewModels. After implementing the pagination feature, the test for the HomeViewModel +changed and became difficult to fix. The reason for this is because the Paging library does not have a module for testing purposes. +The interactors are mocked for this tests. + +Currently, only 1 test is passing for the HomeViewModel. The rest test cases for the other ViewModels are passing. To run them, use the following command: +`./gradlew test` +You can check the _without-paging_ branch to check all the test passing. + +The instrumented test are run against the interactors. Koin is used for injecting all the dependencies, with the exception of the Services and the RoomDb itselft. +The services and mocked and the DB is created in memory thanks to Room testing support. +To run them, use the following command: + +`./gradlew connectedAndroidTest` \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 90fc2ae..6833004 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,7 +26,6 @@ - \ No newline at end of file diff --git a/app/src/main/java/com/eagskunst/apps/myngs/ui/MainActivity.kt b/app/src/main/java/com/eagskunst/apps/myngs/ui/MainActivity.kt deleted file mode 100644 index 7334c25..0000000 --- a/app/src/main/java/com/eagskunst/apps/myngs/ui/MainActivity.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.eagskunst.apps.myngs.ui - -import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity -import com.eagskunst.apps.myngs.R -import com.eagskunst.apps.myngs.base.Timber - -class MainActivity : AppCompatActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - Timber.d("Mensaje de prueba") - } -} diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index def59e4..0000000 --- a/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/arch_diagram.jpg b/arch_diagram.jpg new file mode 100644 index 0000000000000000000000000000000000000000..db07716b360c0d78e25eb27f426ac5b8e8f0a032 GIT binary patch literal 15461 zcmch;2UwF?(>ET)vVf=vh*VdKXlQ~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qw*{JB!+EEizEfBK8t><^m# zZ{;uk-tqeV(;rOhFTOeo?3;uSJ)ARcN9#>+D+f4i((m;)~z6{Y+e)Is~GkFwR^=S043tEt_*4iys*7MYAzPztR+GAYta=`2{(fSPu%fbx< VZtfF|PXi^H0l~oCNgdni`9FJrtE2z` literal 0 HcmV?d00001 diff --git a/base/src/main/java/com/eagskunst/apps/myngs/base/ColdEvent.kt b/base/src/main/java/com/eagskunst/apps/myngs/base/ColdEvent.kt deleted file mode 100644 index 677ac2f..0000000 --- a/base/src/main/java/com/eagskunst/apps/myngs/base/ColdEvent.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.eagskunst.apps.myngs.base - -/** - * Created by eagskunst in 25/7/2020. - */ -open class ColdEvent(private val content: T) { - - var hasBeenHandled = false - private set - - fun getContentIfNotHandled(): T? { - return if (hasBeenHandled) null - else { - hasBeenHandled = true - content - } - } - - fun peekContent(): T = content -}