UIZE JavaScript Framework

TO DO - Uize.Widget.Population

This is a TO DO document for the Uize.Widget.Population module.

1. Optimization

!!!!!! store the reconstruction sequence so that it is only ever reformulated if the templateItem or templateStr are modified. This will optimize the repeat use of an instance, which is common in Zazzle's design tool attribute selectors.

could theoretically move some of the optimization into the getOutput method as well as where it is right now in the updateUi method, so that if the templateStr, templateItem, and items state properties don't change then the output isn't generated repeatedly if the getOutput method is called repeatedly

2. Improve replaceByToken method

add support for an array as the second param (where the tokens are of the form {elementNo})

2.1. - add support for an optional tokenNaming scheme param

if its value is a string (e.g. "[#KEY]", "{KEY}", "##KEY##"), the word KEY will be replaced with the key name

2.1.1. - if its value is a function, it will receive the key name and must return the token name. This allows complete flexibility in token name conventions, such as always camel-casing, uppercasing, crunching, etc.

eg. function (_keyName) {return '[' + _keyName.toUpperCase () + ']'}

default value for this param is "{KEY}"