Skip to content

Hafardev/SearchMovieRepository

Repository files navigation

SearchMovie

  • An example Search Movie Android App that help you to get Search movie list by input movie name and display them in a list
  • This application is implemented using Search Api with clean architecture principles, MVVM design pattern,Hilt DI,Kotlin,Coroutines,Kotlin Flow,LiveData,Retrofit,OkHttp,Navigation,dataBinding,etc Libraries and Applying Clean Code using OOP ,SOLID Priciples,Helper Classes and Repository Pattern.

Table of Contents

Setup and Install

  • Get the source code by : git clone https://github.com/Hafardev/SearchMovieRepository.git
  • Import and Build Project on Android Studio (Electric Eel |2022.1.1 && AGP version 7.4 && Mini required Gradle version 7.5)
  • Supported Android Versions : Android 7-Nougat (API level 24) or higher

Architecture

Implemented MVVM-Clean Architecture as Google's recommendation. Model-View-ViewModel (MVVM) is a software design pattern that is structured to separate program logic and user interface controls and Clean Architecture is a code development approach and a structure that adopts SOLID principles.

  • data : The data layer contains Api ,DB ,Mapper ,Models and Repository (implemention of domain repository interface's). This layer provide a single source of truth for data.
  • domain : The domain layer contains interface of data repository's and interface of data_class_model's and the UseCases that encapsulate a single and very specific task that can be performed. This task is part of the business logic of the application.
  • presentation : Layers that interact with the user. This layer includes Activity, Fragment, ViewModel classes etc.

Technologies Used

  • Kotlin
  • Coroutines : A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously and it's light-weight threads that allow you to write asynchronous non-blocking code.
  • Flow : Flow is an asynchronous cold stream of elements and emmit data after collecting that.
  • Hilt : for dependency injection.
  • Retrofit : Used for REST api communication.
  • OkHttp : HTTP client that allows all requests to the same host to share a socket.
  • Glide : Glide is a fast and efficient image loading library for Android.
  • LiveData : For reactive style programming (from VM to UI).
  • ViewModel : Stores and manages UI-related data and presentation logic in a lifeCycle-conscious way and survives configuration changes and isn't destroyed on UI changes.ViewModel objects are automatically retained during configuration changes so that survive data.
  • Navigation : Used to navigate between fragments
  • Data Binding : Used to bind data in code to view in your XML layouts.

Screenshots

Screenshot Screenshot