Giter VIP home page Giter VIP logo

bctask's Introduction

Architecture

  1. Uses complete MVVM (model-view-viewModel).
  2. With data and viewBinding instead of ViewIDs.
  3. Has a dedicated repository layer for remote api endpoint along with interface
  4. Albums use data class (the 'model')

Networking

  1. Used Retrofit http client with okhttp interceptor and user agent
  2. Used KotlinXConverter factory for serialization of JSON
  3. Used ktx as Jackson mapper is slow compared to that, and I am more comfortable with ktx
  4. Use Coroutines for api calls and asynchronous IO tasks.

Error and Data Handling

  1. Used try catch blocks where needed
  2. ViewModel live state is continuously observed in a sealed class
  3. The sealed class is used to emit errors, loading and success in Home Fragment.
  4. Users see a toast message in case of error.

Screens and features

  1. Used recycler View Adapter and viewholder to populate the response.
  2. Implemented Coil-KT by Coroutines as Image loading library which has advantages over Glide.
  3. Instead of traditional progress bar, Used the shimmering effect library from Facebook that look more appealing.

Searching and Filtering

  1. Used the Material 3 search bar + View to integrate search.
  2. The editText on changed listener that focuses on text change and immediately filters the list.
  3. It performs a Fuzzy Search that finds matching Query and ignores casing (caps).
  4. The directly performs search in fragment itself without needing context and callbacks, keeping code concise and without taking toll on performance.

Bonus

  1. The album api endpoint was lacking image urls, So I switched the endpoint with photos that was complex and time consuming.
  2. Even without paging support, the response is loaded in chunks (20 items) (memory safe)
  3. Viewmodel has caching and It does not re-fetches the api even when screen is rotated
  4. Uses latest Kotlin tools and SDKs.

Note:

Download APK from Releases. It's a Debug unsigned universal arch build so it is big in size and can give play protect warning

bctask's People

Contributors

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