Coder Social home page Coder Social logo

andrejoshua / alphavantageapp Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 3.0 257 KB

A currency calculator Android application with Coroutines, ViewBinding (DataBinding in previous version), and also with MVVM and clean architecture.

Kotlin 100.00%
android mvvm-architecture mvvm-android kotlin koin-kotlin koin fragment-navigation clean-architecture jetpack-android retrofit2

alphavantageapp's Introduction

AlphaVantage App

AlphaVantage is just an example of forex (currency) calculator Android application with Clean Architecture approach, integrated with AlphaVantage API. This application is still being maintained to keep updated with current technology standards.

Features (Pages)

As the time of writing, the application only has 2 pages, main pages, and currency pages. Since AlphaVantage doesn't provide the list of currencies, so i fetched it from here. Note: not all currencies can be calculated.

This project also uses API 16 as minimum API level.

Architecture

Module Structure

This architecture mostly follows the mix of this and this. See those links for detailed explanation about Clean Architecture.

Architectural Approach & Separation of Concern

Detailed Class Structure

There are few additional points i will explain given the picture:

  • LiveData<Event> is basically a LiveData that will not retrieve any values until the previous value is consumed. Refer to this.
  • This app uses Navigation components to communicate between Fragments, but directly from ViewModel without sending callback to its Fragment. NavManager class contains navigate(NavDirections) to navigate current fragment to next destination fragment and getArgs(): NavArgs? to get arguments from previous fragment.
  • retrieveNetwork() is a function to integrate repository with asynchronous Flow (which will be converted to LiveData). retrieveNetworkAndSync() is basically previously mentioned function with synchronization to local repository. See Usecase class.
  • Any exceptions retrieved from API client (Retrofit) will be handled in getResult(). See BaseImplementation class.

Project Libraries

alphavantageapp's People

Contributors

andrejoshua avatar

Stargazers

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