Code Monkey home page Code Monkey logo

popular-tv's Introduction

Popular Tv App

A sample app written in Kotlin and Java, which fetches Popular TV shows from MovieDB and updates it periodically.

App Architecture

This app is built according to MVP pattern. The UI operations are handled in Activity and Fragment classes, isolated from the logic operations. Network operations are handled by AppDatamanager, which uses an instance of AppApiHelper. Logic operations are handled by Presenter classes belonging to each UI fragment/activity and isolated from UI layer.

Responsibility of Classes

BaseActivity and BaseFragment classes are created for consistency among View classes, also for time saving by eliminating boilerplate code to be written for every View class.

AppDatamanager uses instances of AppApiHelper and AppPreferencesHelper, for managing network operations.

ActivityModule and ApplicationModule classes are used for providing necessary instances for the specified scope with dependency injection. Dagger2 library used for Dependency Injection.

Every UI element has a Presenter and View interface to define necessary operations in their respective classes, Presenter is responsible of conducting logic operations and conveying required data to its View class.

Room persistence library is used for DB operations, and Picasso is used for image caching.

Every logic operation regarding Lists handled with RxJava2 Observables and Java8 stream api.

Database classes and Main UI/Presenter classes written in Kotlin, remaining classes are written in Java.

Kotlin coroutines are used for periodically recurring background tasks in the MainActivity.

AndroidX library used for View dependencies.

Used Technologies

Dagger2 - Dependency Injection

Room Persistence Library - Database Operations

Picasso - Image preview and caching

Retrofit- Network Operations

Kotlin Coroutine - Periodic tasks

RxJava2- Background tasks and logic

ButterKnife - View Injections

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.