Jetpack Compose internals ๐Ÿ“–

Do you wonder how Jetpack Compose works internally, or how the compiler or the runtime work together? Are you curious about other use cases for Compose? Did you ever think about how Composable functions communicate with the compiler and the runtime?

It's your lucky day ๐Ÿ™Œ Jetpack Compose internals is your chance to go one step further and learn the guts of what will become the new standard of Android UI.

My portrait pic

Diamond sponsor ๐Ÿ’Ž

Companies hire Snapp Mobile to build fantastic iOS and Android apps. Beyond that, they are often asked to help with UI and UX design as well as advise on solutions for broader architecture challenges that accompany mobile systems. Snapp has many years of experience building software for companies big and small. If you want great code and sensible decisions, Snapp can help.

On top of this, Snapp created Snapp Automotive, a new specialist company focusing on automotive. If you are interested, you can read more about it here.

The content

The book covers following topics among many others.

1. Composable functions

1. The nature of Composable functions
2. Composable function properties
3. Calling context
4. Idempotent
5. Free of side effects
6. Restartable
7. Fast execution
8. Positional memoization
9. Similarities with suspend functions
10. Composable functions are colored
11. Composable function types

2. The Compose Compiler

1. A Kotlin compiler plugin
2. Compose annotations
3. Registering compiler extensions
4. Static analysis and static checkers
5. Call, type, and declaration checks
6. Diagnostic suppression
7. Kotlin and runtime version checks
8. Code generation (IR) and lowering
9. Inferring class stability
10. Enabling live literals
11. Compose lambda memoization
12. Injecting the Composer
13. Comparison propagation
14. Default parameters
15. Control flow group generation
16. Klib and decoy generation

3. The Compose Runtime

1. The Slot table and the list of changes
2. Modeling the changes
3. The Composer and how it is fed
4. Writing and reading groups
5. Remembering values
6. Recompose scopes for recomposition
7. Side effects in the Composer
8. Storing CompositionLocals & source info
9. Linking Compositions as a tree
10. The current State snapshot
11. Navigating the tree nodes
12. Performance when building the tree
13. Applying the changes
14. Attaching and drawing the nodes
15. Composition
16. Creating a Composition
17. The initial Composition process
18. Applying changes after Composition
19. The Recomposer
20. Recomposition process
21. Concurrent Recomposition

4. Compose UI

1. To be written
2. To be written
3. To be written
4. To be written
5. To be written
6. To be written
7. To be written
8. To be written
9. To be written
10. To be written
11. To be written
12. To be written
13. To be written
14. To be written

5. The State snapshot system

1. What snapshost state is
2. Concurrency control systems
3. Multiversion concurrency control (MVCC)
4. The Snapshot
5. The snapshot tree
6. Snapshots and threading
7. Observing reads and writes
8. MutableSnapshots
9. GlobalSnapshot and nested snapshots
10. StateObjects and StateRecords
11. Reading and writing state
12. Removing or reusing obsolete records
13. Change propagation
14. Merging write conflicts

6. Smart recomposition

1. To be written
2. To be written
3. To be written
4. To be written
5. To be written
6. To be written
7. To be written
8. To be written
9. To be written
10. To be written
11. To be written
12. To be written
13. To be written
14. To be written

7. Effects and effect handlers

1. Introducing side effects
2. Side effects in Compose
3. What we need
4. Effect handlers
5. Non suspended effects
6. Suspended effects
7. Third party library adapters

8. The Composable lifecycle

1. To be written
2. To be written
3. To be written
4. To be written
5. To be written
6. To be written
7. To be written

9. Advanced Compose use cases

1. Compose runtime vs Compose UI
2. Composition of vector graphics
3. Building vector image tree
4. Integrating vector composition into Compose UI
5. Managing DOM with Compose
6. Standalone composition in the browser
7. Conclusion

The authors and the project

This book is being written by me (Jorge Castillo) and Andrei Shikov.

I started writing this book around a year ago, and it helped me to escape a bit from the events happening around and focus on something interesting. It started as a series of posts and suddenly became a book. It is a chance to challenge myself and learn more about a new technology. A great consequence is to be able to share all the gathered knowledge with others ๐Ÿฅณ

To write this book we explored the Jetpack Compose sources via cs.android.com and sources included in Android Studio. We also had to built our own side projects.

This book aims to gather all the relevant knowledge about Jetpack Compose internals so it works as a reference for the years to come. Jetpack Compose is the future of Android UI, but it will also gain relevance in other platforms given its multiplatform nature.

Support me by buying the book ๐Ÿš€

By buying the book you are not only rewarding the countless ours of effort invested, but also boosting my motivation to keep working on it ๐Ÿ™

BUY THE BOOK ๐Ÿš€ SINGLE PAYMENT FROM - ๏นฉ39.99 ๐Ÿคฉ


My portrait pic

Manuel Vivo

โ€œCertainly one of the best resources to learn about the internals of Jetpack Compose. The details in which everything is explained in the book are mind-blowing. 100% recommended for any developer interested in what Jetpack Compose does under the hood. Disclaimer: it does a lot!โ€

My portrait pic

Joe Birch

โ€œBeing clearly explained and easily consumable, Jorgeโ€™s Jetpack Compose content has been a great learning resource. Iโ€™m really looking forward to picking up this book and soaking up all of the knowledge around these Compose topics!โ€

My portrait pic

Antonio Leiva

โ€œJorge is able to explain hard concepts in the simplest possible way. This book is another proof of his teaching abilities.โ€

My portrait pic

Enrique Lรณpez-Maรฑas

โ€œJorge has done an astonishing job at presenting Compose and its internal to the masses. I can absolutely endorse his book for any developer interested in the peculiarities of Compose and eager to learn more about it.โ€

My portrait pic

Andrei Shikov

โ€œJorge did an amazing job explaining how Compose works in smallest detail, and thereโ€™s so much more to it than only displaying UI. I thoroughly enjoyed hacking different things based on it, and I hope you will too!โ€

My portrait pic

Jorge Castillo

โ€œThis book is one of the hardest challenges Iโ€™ve faced as a developer. Iโ€™ve put all my love and effort on creating a consciously crafted piece of knowledge.โ€

Support me by buying the book ๐Ÿš€

By buying the book you are not only rewarding the countless ours of effort invested, but also boosting my motivation to keep working on it ๐Ÿ™

BUY THE BOOK ๐Ÿš€ SINGLE PAYMENT FROM - ๏นฉ39.99 ๐Ÿคฉ