Skip to content

Th3Alch3m1st/wunderfleet

Repository files navigation

Coding Challenge

Screenshots

Architecture

MVVM

Third-party libraries

performance and optimizations

  • ViewModel separate UI and Data layer. ViewModel allow data to survive configuration changes and improve testabilities.
  • Jetpack LiveData is a lifecycle aware component, so it can avoid memory leaks and unwanted null pointer exception.
  • Jetpack DataBinding to bind the layouts views and it's null safe.
  • Use Navigation architecture components for navigation and use navigation safe args gradle plugin for argument passing to ensure safe argument pass
  • Use Kotlin DSL for gradle management - it help better gradle management in multi module project. And increase readability, provide code navigation and auto suggestions
  • Write Unit test and UI test to ensure app stability and performance
  • Write some infix function to increase unit test redability
  • Add documentation in UI test to explain test scenario and write short comment for unit test

Idea for improvement

  • Could have used coroutine over RX, it is lighter than RX and has better testing support. For example - Coroutine support flow. Flow can handle back pressure, it can provide better support when need to test something inOrder for example loader show/hide. Live data doesn't support back pressure hence test fail time to time due to this.
  • I have user lastLocation from FusedLocationProviderClient class to get user location, could have used requestLocationUpdates for location tracking on user movement
  • Could have used a separate viewmodel for car list map and car details fragment. Currently I shared same viewmodel instance in two different fragment, it is better for performance but break single responsibility and interface segregation rule from SOLID rule.
  • Could have cache network call, since it's a static api call. But it wouldn't applicable for real scenario, because car location will be updated frequently.

Build tools

  • Android Studio Arctic Fox | 2020.3.1 Patch 3
  • Gradle 7.0.2

Troubleshoot

  1. Get the error when compiling Gradle plugin requires Java 11 but IDE uses Java 1.8 required-java11
  • One of a solution is going to Android Studio Preferences->Built, Execution, Deployment->Build Tools->Gradle-> Gradle Project and select Java 11 and try to compile again select-java-11

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages