Experimental approaches and reusable components

One of the goals of the Digital Playbook was to experiment with new approaches while reusing as much as possible. The goal was to be platform agnostic, focusing on HTML, CSS and JavaScript while leveraging the Web Experience Toolkit (WET) as much as possible. Where requirements exceeded what was offered through WET, the goal was to develop reusable components that could be contributed back into WET for others to use.

The following sections include examples of experimental approaches and reusable components that resulted from the work on the Digital Playbook.

Interface components

The interface components in this section are built using reusable JavaScript functions and are controlled through JSON data nested in HTML markup.

Save form progress to a file

Involved components

Example implementations

Restoring form progress from a file

Involved components

Example implementations

Downloading data as a file or sending it through an HTTP request

Involved components

Example implementations

Generating an HTML table from a multi-dimensional object

Involved components

Example implementations

Add, edit and delete nested data

Involved components

Example implementations

Dynamically calculating results using data in the page

Involved components

Example implementations

Event triggering and handling

Involved components

Example implementations

Conditional logic and resulting actions

Involved components

Example implementations

Content authoring and management components

The content authoring and management components in this section are implemented using Jekyll, Liquid and Ruby but could be ported to any other server-side scripting language.

Generating a JSON dataset from authored Markdown content

Involved components

Example implementations

Generating different views using content retrieved from a dataset using the structure and tags

Involved components

Example implementations

Remotely retrieving an online dataset and using it to populate a select element

Involved components

Example implementations