Dynamic Properties: Benefits of Dynamic Properties
Benefits of Dynamic Properties
Dynamic properties are similar to a spreadsheet's implementation of a formula. A cell's value can be a constant or a formula. A formula can include references to any number of other cells in the spreadsheet. Likewise, a dynamic property can reference properties of other elements on the same document, as well as regular variables and functions.
One of the benefits of dynamic properties is that once you find the functional dependency, you don't have to monitor or maintain the page. You describe in formulas the mathematical dependency between objects, properties, and variables. This dependency is always valid and kept by the browser itself, with no scripting interruptions.
Using dynamic properties is more efficient. With constant properties, upon a certain event, you had to go over all elements on the page and update them. With dynamic properties, you figure out the exact dependencies upfront, so you never update a property without a definitive need. Continuing the spreadsheet analogy, it is much more efficient to update those cells that need to be updated according to the formulas assigned to them than go over all cells and check which cells need to be updated and then update them.
Next: How to set a dynamic property
Produced by Yehuda Shiran and Tomer Shiran
Created: July 18, 2000
Revised: July 18, 2000