Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyjs committed Jul 17, 2017
1 parent b9e8577 commit bbcb5e2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ This repo is using MVVM(without Databinding), Rxjava2, Requery(orm), Retrofit2,

### Designing the app. MVVM

##### Repository - Create, Read, Update, Delete the Model(representative the Application).
* LocalRepository : deal with Data which provided by Database, ContentProvider, Preferences and etc without networking.
* RemoteRepository : deal with Data which provided by Networking.

##### ViewModel - communication between Ui and Data layer.
* UserViewModel : deal with User data.(nickname and token. the token will be taken into [Telegraph Api](http://telegra.ph/api))
* PostViewModel : deal with Post data.(title, created time and any texts, images)

##### Repository - Create, Read, Update, Delete the Model(representative the Application).
* LocalRepository : deal with Data which provided by Database, ContentProvider, Preferences and etc without networking.
* RemoteRepository : deal with Data which provided by Networking.
##### Application structure
* MainActivity : the one and only activity for this application.
* PostListFragment : show the posts.
* CreatePostFragment : show users to create posts.
* PhotoListFragment : show users photo list from ContentProvider.

##### Dependency Injection - using Dagger 2
* AppModule : provide classes from Application(Context, Resources, ContentResolver).
* DatabaseModule : provide Database(using [Requery](https://github.com/requery/requery))
* NetworkModule : provide the class which can networking(using [Retrofit2](https://github.com/square/retrofit)).
* MapperModule : provide mapper classes. the Model has the source from.
* MapperModule : provide mapper classes. Mapper classs make the Model from the source.
* ~Entity : from the Local(Database, ContentProvider, Preferences). eg. PostEntity
* ~DTO : from the Remote. eg. UserDTO
* RepositoryModule : provide Repository classes. eg. PostLocalRepository
* DataComponent : wrap all classes from Modules. and used for injecting.

##### Application structure
* MainActivity : the one and only activity for this application.
* PostListFragment : show the posts.
* CreatePostFragment : show users to create posts.
* PhotoListFragment : show users photo list from ContentProvider.

##### Flow
if not the application contains any data, shows the guide(like ChatBot).
When the User input the nickname and confirm, try to retrieve token from `Telegraph` using nickname.
When the User types the nickname and confirm, try to retrieve token from `Telegraph` using nickname.
and then guide to create post. User can create the post and shows the posts.

##### Todo features
Expand Down

0 comments on commit bbcb5e2

Please # to comment.