Clean Android Architecture: Take a layered approach to writing clean, testable, and decoupled Android applications
Book information
Description
Learn how to build, maintain, and test Android applications using clean architecture principles Key FeaturesUnderstand various software design principles and patterns to make an application more testableStructure your application's code into different layers and components to make it more maintainable and flexibleStudy popular libraries and frameworks and integrate them into an applicationBook Description As an application's code base increases, it becomes harder for developers to maintain existing features and introduce new ones. In this clean architecture book, you'll learn to identify when and how this problem emerges and how to structure your code to overcome it. The book starts by explaining clean architecture principles and Android architecture components and then explores the tools, frameworks, and libraries involved. You'll learn how to structure your application in the data and domain layers, the technologies that go in each layer, and the role that each layer plays in keeping your application clean. You'll understand how to arrange the code into these two layers and the components involved in assembling them. Finally, you'll cover the presentation layer and the patterns that can be applied to have a decoupled and testable code base. By the end of this architecture book, you'll be able to build an application following clean architecture principles and have the knowledge you need to maintain and test the application easily. What you will learnDiscover and solve issues in Android legacy applicationsBecome well versed in the principles behind clean architectureGet to grips with writing loosely coupled and testable codeFind out how to structure an application's code in separate layersUnderstand the role each layer plays in keeping the application cleanIntegrate existing frameworks and libraries for each layerWho this book is for This book is for Android developers who want to learn about managing the complexity of their applications, and is also highly recommended for intermediate or advanced Android developers looking for a go-to guide for clean architecture and the integration of various Android technologies. New developers familiar with the fundamentals of Android app development will find this book useful too. Table of ContentsGetting Started with Clean ArchitectureDeep Diving into Data SourcesUnderstanding Data Presentation on AndroidManaging Dependencies in Android ApplicationsBuilding the Domain of an Android ApplicationAssembling a RepositoryBuilding Data SourcesImplementing an MVVM ArchitectureImplementing an MVI ArchitecturePutting It All Together Title page Copyright and Credits Foreword Contributors About the reviewers Table of Contents Part 1 – Introduction Preface Chapter 1: Getting Started with Clean Architecture Technical requirements The architecture of a legacy app Legacy analysis Software design principles SOLID principles Component cohesion principles Component coupling principles Exploring the evolution of Android Fragments The Gradle build system Networking Humble objects Functional paradigms Kotlin adoption Dependency injection Android architecture components Coroutines and flows Jetpack Compose Enter clean architecture Summary Chapter 2: Deep Diving into Data Sources Technical requirements Understanding Kotlin coroutines and Flows Kotlin coroutines Exercise 02.01 – Using Kotlin coroutines Kotlin Flows Exercise 02.02 – Using Kotlin Flows Using OkHttp and Retrofit for networking Exercise 02.03 – Using OkHttp and Retrofit Using the Room library for data persistence Exercise 02.04 – Using Room to persist data Understanding and using the DataStore library Exercise 02.05 – Using DataStore to persist data Summary Chapter 3: Understanding Data Presentation on Android Technical requirements Analyzing lifecycle-aware components Exercise 3.1 – Using ViewModel and LiveData Using Jetpack Compose to build UIs Exercise 3.2 – Navigating using Jetpack Compose Summary Chapter 4: Managing Dependencies in Android Applications Technical requirements Introduction to DI Using Dagger 2 to manage dependencies Using Hilt to manage dependencies Exercise 04.01 – using Hilt to manage dependencies Summary Part 2 – Domain and Data Layers Chapter 5: Building the Domain of an Android Application Technical requirements Introducing the app's architecture Creating the domain layer Exercise 05.01 – Building a domain layer Summary Chapter 6: Assembling a Repository Technical requirements Creating the data layer Creating repositories Exercise 06.01 – Creating repositories Summary Chapter 7: Building Data Sources Technical requirements Building and using remote data sources Exercise 07.01 – Building a remote data source Building and integrating local data sources Exercise 07.02 – Building a local data source Summary Part 3 – Presentation Layer Chapter 8: Implementing an MVVM Architecture Technical requirements Presenting data in Android applications Presenting data with MVVM Exercise 08.01 – Implementing MVVM Presenting data in multiple modules Exercise 08.02 – Multi-module data presentation Summary Chapter 9: Implementing an MVI Architecture Technical requirements Introducing MVI Implementing MVI with Kotlin flows Exercise 09.01 – Transitioning to MVI Summary Chapter 10: Putting It All Together Technical requirements Inspecting module dependencies Exercise 10.01 – Reduce dependencies Instrumentation testing Exercise 10.02 – Instrumented testing Summary Index Other Books You May Enjoy
Similar books
How to Build Android Apps with Kotlin: A practical guide to developing, testing, and publishing your first Android apps, 2nd Edition
EPUB
How to Build Android Apps with Kotlin: A practical guide to developing, testing, and publishing your first Android apps
2023 · PDF
Clean Android Architecture: Take a layered approach to writing clean, testable, and decoupled Android applications
2022 · EPUB
Clean Android Architecture: Take a layered approach to writing clean, testable, and decoupled Android applications
2022 · PDF
How to Build Android Apps with Kotlin: A hands-on guide to developing, testing, and publishing your first apps with Android. Code
2021 · ZIP
How to Build Android Apps with Kotlin: A hands-on guide to developing, testing and publishing your first apps with Android
2021 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF