summaryrefslogtreecommitdiff
path: root/DEVELOPMENT.md
diff options
context:
space:
mode:
authorGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-05-09 06:00:43 +0000
committerGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-05-09 06:00:43 +0000
commit5a432ecde520ee039786848296e5227571404158 (patch)
tree077eafb42d5d2d18b2ffc03bc93d9a8654377774 /DEVELOPMENT.md
parenta348c8196a643e4f5853587133b05e3ec2cd0faa (diff)
parenta8874167f663885f2d3371801cf03681576ac817 (diff)
Merge branch '1200-move_package_to_advanced_privacy' into 'main'
1200: rename everything to AdvancedPrivacy See merge request e/os/advanced-privacy!128
Diffstat (limited to 'DEVELOPMENT.md')
-rw-r--r--DEVELOPMENT.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 2743aac..88354c6 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -1,11 +1,11 @@
-# PrivacyCentral Development Guide
+# AdvancedPrivacy Development Guide
This guide contains development related information to help a developer in getting better understanding of project structure.
## Architecture
-The architecture of PrivacyCentralApp is based on [clean architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html). For presentation layer, we use [Model-View-Intent](http://hannesdorfmann.com/android/model-view-intent/) design pattern which is a unidirectional reactive flow pattern. We use it in conjunction to ViewModel to make our features lifecycle aware. Our android app is having single activity multiple fragments.
+The architecture of AdvancedPrivacy is based on [clean architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html). For presentation layer, we use [Model-View-Intent](http://hannesdorfmann.com/android/model-view-intent/) design pattern which is a unidirectional reactive flow pattern. We use it in conjunction to ViewModel to make our features lifecycle aware. Our android app is having single activity multiple fragments.
### Clean Architecture
-Clean architecture is the building block of PrivacyCentralApp. This architecture is based on the following principles:
+Clean architecture is the building block of AdvancedPrivacy. This architecture is based on the following principles:
1. **Independent of Frameworks**. The architecture does not depend on the existence of some library of feature laden software. This allows you to use such frameworks as tools, rather than having to cram your system into their limited constraints.
2. **Testable**. The business rules can be tested without the UI, Database, Web Server, or any other external element.
3. **Independent of UI**. The UI can change easily, without changing the rest of the system. A Web UI could be replaced with a console UI, for example, without changing the business rules.
@@ -19,7 +19,7 @@ Clean architecture is the building block of PrivacyCentralApp. This architecture
<img src="art/AbstractMVI.png" width="500" height="333">
MVI is used at the presentation layer of clean architecture. It is very much similar to [Redux](https://redux.js.org/) in terms of implementation and working. It has three main components.
-- **View**: This is where activities, fragments and other android components live. It is responsible for publishing user intent/actions to the model and rendering the state returned by the model. In PrivacyCentralApp, it is just an interface which is implemented by android components.
+- **View**: This is where activities, fragments and other android components live. It is responsible for publishing user intent/actions to the model and rendering the state returned by the model. In AdvancedPrivacy, it is just an interface which is implemented by android components.
- **Intent**: In context of our app, we call them actions. These are simple data classes having any extra payload like inputs, ids etc.
- **Model (data layer at presentation level)**: This is responsible for processing the actions, communicating with domain use-cases and mutating the state of the model. It acts as a Store from redux but for our use case, we call it a **Feature**.
@@ -33,7 +33,7 @@ Elements of a feature:
2. **State**: Simple POJO (kotlin data class) representing various UI states of the application.
3. **SingleEventProducer**: This is a function which is invoked by the reducer to publish single events (that can/should only be consumed once like displaying toast, snackbar message or sending an analytics event). This function takes action, effect, current state as input and it returns a `SingleEvent`. By default this function is null for any Feature.
-### Architecture Overview of PrivacyCentral App
+### Architecture Overview of AdvancedPrivacy App
![](art/privacycentral-arch.png)