We may earn an affiliate commission when you visit our partners.
Renaro Santos

At this point you probably already know how to build an app, but are you confident that you are following the market best practices? How would your app perform with millions of users? How clean and testable is your codebase?

Those questions were asked in many interviews during my 8+ years of experience in Android, and you not only need to know what to answer but also how to build it.

Read more

At this point you probably already know how to build an app, but are you confident that you are following the market best practices? How would your app perform with millions of users? How clean and testable is your codebase?

Those questions were asked in many interviews during my 8+ years of experience in Android, and you not only need to know what to answer but also how to build it.

In this course you will learn all that while building an e-commerce app. This app will consist of a list of products and a product details screen, where we will fetch the data from an API call and we will also save some data locally in the device.

We will talk about the layers of the Clean Architecture and start building our app by the View layer. Then we will talk a lot about Coroutines, Lifecycle, Scope, Dispatchers and ViewModel, and how we will use those concepts to asynchronously fetch data in combination with Retrofit. The communication between the Model/Business layer and the View will be implemented using the concept of ViewState and LiveData, we will also navigate and pass data between screens using the Navigation Component. We will also talk about the SOLID principles and implement a Dependency Injection library. At  the end, we will save data in a Database using Room and talk about Error Handling.

Let's not forget about Testing, we will be writing test for all parts of our app.

During this course you will be coding the whole time and we will see improvements being made in our app in every section.

This is the moment for you to get that dream job, a promotion or build a maintainable app with quality code.

For every lecture, there will be a specific branch for that, for example lecture-4, lecture-5, and so forth.

REMEMBER… Quality is essential. And there is a full 30 DAY-money-back guarantee case you don't like it ;)

Enroll now

What's inside

Learning objectives

  • Learn mvvm architecture, proposed architecture by google to build clean and testable codebase.
  • Get to know the market good practices, the best practices tech industries are using nowadays.
  • Understand the design principles, be able to use and implement the solid principles.
  • Jetpack components, live data, room, navigation components and more.
  • Write tests. writing unit tests and handling async operations.

Syllabus

In this first section we want to understand what is code quality and what are the characteristics of good code.

Explaining how the course is structured.

Read more

Short introduction about the app we will build during the course.

Link for the project  here:

https://github.com/renaro/ecommerce-android-app

Project repository
View Layer

In this video I explain about Clean Architecture for Android and how we intend to implement it while also following the Google's guideline for architecture and with the Jetpack components. Don't worry if you don't understand all the components of the architecture yet, each component and layer will be explained soon.

Before we start coding.
Checkout to the correct branches

Time to start coding, we will start with the View Layer. We will use the concept of ViewState to describe a View(Fragment/Activity). We will see how we can define a ViewState for the Product List screen. Checkout to the following branch : git checkout initial-viewstates

Fix the Bug: ViewStates

In this video we will talk about ViewModel and Live Data, probably one of the most important pieces of Android Development nowadays. Pretty much every screen will need a ViewModel, it will help you to keep the Fragment/Activities clean.
Check the code in the following branch: git checkout viewmodel-livedata

Pretty much all successful applications out there uses the Internet to fetch and save data somewhere, and if your app does not handle it correctly it could be a disaster. In this class we will talk about asynchronous operations and how to do it right.

This is the implementation part of the previous video, here we will implement coroutine to execute a suspend-able function to retrieve a list of products. Checkout the code in the following branch: git checkout coroutines

Fix the Bug: Coroutines

Retrofit is by far the most used library for HTTP requests in Android. Here we add it to our project and use it to retrieve the product list from an API. Checkout the code in the following branch: git checkout retrofit

Implement the navigation from the List to the Details screen
SOLID + Clean Architecture

Since this course we are focusing in architecture and quality, we have to talk about the SOLID principles, some design principles that could guide you to implement a clean and maintainable codebase.

In this video we go over an example of how the dependency injection will help us to maintain our project in the long run.

Here we implement HILT, a dependency injection library in our project, the reason why I chose this one is because it is mentioned by Google when they explain Dependency Injection.This type of libraries are mainly used to avoid the boilerplate(amount of code) necessary to accomplish the providing of dependencies.  Checkout to the following branch: git checkout hilt

At this point we have implemented a whole feature, the product list, and we have all layers, but the code is still mixed up, in this video I will show some examples of how you can organize the packages in your project.

Checkout to the following branches:
git checkout packages-by-feature
git checkout packages-by-layer

In this section we will implement the Wish list feature, but this time we will keep in mind all the good practices and build it right in the first time.

At this point we already know how to implement the 3 layers of our clean architecture, now it is time to implement a new feature, the Wishlist. This time we will implement in the right way from the beginning since we already have the theory background. We will start with the View Layer and defining how our repository will look like.

Checkout to the branch: git checkout wishlist-part-1

Now we will implement the repository, we will use Room, another Jetpack component for database. We will go over the basics of Room and implement all the steps to save the products in the wishlist in the Database.
Checkout to the branch: git checkout wishlist-part-2

We will introduce a new concept for this feature: Use Cases. Imagine that you own an E-commerce, adding a product to the wish list is an use case and the same is true for checking if a product is in your wish list. So we will add those two use cases and use it in our code.

Checkout to the branch: git checkout wishlist-part-3

Implement a WishlistRepository with Shared Preferences
Testing good practices in Android and how to write tests for the 3 layers.

Testing is essential ! It will never be enough to stress that testing is an essential piece in a clean and maintainable codebase. In this class we talk about the basics of testing in Android what are the suggestions of Google on that. Even though it is the last section of the course, it doesn't mean you should start writing tests in the end of your project, quite the contrary, the sooner the better. The reason why we talking about tests this late in the course is because now all the layers are know and we can test them all.

Here we will mainly test the use cases, from our business/domain layer. We will write unit tests for it.

Check the code : git checkout testing-repo-and-usecases

Here we will mainly test the ViewModel.

Check the code : git checkout testing-view-model

Adding error handling for product list.

Shopping cart feature.
What is next?

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Uses Jetpack components, which are a suite of libraries recommended by Google to help developers follow best practices and reduce boilerplate code, making app development faster and more reliable
Covers MVVM architecture, which is a popular architectural pattern for structuring Android apps, promoting separation of concerns and testability, and is officially proposed by Google for building clean and testable codebases
Explores SOLID principles, which are fundamental design principles for writing maintainable and scalable code, enabling developers to create robust and flexible applications that are easier to understand and modify over time
Employs Hilt for dependency injection, a library recommended by Google to reduce boilerplate code and manage dependencies effectively, leading to cleaner and more maintainable codebases in Android projects
Requires learners to use specific branches from a GitHub repository, which may pose a challenge for those unfamiliar with Git version control, potentially hindering their ability to follow along with the course material effectively
Focuses on testing methodologies, which are essential for ensuring code quality and reliability, but the course introduces testing concepts relatively late, potentially making it harder for learners to integrate testing practices from the beginning

Save this course

Save Android Clean Architecture:MVVM, Jetpack components + Kotlin to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Android Clean Architecture:MVVM, Jetpack components + Kotlin with these activities:
Review Kotlin Fundamentals
Solidify your understanding of Kotlin syntax and core concepts before diving into Android development.
Browse courses on Kotlin
Show steps
  • Review Kotlin documentation on variables, data types, and control flow.
  • Practice writing simple Kotlin programs to reinforce basic concepts.
  • Complete online Kotlin tutorials or exercises.
Brush Up on Android Fundamentals
Revisit core Android concepts like Activities, Fragments, and Intents to prepare for the course's architecture-focused content.
Browse courses on Android
Show steps
  • Review the basics of Android Activities and Fragments.
  • Study the Android Activity Lifecycle.
  • Practice creating simple Android apps with basic UI elements.
Review 'Clean Code: A Handbook of Agile Software Craftsmanship'
Reinforce the principles of clean code and SOLID principles, which are central to the course's architecture.
View CLEAN CODE on Amazon
Show steps
  • Read the book 'Clean Code' by Robert C. Martin.
  • Identify and summarize the key principles of clean code.
  • Reflect on how these principles apply to Android development.
Five other activities
Expand to see all activities and additional details
Show all eight activities
Implement a Simple MVVM App
Gain hands-on experience with the MVVM architecture by building a small application before diving into the course's e-commerce app.
Show steps
  • Choose a simple app idea (e.g., a to-do list or a basic calculator).
  • Implement the app using the MVVM architecture with LiveData and ViewModel.
  • Write unit tests for the ViewModel.
Practice Writing Unit Tests
Sharpen your unit testing skills by writing tests for different components of an Android app.
Browse courses on Unit Testing
Show steps
  • Choose a simple Android project or create a new one.
  • Write unit tests for the ViewModel and Use Cases.
  • Practice mocking dependencies and handling asynchronous operations in tests.
Review 'Dependency Injection Principles, Practices, and Patterns'
Deepen your understanding of dependency injection principles, which are used in the course with Hilt.
Show steps
  • Read the book 'Dependency Injection Principles, Practices, and Patterns'.
  • Identify and summarize the key principles of dependency injection.
  • Reflect on how these principles apply to Android development.
Contribute to an Android Open Source Project
Apply your knowledge of Clean Architecture and MVVM by contributing to an existing open-source Android project.
Show steps
  • Find an open-source Android project on GitHub.
  • Identify a bug or feature to work on.
  • Contribute code following the project's architecture and coding style.
Write a Blog Post on Clean Architecture in Android
Solidify your understanding of Clean Architecture by explaining the concepts in your own words.
Browse courses on Clean Architecture
Show steps
  • Choose a specific aspect of Clean Architecture to focus on.
  • Research and gather information on the topic.
  • Write a blog post explaining the concepts and providing examples.

Career center

Learners who complete Android Clean Architecture:MVVM, Jetpack components + Kotlin will develop knowledge and skills that may be useful to these careers:
Android Developer
An Android Developer creates applications for devices using the Android operating system. This course is designed to help build a strong foundation for Android development by teaching the Model-View-ViewModel architecture, which is important for creating a maintainable and robust application. The course also covers essential elements of modern Android development, including the use of Jetpack components like LiveData, Room, and Navigation, which are all used in industry. Furthermore, the course focuses on writing tests for all parts of the app, a key skill for any professional Android Developer. This course teaches you how to implement asynchronous data fetching, essential for making apps that are responsive and fast. A student taking this course will also learn to handle errors professionally.
Mobile Application Developer
The role of a mobile application developer involves designing and building applications for mobile devices. Since this course focuses on building an Android e-commerce application using modern architecture such as MVVM and Jetpack components, it directly relates to the work that a mobile application developer does. The course covers asynchronous operations using coroutines, essential for fetching data from APIs, in addition to local data storage with Room and dependency injection with Hilt, all essential skills for mobile application development. A student of this course will learn how to test every part of an application, including the user interface, which will be helpful to produce high quality, bug-free mobile applications. The course highlights development best practices and clean code principles, further aligning with the needs of mobile app developers.
Software Engineer
A software engineer is responsible for designing, developing, and maintaining software systems. This course provides a strong foundation for a software engineer specializing in mobile development, as it covers essential skills such as architectural patterns, dependency injection, and asynchronous programming. Software engineers require a deep understanding of good coding practices. This course teaches these practices, and how to implement them in an Android project. The course also emphasizes test-driven development, ensuring that the code is robust, maintainable, and scalable. A student looking to become a software engineer will find that the topics taught here, such as clean architecture, view states, and navigation components, are crucial to building professional applications.
Technical Lead
A technical lead is responsible for guiding a team of developers while also contributing to development. This course is helpful for a technical lead, especially one that focuses on mobile development, since it focuses on building an Android e-commerce app using modern architecture and best practices. A technical lead needs to be aware of how to manage asynchronous operations, implement solid principles, and use dependency injection, all skills taught by this course. The course also covers how to test the code, which is a vital skill for high quality products. The concepts of clean architecture, view states, and navigation are all highly relevant for any technical lead in mobile development. This course can be beneficial for a technical lead to learn best practices.
Application Architect
An Application Architect designs the structure of applications software. This course explores and implements the Model-View-ViewModel architecture, and this is a critical concept for any application architect. The course also explains the SOLID design principles. An application architect must understand these principles when designing the different layers and components of a software product. The hands-on approach in the course, involving building an e-commerce app, provides practical experience that a student can use in their role as an application architect. The course’s coverage of dependency injection, component interaction, and error handling further enhances the skills required for someone in this role. Therefore, this course provides a good foundation to become an application architect.
Mobile Software Architect
A mobile software architect develops, designs, and maintains the overall structure of mobile applications. This course provides critical concepts, including clean architecture, which is essential for any mobile software architect to understand. The course also goes deep into the Model-View-ViewModel architecture, further enhancing the skills of an architect. The course covers best practices for Android development, including how to implement SOLID principles, dependency injection, and navigation. A mobile software architect can also learn about testing and how to integrate that practice into mobile development, as the course also covers testing methodologies and handling asynchronous operations. The course can help someone become a mobile software architect.
Technology Consultant
A technology consultant provides expert advice on how to incorporate technology into business processes. This course may be useful for a technology consultant, especially if they are involved in proposing mobile solutions for businesses. The course provides foundational knowledge in modern Android development architecture, including the use of coroutines, dependency injection, and testing. These concepts are important for a consultant to evaluate if the solution uses good practices. This course's project, building an e-commerce platform, allows a technology consultant to be able to understand and discuss how such a project is developed. The consultant can use this course to better understand mobile app development.
Project Manager
A project manager plans, executes, and closes projects, often in a technology environment. This course may be useful for a project manager who wants to increase their understanding of mobile development, particularly Android app development. By taking this course, a project manager will learn about industry best practices and how to organize a clean code base. The course will help them understand the different layers of an application, as well as the usage of architecture components. The course also covers testing in Android, which can help the project manager ensure a high quality final product. It can help a project manager understand the technical side of mobile development.
Quality Assurance Engineer
A quality assurance engineer tests software to identify bugs, errors, or any other issues. This course might be useful to a quality assurance engineer. The course places emphasis on testing, demonstrating how to write tests for various parts of an application. The course goes through how to write unit tests for business logic and view models, and this is useful for a quality assurance engineer to understand how software is tested. The course should help a quality assurance engineer to understand the tests that developers write.
Backend Developer
A backend developer handles the server-side logic, databases, and application programming interfaces (APIs) that power client-facing applications. While this course is focused on Android mobile development, a backend developer may find it helpful to understand how mobile applications are constructed, as well as how they interface with APIs. The course teaches best practices for building an application using the Model-View-ViewModel pattern, and this may inform a backend developer about how to build APIs in a way that is understandable to an Android developer. The course will provide a basic understanding of Android development, and this can help a backend developer understand their client better.
Solutions Architect
A Solutions Architect designs and implements complex IT solutions. The course focuses on Android architecture, and this may inform aspects of a solution architect's work if they ever need to consider the structure of a mobile application. The course material on dependency injection, testing methodologies, and handling asynchronous operations is relevant to any architect, even a solutions architect whose scope is broader than just mobile. The course might be useful to a solutions architect who needs to understand mobile development.
Mobile Designer
A mobile designer is responsible for the look and feel of a mobile app. This course may be of interest to a mobile designer who wants to expand and deepen their understanding of how mobile applications are built, even though this is not a user interface or design course. The course provides insight into how a mobile application is built, especially the use of architecture and state management. This course might be helpful to a designer interested in the technical side of app development.
Data Analyst
A data analyst collects, processes, and performs statistical analysis on data, often to drive business decisions. Understanding how apps are built and how they interact with APIs and databases can be useful for a data analyst. This course touches on how to fetch data using Retrofit and save data locally, and this may be useful for a data analyst who wishes to understand data flows. While not directly related to data analysis, understanding how an application is built might be helpful.
Technical Writer
A technical writer creates documentation for software and hardware. This course may be helpful to a technical writer because it covers Android development, and a technical writer may have to document this knowledge in the future. This course would expose the writer to the relevant terminology and components of Android development. While not directly related to technical writing, this knowledge may be helpful to a technical writer.
Product Owner
A product owner defines the vision for a product and translates it into actionable tasks for engineers. This course may help a product owner understand how a mobile app is developed, especially within an Android environment. The course's focus on clean architecture, testing, and best practices can inform a product owner about the different phases of mobile development and the importance of all components of the application. The course may help the product owner understand the technical side of development.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Android Clean Architecture:MVVM, Jetpack components + Kotlin.
Provides a strong foundation in writing clean, maintainable code, which is essential for understanding and implementing Clean Architecture. It covers principles like SOLID and provides practical examples of how to improve code quality. Reading this book will help you better appreciate the course's emphasis on code quality and testability. It commonly used reference for software engineers.
Provides a comprehensive understanding of Dependency Injection (DI) principles and patterns. Since the course covers Hilt, a DI library, this book will provide a deeper understanding of the underlying concepts. It is useful for understanding the benefits of DI and how to apply it effectively in Android projects. This book is more valuable as additional reading than it is as a current reference.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser