Skip to content

MohNage7/DecadeOfMovies

Repository files navigation

DecadeOfMovies

platform API codebeat badge

Preview

The Challenge

The past decade held a lot of movies, some left a mark and some were just a set of 24-60 pictures per second. We would like you to create a Master - Detail Application to showcase those movies and the signature they left behind.

You will have a local list of movies that should be displayed in any order. The list is searchable and the search results will be categorized by Year.

Each search result category will hold at most the top rated 5 movies of this category (year).

Once a movie is selected from the search results, you will switch to a detailed view to unveil the following:

  • Movie Title
  • Movie Year
  • Movie Genres (if any)
  • Movie Cast (if any)
  • A two column list of pictures fetched from flickr that matches the movie title as the search query

Project Overview

  • Fetch Movies list from .json file and display them in Master-Detail flow.
  • Show every movie details in separate screen
  • Cache data offline for the movie's photos.
  • Search for movies by its title.
  • Search data is categorized by year and it shows only top 5 movies in that category.

Project Architecture

The project is following clean architucte , It’s a group of practices and decisions that makes the code testable with independable components.

The following diagram shows how all the modules will interact with one another.

Dependency Flow

As illustrated in the image above each component depends only on the component below it. the higher layers will request the needed data from the layers below it and the data is being provided by the lower layers by a reactive paradigm.

Dependency Injection

Allows classes to define their dependencies without constructing them. At runtime, another class is responsible for providing these dependencies

  • For DI we are using Koin

Presentation layer

The layer that interacts with the UI. for this layer we are applying MVVM architecture pattern

Framework layer

Implements interaction with the Android SDK and provides concrete implementations for the data layer (Room implementation).

UseCase layer

Sometimes called interactors. Defines actions the user can trigger

Data Layer

Abstract definition of all the data sources. (Network / Local )

Network layer

Contain abstract and concrete implementation for any logic that is related to network calls.

Local Layer

Abstract definition for the local data persistence.

Domain Layer

Contains business logic and entities.

How to Run it

  • The project is only dependant on flicker api. You can create a key from here
  • Once you have created the key insert it build.gradle(Module: pp) for both debug and release variants in API_KEY field.

Libraries