diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2023-05-02 21:25:17 +0200 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2023-05-02 22:00:35 +0200 |
commit | a8874167f663885f2d3371801cf03681576ac817 (patch) | |
tree | 5be07b8768142efeade536d4135f2250c1ac9071 /DEVELOPMENT.md | |
parent | a0ee04ea9dbc0802c828afdf660eb37dc6fa350f (diff) |
1200: rename everything to AdvancedPrivacy
Diffstat (limited to 'DEVELOPMENT.md')
-rw-r--r-- | DEVELOPMENT.md | 10 |
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) |