I have a Perspective view that receives data as a parameter. From that single source, I need to derive several custom properties — processed data, validation results, and state flags.
I'm trying to decide between two approaches:
Option A — Single onChange script
All derived properties are set inside one params.value onChange handler. One execution, explicit order, easy to read top-to-bottom.
Option B — Binding chain
Each custom property has its own binding with a script transform. The chain looks like this:
-
custom.A→ bound toparams.value, script transform decodes/normalizes the raw data -
custom.B→ bound tocustom.A, script transform runs validation and returns a result object -
custom.C→ bound tocustom.B, transform extracts a boolean flag from the result -
custom.D→ bound tocustom.A+ operator input, determines whether a change was made -
Button
enabled→ bound tocustom.C+custom.D
Fully declarative — each property is self-contained and updates automatically when its source changes.
Where I have concerns with Option B:
As the chain grows deeper (A → B → C → UI state), it becomes harder to trace why a UI element is in a certain state — you have to open each property's binding individually. With Option A, you read one script top-to-bottom.
My questions:
-
Does Perspective guarantee evaluation order when a binding change cascades through a chain like A → B → C, or can you hit a state where C reads B before B has finished updating from A?
-
At what complexity — number of derived properties or chain depth — does one approach clearly win over the other?
-
Any general best practice for this pattern in Perspective?