Wizard form

Motivation

This example implements a non-trivial application process, which is a typical part of enterprise applications. This process has a series of steps, with conditions (business rules) for moving from one step to another. Additionally, we use this example to show how an iterative specification and development process works with state machines.

First iteration

In the initial iteration, the designers produce high-level user flows and the development team refines more detailed specifications from those user flows.

Specifications

Here are the initial specifications for the volunteer application workflow, as extracted from the UX designers. Those initial specifications are light in details, being simple lo-fi wireframes. However the user flow summarizes nicely the key user scenarios:

Imgur

Furthermore, the following must hold for a good user experience and to guarantee a valid user application:

Modeling

Modeling the user flows with a state machine surfaces issues that did not appear in the high-level user flow, which catered mostly to the happy path for the user. We have to handle data fetching and error flows nicely. The resulting state machine, which acts as detailed specifications, is as follows:

modelization - first iteration

Using this machine as a basis for a working prototype without reaching the implementation phase, new requirements emerge and the model is subsequently updated.

Second iteration

In the second iteration, some improvements on user experience are decided.

Specifications

We end up with the following specifications:

Modelization

The resulting updated machine is as follows:

second iteration modelization

Cyclejs implementation

A (re-)implementation (to avoid licensing issues) was realized with cycle.js, a stream-based front-end framework. I reproduce here an animated gif:

animated demo of volunteer application

The state machine implementation can be found in the repository. We won’t reproduce it here as it is 175 lines of code.

Svelte implementation

I plan to do yet another implementation with Svelte.