UIZE JavaScript Framework

TO DO - Uize.Widget.Page

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

right now, the implementation of useDialog has support for component loading that is a functionality specific to zazzle.com and that is dependent on the loadComponentIntoNode method implemented in Zazzle.Page. Either find a way to make this generic and configurable, or provide some hooks so that this code can migrate back into Zazzle.Page.
there is an ugly reference to productType that is Zazzle-specific. Find a way to migrate this out.

1. New Mechanism For Widget Adoption

With the declarative syntax for widget adoption, devise a way to have code that executes as part of the adoption process (possibly allow value of $ variable to be a function?).

CONSIDERATIONS

must cater to cases where HTML is to be a template module
must cater to case where data needed by widget instance is defined in separate module, or needs to be somehow computed

1.1. Existing Syntax

EXAMPLE


A major problem with this approach is that it does not allow such declarations to declare dependencies on other modules.

1.2. Dedicated pageWiring Script Type

EXAMPLE


1.3. Widget To Adopt is a Function

EXAMPLE


1.4. Dedicated widgetToAdopt Script Type

1.4.1. JSON Object's Properties As Per Current Syntax

EXAMPLE


1.4.2. JSON Object's Properties Has New Structure

EXAMPLE


simple / elegant
understandable / readable