Rajan Maurya created TAVERNA-943:
------------------------------------

             Summary: Implementing MVP Framework in the code structure
                 Key: TAVERNA-943
                 URL: https://issues.apache.org/jira/browse/TAVERNA-943
             Project: Apache Taverna
          Issue Type: New Feature
          Components: Taverna Mobile
    Affects Versions: parent 1
         Environment: Android Studio 1.5.1
            Reporter: Rajan Maurya
            Assignee: larry akah


Currently everything is written at same place like initiating view , Calling 
API for data, saving data for offline. there are fully dependent to each other. 
so if any developer want to change or add the feature, he have to read, 
configure the whole code. that is not a good practice to write the code and it 
make very hard to contribute.
After long time current project will be depreciated. if no one will contribute 
to project.

Implementing The MVP framework in the project so that every work will be run in 
the different layer architecture. and every layer have its own work and fully 
independent to other layer. Layers call to other layer for data ,for loading 
data, for calling REST API etc.

The layers are :

1. 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.

2.      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.

3.      Model (Data Layer):     this is responsible for retrieving, saving, 
caching and messaging 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.

These are some basic layers that will be in the project architecture:

Source: https://github.com/ribot/android-boilerplate  and 
https://msdn.microsoft.com/en-us/library/ff649571.aspx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to