Skip to content

Commit

Permalink
Fixes ribot#39 Added hyperlinks to the libraries
Browse files Browse the repository at this point in the history
Adding links to the mentioned libraries will be useful to understand the concepts better.
  • Loading branch information
sank20 authored Oct 5, 2018
1 parent c2f28b2 commit 9308e0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions architecture_guidelines/android_architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The architecture of our Android apps is based on the [MVP](https://en.wikipedia.

* __View (UI layer)__: this is where Activities, Fragments and other standard Android components live. It's responsible for displaying the data received from the presenters to the user. It also handles user interactions and inputs (click listeners, etc) and triggers the right action in the Presenter if needed.

* __Presenter__: presenters subscribe to RxJava Observables provided by the `DataManager`. They are in charge of handling the subscription lifecycle, analysing/modifying the data returned by the `DataManager` and calling the appropriate methods in the View in order to display the data.
* __Presenter__: presenters subscribe to [RxJava](https://github.com/ReactiveX/RxJava) Observables provided by the `DataManager`. They are in charge of handling the subscription lifecycle, analysing/modifying the data returned by the `DataManager` and calling the appropriate methods in the View in order to display the data.

* __Model (Data Layer)__: this is responsible for retrieving, saving, caching and massaging data. It can communicate with local databases and other data stores as well as with restful APIs or third party SDKs. It is divided in two parts: a group of helpers and a `DataManager`. The number of helpers vary between project and each of them has a very specific function, e.g. talking to an API or saving data in `SharedPreferences`. The `DataManager` combines and transforms the outputs from different helpers using Rx operators so it can: 1) provide meaningful data to the Presenter, 2) group actions that will always happen together. This layer also contains the actual model classes that define how the data structure is.

Expand All @@ -23,7 +23,7 @@ Looking at the diagram from right to left:

* __Activities, Fragments, ViewGroups (View)__: Standard Android components that implement a set of methods that the Presenters can call. They also handle user interactions such as clicks and act accordingly by calling the appropriate method in the Presenter. These components also implement framework-related tasks such us managing the Android lifecycle, inflating views, etc.

* __Event Bus__: It allows the View components to be notified of certain types of events that happen in the Model. Generally the `DataManager` posts events which can then be subscribed to by Activities and Fragments. The event bus is __only used for very specific actions__ that are not related to only one screen and have a broadcasting nature, e.g. the user has signed out.
* __Event Bus__: [Event Bus](https://github.com/greenrobot/EventBus) allows the View components to be notified of certain types of events that happen in the Model. Generally the `DataManager` posts events which can then be subscribed to by Activities and Fragments. The event bus is __only used for very specific actions__ that are not related to only one screen and have a broadcasting nature, e.g. the user has signed out.

# License

Expand All @@ -41,4 +41,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
```

0 comments on commit 9308e0c

Please sign in to comment.