Git Product home page Git Product logo

appetisercodechallenge's Introduction

AppetiserCodeChallenge

This app was created as part of the Coding Challenge for Appetiser.

Overview

This app demonstrates a simple Master/Detail Flow. It fetches data from the Itunes' search API with the query parameters: term, country, and media. The values for these query parameters have been hardcoded, with the term = "star", country = "au", and media = "movie". The app follows the MVVM software architectural pattern. The user also has the capability to sort the list's result by tapping the Floating Action Button. Doing so, will toggle the results in ascending/descending order.

The app uses the following technologies:

  1. Glide - for image loading and caching
  2. RecyclerView - for rendering list of itunes tracks retrieved from the API.
  3. Retrofit - for network requests
  4. Room - for persistent data storage (on top of sqlite).
  5. ViewModel - used to manage the UI's data, in a lifecycle-conscious way. etc...

MVVM was the chosen architectural style of designing the whole app due to one main reason: To achieve a cleared separation of UI and application logic without introducing complexity and boilerplate code.

With this architectural style, I was able to delegate specific tasks to different components: Model, View, ViewModel. For the Model, this is where I placed my app's data and it also has the Repository - the class which serves as the single source of truth for the ViewModel. Also, for the Model, this is where I placed my Room (db) and API (network) related-classes and interface.

The ViewModel acts as the mediator between the View and the Model. I designed the app in such as way that no direct communication must happen between the View and the Model. Any changes to the data must be "observed" by the View.

The View's responsibility is only to display the data. As such, it observes for any updates to the data, e.g. data being fetched from the API, or data being loaded from the local db through Room.

appetisercodechallenge's People

Contributors

germanmontejo 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.