Modern Android App Development with Clean Architecture Series

Modern Android App Development with Clean Architecture Series

Introduction

Hello Engineers,

In this series, we will learn how to build multimodule applications using clean architecture principles. We will be making use of Android build tools and libraries, which will include Android Jetpack components.

We will incorporate illustrations to make it easy to understand and simplify complex concepts; additionally, we will include code samples that we can test and implement in our IDEs. We can experiment and modify code in this series as much as we can to keep ourselves engaged. We will gain practical experience and improve our understanding of the topics that will be introduced in this series.

Throughout this series, we will build a movie application using the The Movie Database (TMDB) API. This API gives access to a database of a wide range of movie categories and TV shows in list pages that we are going to fetch to our client-side application(Android App).

Additionally, we will have small projects in the middle to emphasize complex concepts and reinforce our comprehension.

Target audience

This series is written for Android developers either beginners or intermediate developers who want to learn about building scalable applications with clean architecture or want a go-to guide on how to integrate different technologies in their projects, technologies like using Hilt, Leak canary, pagination with Room database, etc. This course is covered from concept to concept with code explanations. It will benefit new Android developers with basic knowledge of Android development fundamentals and have built a couple of projects.

Movie application features

This is what we are going to build.

Some of the fragments we'll build in this series encompasses the following

  • Home fragment: represented by the fragment above is the first screen when we open the application with a banner of the top most-rated movie then as we scroll up we have a list of top-rated, popular, and upcoming movies.

  • Home fragment categories: This represents the home fragment but when you scroll up you will find the movie categories from popular movies, top-rated movies, and upcoming movies where you can scroll the movies horizontally.

  • Movie details fragment: Displays more information about a particular movie depending on what the user has clicked. The details include the title and description and can go further by clicking the reviews button to read reviews and also share the movie link on various sharing platforms and also mark it as a favorite.

  • Reviews fragment: Displays a list of reviews from different users about a particular movie.

  • Trailers fragment: Displays a video view to watch trailers of particular movies as clicked by the user from the details screen and also we can see the casts and crew involved in making the movie and a list of recommended similar movies.

  • TV show fragment: Displays a spinner where the user can choose from a variety of TV shows. In the menu we have top-rated, popular, on-air, airing today TV shows, the defaults being top-rated TV shows.

  • Favorite fragment: Displays favorite movie(s) as selected by the user with the ability to delete/remove each one from the list.

  • Search fragment: A user can quickly search throughout the remote database for a particular movie of interest, which will be displayed in this fragment.

  • Internet state dialogue: The popup dialogue informs the user when the device is not connected to the internet and the data visible to the screen is the cached data or it is the available data when the device was last online and it is not updated.

What we'll learn

The following list outlines what we are expected to learn by the end of this course.

  • Basics of clean architecture.

  • Building complex UIs with ConstraintLayout.

  • Handling memory leaks in Android.

  • Coroutine fundamentals and proper use of dispatchers.

  • Use Coil for image loading from the server.

  • Use Ktor client to perform network requests.

  • Play YouTube videos in our Android app.

  • Dependency Injection with Hilt.

  • Use Room to cache data.

  • Paginate data from the Room database with a remote mediator and pager.

  • Check Internet states with broadcast receivers.

  • Coroutine fundamentals.

  • Use of Data Transfer Objects(DTOs) and Mappers.

The below illustration chart shows the architecture flow and how everything is connected

The chart above illustrates the architecture of the movie application, its classes and how everything is interconnected. We will understand this detail when we get to explaining clean architecture and the SOLID principles, and everything will start to make sense.

How you'll benefit from this course

  • A strong understanding on using SOLID principles to build Android applications with clean architecture.

  • Learn how to build responsive UIs for Android.

  • We will learn how to use Leak canary to handle memory leaks.

  • Learn how to handle Android component's lifecycle.

  • Learn how to handle different internet connectivity states with broadcast receivers.

  • Learn to implement features in your app like pagination, offline caching, and playing YouTube videos.

  • Gain a good understanding of Android development concepts that will forge a strong foundation in our careers.

Prerequisites

To be able to follow up smoothly with this series, we will need some basic knowledge of the Kotlin language and have built some basic projects with it.

We are going to skip the layouts, so clone this repository: https://github.com/Peter-cloud-web/Understand_Clean_Architecture/tree/TvShows to start building.

In the next part, we will be introduced to clean architecture and SOLID principles where we are going to learn clean architecture's correlation with SOLID principles.

Happy coding folks :)