Code Monkey home page Code Monkey logo

smack-android-mvp's Introduction

Smack-Android-Model-View-Presenter-

This is Android version of the Smack-iOS(https://github.com/mdadil2019/Smack-iOS) app which is in development with MVP architecture

Architecture: Model View Presenter

Tools & Languages: Java, Android Studio

Libraries: Dagger 2, RxJava2, Retrofit, Butterknife, Socket.IO

API Endpoint : https://adilchat.herokuapp.com/

Core Features

  1. Login and Logout
  2. Registration
  3. Profile View
  4. Channels Management (Add, Create)
  5. Chat in specific channels

Remote Database : MongoDB

Local Database : SQLite(RoomDB)

MVP Design

User Interface (ui)

Views

  1. LoginActivity implement LoginActivityMVP.View
  2. RegistrationActivity implements RegistrationActivityMVP.View
  3. ProfileView implements ProfileView.View
  4. ChannelActivity implements ChannelActivityMVP.View
  5. ChatActivity implements ChatActivityMVP.View

Presenter

  1. LoginActivityPresenter implement LoginActivityMVP.Presenter
  2. RegistrationActivityPresenter implements RegistrationActivityMVP.Presenter
  3. ProfileViewPresenter implements ProfileView.Presenter
  4. ChannelActivityPresenter implements ChannelActivityMVP.Presenter
  5. ChatActivityPresenter implements ChatActivityMVP.Presenter

Model(data)

  1. Local Database(db)
    • User(Entity,Dao,UserDatabase)
    • Channel (Entity,Dao,ChannelDatabase)
    • Chat(Entity,Dao,ChatDatabase)
  2. Remote Database(network)
    • Models
      • Login Request
      • Login Response
      • Logout Response
      • Registration Request
      • Registration Response
      • Channels Requests
      • Channels Response
      • Message Request
      • API Error
  • API Endpoints (final class)
  • API Headers
    • Header
    • Bearer Header
  • App API Helper
    • Methods for requesting endpoints with RxJava & Retrofit and returning observables if required
  • Preferences
    • AppPreferencesHelper implements PreferenceHelper
    • Methods
      • getname()
      • getavatar()
      • getusername()
      • getloginstatus()
  • Data Manager (Interface) extend AppPreferenceHelper, APIHelper
  • AppDataManager implements DataManager

Note: All the methods of APIHelper, PreferencesHelper & RoomDB will be called from data manager by providing the required dependencies by Dagger

Dependency Injection (di)

  1. Modules
  • LoginActivityModule
  • RegistrationActivityModule
  • ChannelActivityModule
  • ChatActivityModule
  • ProfileViewModule
  1. AppComponent (Interface)
Note: The API is designed to handle the sending messages via socket, we can look at the API source code to find the method that is responsible for sending the messages.

smack-android-mvp's People

Contributors

mdadil2019 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.