tonyjs / Hibiscus

Hibiscus, mobile microblogging application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hibiscus

Hibiscus, simplified mobile blog application. GooglePlay

This repo is using MVVM(without Databinding), Rxjava2, Requery(orm), Retrofit2, Dagger2, Glide, anko and etc.

Image1 Image2 Image3 Image4 Image5

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)
  • PostViewModel : deal with Post data.(title, created time and any texts, images)
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)
  • NetworkModule : provide the class which can networking(using Retrofit2).
  • 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.
Flow

if the application does not contains any data, chat-bot-styled guide shows how to. When the user types the nickname and confirm, it tries to retrieve token from Telegraph using nickname, and then guides user to create a post. After the guide, user can create the post, and read the posts after he or she uploads the post.

Todo features

Edit the post. Export the post into Telegraph so that user can share the link. Add filter elements, like date and tags, etc. Available to zoom image.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
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.

About

Hibiscus, mobile microblogging application.


Languages

Language:Kotlin 99.3%Language:Java 0.7%