Introduction ============ AWML is a web components library for building professional audio user interfaces. It has close integration with the `aux-widgets `_ library. This introduction aims to give an overview and explain basic concepts of AWML. It provides links to more in-depth documentation of the features discussed. AWML provides * :ref:`introduction-parameter-binding` for connecting UI components with backend parameters, * :ref:`introduction-templating` for combining pre-defined views into complex interfaces and * :ref:`introduction-protocol-backends` for controlling device backends. .. _introduction-parameter-binding: Parameter Binding ----------------- For binding components to backend parameters, for instance using a standard audio control protocol such as `AES70 `_, AWML allows backend parameters to be assigned to the DOM tree. This relies on backend parameters being represented by some kind of hierarchical addressing scheme (e.g. ``Channel1/Mute``). These parameter addresses will then be used by AWML components in order to decide which backend parameter to bind to. In general, there can be any number of different parameter trees defined on top of the DOM, however in basic views it will be only one. The assignment of parameter addresses to DOM elements is done hierarchically by assigning address prefixes to nodes. The resulting address of a given node is then the concatenation of the prefixes of the node itself and all its parents. Parameter trees are denoted by their unique string handle and the prefix of a node for a given handle is set using the attribute ``prefix-``. The default parameter tree with handle ``null`` uses the attribute ``prefix``. The documentation of :ref:`collectPrefix` contains more details about how prefixes are combined into a resulting address. Backend parameter can be bound to * `aux-widgets `_ components and properties of :ref:`template-components` using :ref:`OptionComponent`, * DOM element attributes using :ref:`AttributesComponent`, * CSS classes using :ref:`ClassComponent`, * CSS styles using :ref:`StylesComponent`, * the visibility of elements and widgets using :ref:`HideComponent` and :ref:`ShowComponent`, * the template name or location using :ref:`CloneComponent` and * the prefix of a node using :ref:`PrefixComponent`. .. _introduction-templating: Templating ---------- There are two main ways of templating built into AWML. The first are standard HTML templates which can be cloned into the DOM using the :ref:`CloneComponent`. The second are :ref:`template-components` which allow building complex custom components based on HTML templates. Basic HTML templates can either be ``