Leanpub Header

Skip to main content

Jetpack Compose internals

本书目前的完成进度为 100%上次更新时间:2022-11-20
Jetpack Compose is the future of Android UI. Master how it works internally and become a more efficient developer with it. You'll also find it valuable if you are not an Android dev. This book provides all the details to understand how the Compose compiler & runtime work, and how to create a client library using them. You could also be interested on the Jetpack Compose Internals course by Jorge…

最低售价

$34.99

$49.99

支付金额

作者利润

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
关于

关于

关于本书

This book explores the guts of Jetpack Compose, the brand new library by Google and the Android team that will become the future of Android UI. Dedicating time now to learn about its internals in-depth will yield powerful skills to write modern and efficient Android apps in the future.

If you are interested in other use cases of Jetpack Compose rather than Android, this book has got you covered also. Jetpack Compose internals is very focused on exploring the compiler and runtime from a generic perspective, making the overall experience very agnostic of the target platform. The book also provides a chapter dedicated to diverse use cases for Jetpack Compose, which exposes a few really interesting examples over code.

You could also be interested on the Jetpack Compose Internals course by Jorge Castillo. Find it in composeinternals.com

Jetpack Compose and Android are trademarks of Google LLC and this book is not endorsed by or affiliated with Google in any way.

捆绑包

本书页包含在这些优惠组合中:

作者

关于作者们

Jorge Castillo

Jorge is a Google Developer Expert (GDE) for Android and Kotlin that has been traditionally very active in the Android community.

翻译

翻译

语言

翻译套餐

目录

目录

Prelude

  1. Why to read this book
  2. What this book is not about
  3. Why to write about internals
  4. Keep the sources close
  5. Code snippets and examples

1. Composable functions

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

2. The Compose compiler

  1. A Kotlin compiler plugin
  2. Compose annotations
  3. Registering Compiler extensions
  4. Kotlin Compiler version
  5. Static analysis
  6. Static Checkers
  7. Call checks
  8. Type checks
  9. Declaration checks
  10. Diagnostic suppression
  11. Runtime version check
  12. Code generation
  13. The Kotlin IR
  14. Lowering
  15. Inferring class stability
  16. Enabling live literals
  17. Compose lambda memoization
  18. Injecting the Composer
  19. Comparison propagation
  20. Default parameters
  21. Control flow group generation
  22. Klib and decoy generation

3. The Compose runtime

  1. The slot table and the list of changes
  2. The slot table in depth
  3. The list of changes
  4. The Composer
  5. Feeding the Composer
  6. Modeling the Changes
  7. Optimizing when to write
  8. Writing and reading groups
  9. Remembering values
  10. Recompose scopes
  11. SideEffects in the Composer
  12. Storing CompositionLocals
  13. Storing source information
  14. Linking Compositions via CompositionContext
  15. Accessing the current State snapshot
  16. Navigating the nodes
  17. Keeping reader and writer in sync
  18. Applying the changes
  19. Performance when building the node tree
  20. How changes are applied
  21. Attaching and drawing the nodes
  22. Composition
  23. Creating a Composition
  24. The initial Composition process
  25. Applying changes after initial Composition
  26. Additional information about the Composition
  27. The Recomposer
  28. Spawning the Recomposer
  29. Recomposition process
  30. Concurrent recomposition
  31. Recomposer states

4. Compose UI

  1. Integrating UI with the Compose runtime
  2. Mapping scheduled changes to actual changes to the tree
  3. Composition from the point of view of Compose UI
  4. Subcomposition from the point of view of Compose UI
  5. Reflecting changes in the UI
  6. Different types of Appliers
  7. Materializing a new LayoutNode
  8. Closing the circle
  9. Materializing a change to remove nodes
  10. Materializing a change to move nodes
  11. Materializing a change to clear all the nodes
  12. Measuring in Compose UI
  13. Measuring policies
  14. Intrinsic measurements
  15. Layout Constraints
  16. LookaheadLayout
  17. Modeling modifier chains
  18. Setting modifiers to the LayoutNode
  19. How LayoutNode ingests new modifiers
  20. Drawing the node tree
  21. Semantics in Jetpack Compose
  22. Notifying about semantic changes
  23. Merged and unmerged semantic trees

5. State snapshot system

  1. What snapshot state is
  2. Concurrency control systems
  3. Multiversion concurrency control (MCC or 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. 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

7. Advanced Compose Runtime use cases

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

贡献者

关于贡献者们

Andrei Shikov

Andrei wrote the chapter about "Advanced Compose runtime use cases", one of the most interesting chapters in the book. It showcases how to create client libraries that leverage all the power of the Compose runtime.

Leanpub 无条件、零风险的100%满意保证

支付后的60天内,只需简单点击两下,您便可以退书并且取回先前支付的全部金额
查看完整条款

在10美元的购买中赚取8美元,在20美元的购买中赚取16美元

我们在7.99美元或以上的购买中支付80%的版税,在0.99美元到7.98美元之间的购买中支付80%的版税减去0.5美元固定费用在10美元的销售中您可赚取8美元,在20美元的销售中可赚取16美元。因此,如果我们以20美元的价格售出5000本未退款的图书,您将赚取80,000美元

(是的,一些作者在Leanpub上已经赚取了远超过这个数额的收入。)

事实上,作者们通过在Leanpub上写作、出版和销售已经赚取了超过1400万美元

了解更多关于在Leanpub上写作的信息

免费更新。无DRM。

如果你购买了Leanpub的书,只要作者更新这本书,你就可以免费获得更新!许多作者使用Leanpub在他们编写书籍的过程中发布他们的作品。所有读者都可以获得免费更新,无论他们何时购买的书或他们支付了多少钱(包括免费)。

大多数Leanpub书籍都提供PDF(适用于计算机)、EPUB(适用于手机和平板电脑)和MOBI(适用于Kindle)格式。书籍包含的格式会显示在此页面的右上角。

最后,Leanpub的书籍没有任何DRM版权保护的限制,所以你可以轻松地在任何支持的设备上阅读它们。

了解更多关于Leanpub的电子书格式以及在哪里阅读它们

在 Leanpub 上写作和出版

作者与出版社使用 Leanpub 来出版正在写作中和已完成的书籍,就像这本书一样。你也可以使用 Leanpub 来撰写、出版和销售你的作品!Leanpub 是功能强大的平台,非常适合认真的作者。它结合了简单、优雅的写作与出版流程,以及一个可销售正在写作中的电子书的线上商店。Leanpub 是作家的神奇之笔:只需编写纯文本,然后点击按钮即可出版你的电子书。真的就是这么简单。

学习更多关于在 Leanpub 上写作的信息