I have a doubt about Compose internals. While read...
# compose
x
I have a doubt about Compose internals. While reading the book from Jorge Castillo, I've seen these 2 phrases on different parts: • ".... the
Applier
is in charge to do this. The current
Composer
delegates on this abstraction to apply all the recorded changes after the Composition... This process executes the list of Changes and, as a result, it updates the slot table" • "... change list is what ultimately makes the changes to the table. Right after that, it will notify the
Applier
to update the materialized node tree" I'm having a hard time at understanding wether the list of changes is the one applying the deferred changes to the slot table and the
Applier
updates the node tree from the slot table or if the
Applier
is the one in charge of applying the list of changes and also updating the node tree afterwards
a
ChangeList
is the class where the function to apply the changes (to both the slot table and the node tree) is located, and
Applier
will be called when changes need to be made to the node tree.
x
Thanks, that makes a lot of sense! I've seen that it's all delegated to Operation.OperationArgContainer.execute that takes both
Applier
and
SlotWriter
parameters. Operations to insert nodes like InsertSlots.OperationArgContainer.execute only use the
SlotWriter
and don't use the
Applier
while other operations like UpdateNode.OperationArgContainer.execute uses the
Applier
but not the
SlotWriter