Mastering Android Architecture: Volume 2: Architecture at Scale – Modularization, Gradle Build Logic, Testing, Security, Kotlin Multiplatform, Adaptive UIs and On-Device AI

Sivavishnu R
Ebook
725
Pages

About this ebook


Most architecture advice works fine until the app, the team and the codebase all get bigger. This book is about what happens next, and the decisions that keep it from falling apart.

Mastering Android Architecture, Volume 2: Architecture at Scale takes NowReading, the offline-first app built in Volume 1, and grows it the way real apps grow: more modules, more developers, more tests, more devices and more platforms. It shows why each scaling decision is expensive to get wrong, what it costs, when the popular answer doesn't fit your team, and how to record your choice as an Architecture Decision Record so the next developer understands it.

What's inside (12 chapters in 3 parts, plus 5 appendices):



Modularization and Scale: modularization strategy (by feature, by layer or both, API/implementation splits, avoiding the "core" junk drawer, the strangler pattern), build architecture with Gradle version catalogs, convention plugins and measured build performance, architecture for large teams (Conway's Law, module ownership, automated architecture tests, feature flags and trunk-based development), and migrating legacy Java, XML and RxJava code without a rewrite


Quality: Testing, Performance, Security: a testing strategy and unit tests (fakes, coroutines, Flow with Turbine, ViewModels, Room), Compose UI, screenshot and end-to-end testing, performance budgets, startup, memory and production monitoring, and security and privacy architecture (threat modeling, secure storage, OAuth 2.0 with PKCE, passkeys, OWASP MASVS)


Advanced and Future-Facing: Kotlin Multiplatform and sharing the core with iOS, adaptive layouts for foldables, tablets, Wear OS and widgets, on-device AI behind a repository with streaming, fallback and safety, and a final case study that traces NowReading end to end and turns the book into your own architecture playbook


Appendices: all 26 Architecture Decision Records, architecture cheat sheets, a comparison of MVC, MVP, MVVM, MVI, Clean, Redux-style and Circuit, an Android system design interview guide with six worked problems, and a glossary with further reading





What makes it different: every chapter opens with a realistic failure, explains the decision that would have prevented it, then applies it to NowReading in compilable steps you write yourself. Every chapter ends with common pitfalls, a table of trade-offs and alternatives, review questions and a hands-on exercise. Every important decision becomes an Architecture Decision Record you can reuse in your own projects.

Who it's for: Android developers who are comfortable with layers, unidirectional data flow, repositories, Hilt, coroutines and Flow. A short "Before You Begin" section summarizes Volume 1 if you are starting here. Tech leads and architects will get the most from the chapters on modularization, large teams, build architecture and quality, where the decisions are as much about people and process as about code. The system design interview guide is a bonus if you are preparing for senior-level interviews.

This is Volume 2 of 2. Volume 1, Foundations and Core Architecture, builds NowReading from an empty project

Most architecture advice works fine until the app, the team and the codebase all get bigger. This book is about what happens next, and the decisions that keep it from falling apart. Mastering Android Architecture, Volume 2: Architecture at Scale takes NowReading, the offline-first app built in V...

Discover more

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.