Skip to content

Photo Showcase app written in Kotlin using Clean Architecture based on MVVM and Repository pattern.

Notifications You must be signed in to change notification settings

mhdtouban/500-pixels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

500 pixels

Introduction

The application uses Clean Architecture based on MVVM and Repository patterns. Implemented Architecture principles follow Google recommended Guide to app architecture.

The application is written entirely in Kotlin.

Android Jetpack is used as an Architecture glue including but not limited to ViewModel, LiveData, Lifecycles, Navigation, Room and Data Binding. See a complete list in "Libraries used" section.

The application does network HTTP requests via Retrofit, OkHttp and GSON. Loaded data is saved to SQL based database Room, this the app supports offline mode. Paging library is used for data pagination online and offline.

Kotlin Coroutines manage background threads with simplified code and reducing needs for callbacks. Combination of Coroutines and Kotlin build in functions (transformation, collections) are preferred over RxJava 2.

Navigation component manages in-app navigation.

Dagger 2 is used for dependency injection.

Glide is used for image loading.

Stetho is used to empower debugging skills (like Network calls log, Database content overview, UI Hierarchy view, etc).

The app consist of 2 screens: List of popular photos with support of either Grid or List view, photos details page.

Getting Started

This project uses the Gradle build system. To build this project, use the gradlew build command or use "Import Project" in Android Studio.

Tests

There are two Gradle tasks for testing the project:

  • connectedAndroidTest - for running Espresso on a connected device
  • test - for running unit tests

Libraries Used

  • Foundation - Components for core system capabilities, Kotlin extensions and support for multidex and automated testing.
    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
    • 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 database changes.
    • Navigation - Handle everything needed for in-app navigation.
    • Room - SQLite database with in-app objects and compile-time checks.
    • ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
    • Paging - Load and display small chunks of data at a time.
  • UI - Details on why and how to use UI Components in your apps - together or separate.
  • Third party
    • Kotlin Coroutines for managing background threads with simplified code and reducing needs for callbacks.
    • Dagger 2 A fast dependency injector.
    • Retrofit 2 A configurable REST client.
    • OkHttp 3 A type-safe HTTP client.
    • GSON A Json - Object converter using reflection.
    • Glide Image loading.
    • Timber A logger.
    • Stetho Sophisticated debug bridge.

Releases

No releases published

Packages

No packages published

Languages