Create a Strategic Design

We’ll incrementally built a front end to the TO-DO service. The main features the UI will provide are list tasks, add a task, and delete a task.

A GET request to the URL /tasks of the TO-DO service returns an array of tasks in JSON format. A POST request to the same URL adds a task, while a DELETE request removes an existing task. Let’s visualize a front end for this service—here’s a sketch of a simple UI for the three operations:

images/testdom/designsketch.png

The view could be a pure HTML file with ids for dynamically updatable DOM elements, and it can reference a JavaScript file that holds the client-side code. Upon loading the browser should ...

Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.