Nab-challenge - Take home challenge from NAB in partnership with Positive Thinking Company

Related tags

App nab-challenge
Overview

nab-challenge

Take home challenge from NAB in partnership with Positive Thinking Company

Android CI

Software development principles, patterns and practices

Principles

  • Program to an interface, not an implementation - Every methods of repository is called through Interface, not their implementation. Because of this, it is easier to add new repositories without changing the implementation
  • Seperation of concerns - Seperate the app architecture into layers, each layer has its own responsibility
  • Single Responsibility - One method does one thing
  • Inversion of Control - Use dependency injection library Hilt to avoid dependencies between components

Patterns

  • Observer Pattern - In UI Controllers, observe changes from data in ViewModel to take actions
  • Factory Pattern - Use ViewModelFactory to get ViewModel instance based on the type and constructor params
  • Builder Pattern - Construct Retrofit, Moshi with builder to avoid calling constructor with so many params
  • Singleton Pattern - Make repositories components, API instance as singleton so that there is only one instance of these during the app lifecycle
  • MVVM Pattern - Model, View, View-Model for testable code and robust architecture

Practices

  • Regex - Used to validate data based on specific format
  • Unit test - Make sure that functions run in right way
  • Two Way data binding - When the data on the View changes, the binded property in ViewModel will update automatically
  • CI/CD with Github Action - Make a build when code in this repository changes. If this fails, notify through email about the result
  • DiffUtils - Improve performance of RecyclerView in Android
  • Secure app - Use Proguard to minify, obfuscate code, remove unused resource for both release and debug build

Libraries & frameworks

  • Github Action - Create build assembles whenever code is updated
  • Timber - Logging
  • Retrofit2 - Construct the REST APIs and paging network data
  • Moshi - A modern JSON library for Kotlin and Java
  • Hilt - A dependency injection library
  • AppCompat - Degrade gracefully on older versions of Android
  • Test/Junit - An Android testing framework for unit tests
  • Data Binding - Declaratively bind observable data to UI elements
  • Lifecycles - Create a UI that automatically responds to lifecycle events
  • LiveData - Build data objects that notify views when the underlying datasource changes
  • Navigation - Handle everything needed for in-app navigation
  • Kotlin Coroutine - Handle long running operation outside main thread

Folder structure

  • data: Contains mostly code related to acess data
    • network: Setup code for API service along with its methods to get the data
    • repository: Implementation code for the repository in the domain
  • di: Dependency Injection modules that are used across the app
  • domain: Contains the logic, model accross the app, related to business
    • dto: Data Transfer Objects, used to receive data from remote with Json properties
    • model: Domain Model Objects, contain data and some logics related to the object in app
    • repository: Interface only, define a contract that is needed to access data
    • utils: Helper methods to handle data
  • presentation: Contains the logic, code to display data
    • dailyforecast: A screen folder, contains its related file such as ViewModel, UI Controller (Fragments, Activities), ViewModelFactory
    • utils: Some base or helper methods

Setup

Run by installing APK

  1. Go to the list of builds created here
  2. Choose the latest one with green tick (Sucessfully built)
  3. Download the assemble.zip
  4. Extract downloaded file and install the APK file

Run in Android Studio

Precondition:

  • Android Studio version 4.2.2 and above
  • SDK version from 23 to 30
  • Emulator from API 23
  1. Clone this project
  2. Open in Android Studio
  3. Click Run

Note for the Average Temperature calculation: Because the Average Temperature is calculated by sum of each measurements, then divided by the times, according to the API, the Average Temperature calculation formula is as below:

Averrage Temperature = SumOf(morning, day, evening, night) / 4

Checklist

  • 1. Programming language: Kotlin is required, Java is optional.
  • 2. Design app's architecture (suggest MVVM or you can use any architectures that you get familiar)
  • 3. Apply LiveData mechanism or any mechanism that you get familiar with
  • 4. UI should be looks like in attachment.
  • 5. Write UnitTests (nice to have)
  • 6. Secure Android app from:
    • a. Decompile APK
    • b. Rooted device (optional)
  • 7. Exception handling (optional)
  • 8. Readme file includes:
    • a. Brief explanation for the software development principles, patterns & practices being applied
    • b. Brief explanation for the code folder structure and the key Java/Kotlin libraries and frameworks being used
    • c. All the required steps in order to get the application run on local computer
    • d. Checklist of items the candidate has done

Video

weather-forecast.2.mp4
You might also like...
A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tumblr application , But a little prettier than him πŸ˜‰
A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tumblr application , But a little prettier than him πŸ˜‰

A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tum

CMPLR-Native - A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding Android app that helps you keep track of the medical supplements you need to take and how you spend your days
Android app that helps you keep track of the medical supplements you need to take and how you spend your days

Android app that helps you keep track of the medical supplements you need to take and how you spend your days, similar to a bullet journal. It also allows you to reflect on your day, week, year, etc.

A simple covid-19 response application to give users an idea of the severity of their covid-19 status and profer steps to take based on the severity.
A simple covid-19 response application to give users an idea of the severity of their covid-19 status and profer steps to take based on the severity.

COVID-19 Response 🎑 A simple covid-19 response application to give users an idea of the severity of their covid-19 status and profer steps to take ba

remote technical interview Android challenge app

Android challenge We would like to learn more about how you approach a challenge as an Android Engineer. There is a simple app that isn’t made with be

code for the Mobiquity QA challenge assignment

MOBIQUITY QA CODE CHALLENGE This repository contains the code for Mobiquity code assignment for the Senior QA engineer position. Tech Stack the tools

Coding Challenge for ParadoxCat

WavDecoder Coding Challenge for ParadoxCat WavHeaderReader This class takes the ByteArray which supposed to be a 44 bytes length array from the very s

Fourthwall Android Challenge

Fourthwall Android Challenge This is the implementation of Fourthwall Android Coding Challenge Technologies used: Kotlin + Android Studio This project

An Android application sample for ClearScore coding challenge

ClearScoreChallenge An Android application sample for ClearScore coding challenge Libraries Coroutines for managing background threads. (A coroutine i

Owner
Hieu Vu
Mobile Development enthusiast. Scalability and flexibility oriented.
Hieu Vu
ABSA Android Take Home Assignment

ABSA Android Take Home Assignment Writing the Make Up App challenge using Android Architecture Components, in 100% Kotlin :kotlin: Requirements Create

David Ndekere 0 Mar 18, 2022
Loop Habit Tracker, a mobile app for creating and maintaining long-term positive habits

Loop is a mobile app that helps you create and maintain good habits, allowing you to achieve your long-term goals. Detailed graphs and statistics show you how your habits improved over time.

Alinson S. Xavier 5.8k Jan 7, 2023
Android-coding-challenge - Vien Health Android coding challenge

Vien Health Android coding challenge Tasks There's a series of tasks to complete

Ezekiel Sebastine 1 Jun 27, 2022
This application was created internally for Aseman Company to evaluate the performance of its employee

AsemanTile-HRM This application was created internally for Aseman Company to evaluate the performance of its employees Uses Each of the managers of th

yasinrezaei 2 Mar 23, 2022
Kotlin Android app for cataloging books off home/office library.

MyLibrary App Kotlin Android app for cataloging books off home/office library. Features: Searching COBISS, Google Books and OpenLibrary by scanning IS

Marko ĐorΔ‘eviΔ‡ 0 Nov 29, 2021
This app reminds people to take medicine according to their respective schedule.

Medicine Reminder App Reminds people for medicine. Objective In this busy and competitive world, it is very difficult for a person to remember each an

Naman Agarwal 4 Jun 3, 2021
Android application that allows users to take or import photo of chessboard, recognizes the pieces and generate the Forsyth-Edwards Notation.

β™› ChessBoard Importer Frontend β™› Repository for the frontend part of project "Chessboard Importer". The project is realized by the team of 4 students

null 8 Feb 26, 2022
Ride hailing app that helps users find drivers and take them from point A to point B.

Ride-hailing_rider_app Ride hailing app that helps users find drivers and take them from point A to point B. What I Used ? Clean Architecture : Basica

Oucif Mohammed 2 Aug 26, 2022
Gender Checker app built using Kotlin, MVVM, Genderize.io API. Take this as a reference for MVVM and Genderize.io API πŸš€

Gender-Checker ?? Gender Checker app built using Kotlin, MVVM, Genderize.io API Enter a name and the app will guess the gender ?? ✨ Highligts: API : G

Jai Keerthick 0 Jan 5, 2022
Note-Taking-App - Android application which can be used to take notes

Android application which can be used to take notes.The application uses Recycle

Utkarsh Panwar 0 Jan 30, 2022