GithubHelp home page GithubHelp logo

space-x's Introduction

space-x

Android architecture and best practices demo that uses the public SpaceX api

This project was designed with CLEAN architecture principles in mind, unidirectional dependency graphs with transformers between them, inner layers don't know about outer layers, outer layers only know the layer immediately below and only through interfaces by them exposed. Example: the database client and the API client aren't aware of each other, the repository knows only about their public interfaces and provides the bridging logic between both. The viewmodels only interact with granular interfaces exposed by the repository, the inner workings of repo/cache etc are hidden/abstracted.

Architecture description and common patterns in use:

  • mvvm for the UI layers, with a shared viewmodel between the Launches activity and the filter

  • the filtering functionality of the shared viewmodel is fully tested for year/success/ ASC-DSC and mixed cases

  • live data is used as a way for the activity to keep track of data changes in the view models

  • repository pattern abstracting the loading of data from the view models

  • this project implements a custom cache feature using Room DB

  • integration tests of the interaction with the data access objects (DAOs) are included

  • any attempt to load data from the repository will query the cache first before dispatching requests to the network

  • cache older than the provided configuration will be discarded

  • any new network requests will update the local cache

  • this project provides unit tests and integration tests

  • Espresso and Idling resources were used for the UI end to end tests

  • Mock Web Server was used to provide clear recorded responses (success, failures and mixed success/failures) in the end to end tests

  • Mock Web server was used to provide integration tests for the network layer (Retrofit + Gson + RxJava)

  • Repository is tested at 100% coverage

  • tests make use of environment configurations through product flavours (mock and prod) and Mock web server for some integration tests

  • dependency injection is done through hilt in the app, and manually in the tests (for granular individual dependency configuration per test)

  • RxJava was the choice for async operations

  • MockK was the mocking library of choice

  • all of the challenge requirements are implemented

spacex01

spacex03

spacex04

space-x's People

Contributors

hcmsilva avatar

Watchers

 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.