Giter Club home page Giter Club logo

themoviedbtest's Introduction

TheMovieDB Android challenge

Architecture

Kotlin

There is no Java trace on this project, all parts have been developed using Kotlin and trying to use as much of it's features as possible.

Activity or fragment?

No fragments have been used for this project, only one activity containing the list, since it didn't seem worth the overhead and anyway an activity was needed to contain the fragment.

MVVM

The chosen pattern has been an MVVM approach, since Google it's really pushing for it with its architecture components.

LiveData

LiveData has been chosen for this project since one of it's greatest feature is being "lifecycle aware" and therefore no need on keeping track of subscribing and unsubscribing.

Repository pattern

Repository pattern is used to be able to quickly "swap" the datasource if necessary (even though now it only loads the content from a server API) and to make it as testable as possible.

Dependency injection

Any class dependency is injected using dagger.

UI Components
  • Databinding: Used to easily deal with setting "properties" to the UI components (text, images, etc), for this list the ViewModel itself is passed, so if it were necessary to set properties to a new View of the list item could be easily done.
  • Cardview: Used for each list item to give that "card" (as the library name suggests) look.
  • RecyclerView: This View holds all items and display them, also it's "relatively" easy to append items for the lazy load.
  • Constraintlayout: Used for each RecyclerView item to be able to have a strong looking UI (say goodbye to RelativeLayout and nested LinearLayouts).
  • BaseRecyclerViewAdapter: Library to help deal with the RecyclerView lazy load and adapter itself.
  • Glide: Library to help loading images from a url (even though it can do much more it's only used to deal with that here).
Testing
  • JUnit: Very popular and useful library to test anything Java related.
  • Espresso: Library to help with UI testing.
  • MockitoKotlin: Similar library to mockito but made for Kotlin, since mockito doesn't always play well with Kotlin.
  • MockWebserver: Great helper library to mock server responses.

themoviedbtest's People

Contributors

ealfonso93 avatar

Watchers

James Cloos avatar  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.