Skip to content

Instantly share code, notes, and snippets.

View heikela's full-sized avatar

Mikko Heikelä heikela

View GitHub Profile
@heikela
heikela / Task.md
Last active April 30, 2018 14:08
Experience tracker challenge

Experience tracker challenge

This challenge aims to explore how different UI frameworks/libraries/architectures handle some complexities often present in larger apps (*), while at the same time only requiring the implementation of a reasonably small, self contained, and almost useful app. (* e.g. many parts of the app dealing with the same data, enforcing constraints)

The challenge is to build a competence tracker for the HR department of a small company. The task is outlined as a list of successive steps, to allow coherent partial implementations. The steps are:

  1. Display an employee. The employee has a name. This is the employee view. The UI for the following steps can be implemented in it unless otherwise indicated.

  2. Allow editing an employee's name.

// jQuery extensions
$.fn.valueAsObservable = function valueAsObservable() {
var changes = $(this).changeAsObservable();
var keyUps = $(this).keyupAsObservable();
var values = changes.merge(keyUps).map(function (e) {return e.target.value});
return values.distinctUntilChanged();
}
// Define some streams