Code Monkey home page Code Monkey logo

desserter's Introduction

Desserter

This sample app is prepared for Udacity's Baking app lesson.

You can download the apk file and play around with the app from releases tab.

App Screens (Phone)

Home Screen __ Recipe Steps __ Recipe Details Recipe Ingredients __ Widget Details Landscape

App Screens (Tablet)

Tablet Home Tablet Details

Working

The app follows repository pattern and use android architecture components. Libraries used are described in section below.

App flow:

The app gets data from provided CDN file (can also be API) and stores in local database using architecture component's Room ORM. This is done by RecipeRepository. The data exposed from RecipeRepository is the data from local DB. Whenever the cache expires, a data is freshly fetched from the remote source and local database is updated. This new data is then exposed via architecture component's LiveData.

Here is a break down of the steps mentioned above:

  • App opens, repository fetches data from the remote source (if cache is expired).
  • This data is inserted into local database via android architecture component's Room.
  • Data from local database is exposed via LiveData to ViewModels.
  • Activities observes this View Model and consumes the data (i.e. displays in the UI).

A simple illustration is shown below in diagram. Repository patter in the sample

  • The fragments in the details activity communicate via LiveData, only minimal communication is done via parent activity as show below. Repository patter in the sample

3rd Party Libraries

The following libraries are included:

  • Android Architecture component
    • Room - for local persistence
    • lifecycle
    • java 8 support for lifecycle
    • Live Data
    • View Model
  • Picasso - image rendering
  • RxJava2 - Reactive programming
  • Dagger2 - Dependency injection
  • ExoPlayer - for media
  • Retrofit2 - for networking
    • Retrofit gson converter
    • Retrofit RxJava adapter

Issues

If you come across any issues, do raise it in the issues tab.

desserter's People

Contributors

drulabs avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.