Giter Club home page Giter Club logo

dsr-junior-developer-task's Introduction

dsr-junior-developer-task

I assigned this task to review knowledge of Junior developor in my company. This project covers the task.

Task

Level: Easy

Create an Android application that displays information received over the network.

It needs to have 2 screens:

In Screen1, get products over API and display them using a pagination pattern. Display title, price, and image. When a product gets clicked, navigate it to Screen2. In Screen2, display title, description, price, rating, stock, brand, image.

API -> https://dummyjson.com/docs/products

Requirements

  1. Use Android Jetpack libraries.
  2. Use Android best practices.
  3. Apply MVVM architectural pattern.
  4. Use Pagination pattern: first load 24 products, then continuously load 8 by 8 when it is scrolled to the bottom.
  5. Apply SOLID design principles.

Requirements Check

  1. Used the latest native Android app development tech stack including all the best practices and libraries that comes from Android Jetpack. To name some of them, Jetpack Navigation Components, Jetpack Paging3, Jetpack Dagger Hilt, Jetpack SavedStateHandle, Jeptack ViewModel, Jetpack Lifecycle and so on.
  2. Followed all best practices in the project.
  3. Applied Clean Architecture architectural pattern which includes MVVM. Clean Architecture includes additional design patterns such as Repository, UseCase, Mapper (DTO-Model), Dependency Injection, and so on.
  4. Pagination pattern is achieved via Jetpack Paging 3.1 library as it is Android best practice. I made it first load 24 items and then lazily load 8 by 8 when scrolled to bottom or top. Also, there is Header and Footer that shows progress bar when loading. When items reach 8 * 6 = 48, it starts destroying oldest items as they occupy unnecessary space in Android RAM (best practise).
  5. SOLID design principles are followed.

Screenrecordings:

In Screen1, title, price, and image displayed. In Screen2, additional details of the product namely title, description, price, rating, stock, brand, image are displayed.


When user scrolls to bottom, it lazily loads 8 by 8 (Pagination design pattern). Footer progress bar is also displayed that informs the user that it is loading more results.


When there is more than enough data is loaded, it starts destroying the oldest data in order to free up space in RAM. When scrolled to top to see oldest items, it loads them lazily (Pagination design pattern). Header progress bar is also displayed that informs the user that it is loading more results.

Tech Stack

  • Architectural Pattern: Clean Architecture, MVVM
  • UI: XML, Material3
  • Dependency Injection: Hilt
  • Navigation: Jetpack Navigation Components
  • Concurrency: Kotlin Coroutines, Kotlin Flows
  • Networking: Retrofit2, Kotlin Serialization
  • Pagination: Jetpack Paging3
  • Others: ViewBinding, Glide, Timber, Safe Args

Demo

You can download demo apk

Licence

Designed and developed by raheemadamboev (Raheem) 2023.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

dsr-junior-developer-task's People

Contributors

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