Skip to content

Android MoviesApp using Dagger2, Rxjava2, Retrofit, Navigation Component, Paging 3.0, Junit Jetpack (Room, ViewModel, LiveData) based on MVVM with clean architecture.

License

Notifications You must be signed in to change notification settings

mookyjan/MoviesApp

Repository files navigation

Movies-App

Structure of the code

Simple Android Application written in Kotlin. This project follows Clean Architecture with MVVM with Clean Architecture Design

Main libraries used

  • Kotlin - First class and official programming language for Android development.
  • Rxjava - For asynchronous and more..
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • LiveData - Data objects that notify views when the underlying database changes.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
    • Data Binding - Used for data binding
    • Navigation Component - Used it for the navigation from one fragment to another fragments
    • Room -Used for local data storage
    • Paging 3.0 -to load large amount of data in chunks instead to load all the records in one api call. Paging 3.0 will automatically call the api to laod more data when user reached to end of the screen.
  • Dependency Injection
    • Dagger2 - Standard library to incorporate Dagger dependency injection into an Android application.
  • Retrofit - A type-safe HTTP client for Android and Java.
  • Glide - Used for loading images
  • Sdp Library -Used for auto Layout for different layouts
  • Material Components for Android - Modular and customizable Material Design UI components for Android.
  • Timber -Used for loggging
  • Junit - For Unit Testing
  • Mockito - For mocking in Unit Testing

Architecture Design

alt text

alt text

alt text

Modules

  • data/ : contains the code to access to the data (repository pattern)
  • domain/ : contains the business logic and the usecases
  • app : Presentation layer, contains the UI

this project consist of Two screen. on the first screen showing the list of movies list and on clicking the item go to the details of the movie. Swipe to Refresh can be used to refresh data and when user scroll new list of movies will be automatically and for the simplicity of this project many things have been kept simple like

  • ErrorHandling,
  • Internet connectivity and
  • Design of the app is also kept sample and can be improved much more

comments are written with the function that what it will do.

also TODO are given in the area which we can improve more.

Screenshots

alt text

alt text

alt text

##TODO

setup for room db for offline storage of data adding more filter option for the movie list adding more unit test cases setup for CI/CD improving the design