01UDFOV/01TXYOV – WEB APPLICATIONS I
INTERACTING WITH REST API
During this sixth lab, you will update your web-based task manager to consume the REST API realized with
Express in the previous lab.
EXERCISE – A WEB-BASED REST CLIENT
Update the task manager you developed in the fourth lab to use the REST API realized in the previous lab
(and remove the local task list). In particular, use the Fetch API to:
• retrieve all the available tasks
• create a new task
• filter the tasks according to their properties (i.e., Important, Today, Next 7 Days, etc.)
• filter the tasks according to their project
Finally, extend the web application to:
• mark a task as complete, by acting on the task’s checkbox
• delete an existing task, by clicking on a button, available for each task
• edit an existing task, by acting on a button; to perform this operation, re-use the modal for
creating a new task, pre-filled with the available information
Extra: Add an API in the server for getting the “projects”, and extend the web application accordingly.
Hints:
1. You can use the solution available for Lab 4 as a starting point, if you prefer:
http://github.com/polito-WA1-2020/lab4-more-javascript-browser
2. Similarly, for the server-side part, you can use the solution to Lab 5: https://github.com/polito-WA1-
2020/lab5-rest-express