
Explore advanced Android architecture concepts through a real tutorial app that uses Retrofit to fetch data and Room for local storage. Learn to refactor with view models, Hilt, and backstacks.
Explore software architecture as risk-management decisions in anticipation of inevitable changes to system requirements. Learn to balance trade-offs and keep architecture independent of libraries and frameworks to reduce maintenance cost.
Udemy prompts you to rate and review early in this course; if not ready, use the 'Ask Me Later' option until Udemy prompts you again, and I read every review.
Explore how packaging structure shapes a codebase, an app's architecture, and long-term maintainability. Learn to design and maintain a proper package structure early to scale your Android project.
Introduce package by feature to organize the app around business domain concepts—questions, answers, and users—and move code into the question, user, and answer packages.
Organize the Android architecture by extracting the presentation layer and its logic into a screens package and moving the main activity for clearer separation and future refactoring.
Organize common and generic logic by creating a dedicated common package with networking and database subpackages, and hide top-level classes not important to the core concepts of the business domain.
Adopt package by feature to reveal the app's business domain through top-level packages, separate screens, and a common package for database logic, with reference to an article.
Explore the presentation layer in Android applications, the largest part that implements screens. Embrace refactoring and best practices to architect clean, maintainable screens.
Refactor by extracting screen classes from the main activity into a dedicated screens package, including question details, questions list, and favorite screens, and simplify navigation via a new main screen.
Refactor screens into individual classes and packages, extract the main screen and shared composables, and structure navigation to separate questions list, details, and favorites.
centralize navigation logic by refactoring into a single main screen composable with nested navhosts and a current nav controller, enabling clearer, traceable navigation across tabs and screens.
Centralize navigation logic in the main screen composable and refactor the bottom bar and top bar for a single navigation flow.
Fixes a bug in bottom tabs navigation by refactoring to standalone road and bottom tab classes and deriving the current tab from the parent nav backstack entry.
Introduce a screens navigator to encapsulate navigation logic, decoupling UI from navigation and enabling type-safe routing for question detail and tab navigation.
Watch a live refactoring of the app's navigation logic, extracting a screens navigator class to decouple navigation from UI and simplify bottom tabs and nested nav controllers.
Extracts non-ui logic into a presenter to decouple the ui from data fetching, improving reuse, maintainability, and navigation stability across compositions.
Practice introducing a presenter for the favorite questions screen to decouple UI logic from the DAO and database, enabling future data sources and viewmodels.
Implement solution exercise one: a favorite questions presenter that observes a Dao flow and exposes state to the UI, decoupling UI logic from database details.
Identify a memory leak from a private coroutine scope; convert to a suspending function with the correct dispatcher, reusing the external scope for automatic cancellation by the composable lifecycle.
Convert presenters into view models to retain state across recomposition and configuration changes. Instantiate a ViewModel with a factory to handle custom arguments and attach it to the current screen.
Refactor favorite questions into a favorite questions view model, mirroring the questions list and questions details presenter, and ensure it survives recompositions and configuration changes.
Implement a custom view model factory for the favorite questions feature, wire it into the screen, and ensure the same view model instance survives recompositions and configuration change.
Explore the MVVM pattern, showing how screens pair a view with a view model to form a presentation layer unit, with the model storing domain data.
Master the presentation layer in Android apps, focusing on decoupled UI logic that renders UI and captures interactions. Leverage MVVM with Jetpack Compose and a screens navigator.
Explore the domain layer, the business logic MVVM viewmodels interact with, to decouple the main flows from the presentation layer. Build a maintainable, readable domain layer for long-term debugging.
Use case objects (interactors) encapsulate application flows, decoupling UI from domain logic and enabling reuse across screens. Implement throttling and caching inside the use case to control network calls.
Learn to implement caching strategies across presentation and domain layers by updating the view model to preserve data on back navigation while throttling network requests.
Extract use case objects in exercise 3 by adding fetch questions list use case and decide what stays in view model versus use cases, including favorite questions and question details.
Refactor the favorite questions and question details into observe use cases, encapsulating flow combination in the domain layer, separating presentation logic in the view model, and preparing for dependency injection.
Explore real world use case objects, from simple background task memory data use cases to complex memory benchmark flows, demonstrating composable patterns, abstraction, and reusable external APIs.
Decouple app logic from backend schemas by introducing a local domain data structure and a dedicated networking layer, converting network schemas to internal models to prevent breakage.
Question the repository pattern as an anti-pattern in Android app architecture and advocate use case objects and an optional domain layer to manage data access with single responsibility.
Learn how the domain layer in MVVM uses standalone use case objects to encapsulate flows, compose complex use cases, and keep domain logic decoupled from external data structures.
Explore dependency injection as an architectural pattern that separates core functionality from the construction set, showing wiring, scoping, and integration with practical examples and a hands-on refactor in Android apps.
Evaluate manual pure dependency injection versus frameworks, detailing trade-offs and the risk of poor implementations. Adopt Hilt for Android due to its simplicity, Compose and ViewModel integrations, and strong conventions.
Set up hilt by adding the hilt plugin and dependencies—hilt, hilt compiler, and hilt navigation compose—via version catalog, then apply plugin in module and use ksp to enable dependency injection.
Set up Hilt as a gradle dependency, create and register a custom application, annotate with Hilt Android app, and mark main activity with Android entry point to enable dependency injection.
Apply hilt to inject view models and use cases, decoupling construction from functionality, and replace factories with application module that provides favorite question dao, StackOverflow API, and retrofit implementations.
Refactor the questions list view model with Hilt dependency injection, removing retrofit instantiation and ensuring a single retrofit instance for a clean fetch questions use case and question detail screen.
Refactor the questions list to use Hilt injected constructors and rely on dependency injection, sharing a single StackOverflow API to deliver cleaner code and clear separation of concerns.
Decouple the UI logic from the business domain by introducing a main view model and use cases for observe and toggle favorite questions, with dependency injection via Hilt.
Use dependency injection to implement a global, singleton questions cache that stores data by id, ensures thread safety with a reentrant lock, and serves cached results to reduce network calls.
Separate core functionality from wiring with dependency injection, using Hilt annotations to wire dependencies automatically and compare manual and framework-based DI for the right project fit.
Gain expert level architectural insight to structure android applications and enjoy development with a high-level view, while acknowledging the course isn’t exhaustive and inviting questions and reviews.
Explore legacy content from the old course version. See Java, Android views, fragments, fragment navigation, MVC, and manual dependency injection, with legacy material available as a bonus.
Explore the MVx family of architectural patterns, implement the best in Android apps, and master manual dependency injection, package structure, and key trade-offs through hands-on exercises.
Define software architecture as risk-based design decisions shaped by the cost of change, independent of frameworks, and aimed at making systems resilient to evolving requirements.
Understand how Udemy prompts course reviews. Learn when to use ask me later or rate at course end, and why timely, clear ratings matter for instructors and students.
Explore the presentation layer architectural pattern as a reusable structure that unites the UI and application layers, and understand the four layers—UI, application, domain, infrastructure—for Android applications.
Explore the MVx family of presentation layer patterns, including Model, View, and various X components such as controller, presenter, or ViewModel, and how they organize Android app architecture.
Explore MVX architectural patterns in Android through Google's official architecture blueprints, examining multiple approaches to a simple to-do app and critiquing their design with professional honesty.
Analyze the Android architecture blueprint for model-view-presenter, showing how the Tasks screen reveals tight coupling between the view and the presenter and questions the standardization of the presentation layer.
Trace the historical evolution of MVx in Android, from MVC to MVP, and learn how the activity becomes the view while logic shifts to standalone components.
MVx's main benefit is decoupling UI logic and encapsulating it in view components. This improves stability and enables faster, safer UI changes.
Explore why decoupling UI logic from activities is essential and how MVX enables extracting UI logic into a standalone view, using composition over inheritance to avoid god objects.
Explore practical Android architecture by embracing the MVC pattern as the mature, battle-tested choice among MVX implementations, with emphasis on structure and presentation in Android applications.
MVx architectures decouple UI logic, mitigating the drawbacks of god objects in activities and fragments. Extracting UI logic lets controllers assume their roles and reflects the most mature Android pattern.
In this course you'll journey into the depths of Android Architecture and learn to build clean and maintainable Android applications.
Developing an Android application takes effort and skill, but it's even more challenging to keep this application maintainable and extensible in the long term. Just writing code to "make it work", without giving consideration to the big picture, can easily lead to a messy codebase.
Unfortunately, dirty code is all too common in Android development. Many projects suffer from classes containing hundreds or even thousands of lines of code, circular dependencies, excessive coupling, code duplication, obscure naming conventions, poorly structured packages, and other deficiencies. These are serious issues that impede project progress and can make Android development a miserable experience.
Said that, Android development doesn't have to be a struggle, even with mature and complex projects! In this course, you’ll learn advanced architectural techniques that will guarantee the long-term success of your Android applications:
Clean Architecture
Proper way to structure application's packages
Model-View-X architectural patterns
How to create reusable components that adhere to the Single Responsibility Principle
Dependency Injection architectural pattern
and more...
After completing this course, you'll be writing clean and maintainable code. Different features will be encapsulated in focused, decoupled classes. The classes themselves will be distributed among well-organized, properly named packages. You'll be using standard architectural patterns, so other developers will have easier time understanding your code. Your business flows will be encapsulated in standalone, reusable components. And much more...
No more classes with hundreds of lines of code!
No more excessive coupling!
No more code duplication!
No more changes in many places each time you add a new feature!
No more spaghetti code!
So, if you want to master advanced Android development techniques to build well-architected, clean Android applications, this course is perfect for you!