0% found this document useful (0 votes)
21 views

01udfov/01txyov - W A I

This document provides instructions for updating a web-based task manager to consume a REST API created with Express. Students are asked to use the Fetch API to retrieve tasks, create new tasks, and filter tasks by properties and project. They should also extend the application to mark tasks as complete, delete tasks, and edit existing tasks by reusing the modal for creation. Optionally, an API can be added to get projects and extend the web app accordingly. Hints include starting points for the client and server code.

Uploaded by

paci93
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

01udfov/01txyov - W A I

This document provides instructions for updating a web-based task manager to consume a REST API created with Express. Students are asked to use the Fetch API to retrieve tasks, create new tasks, and filter tasks by properties and project. They should also extend the application to mark tasks as complete, delete tasks, and edit existing tasks by reusing the modal for creation. Optionally, an API can be added to get projects and extend the web app accordingly. Hints include starting points for the client and server code.

Uploaded by

paci93
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like