Transport
For web applications to support synchronizing their users’ data across different clients with which their users may use them, they rely on databases they are obliged to host as the persistent (and hopefully secure) store of their users’ information.
CS 343 limits its scope to client-side (web) application development. The final project for CS 343 is a Dynamic Application Protoype because one of the key features required for web applications is out of scope: persisting users’ data to support synchronized state across clients.
This lab guides you through two generic adhesive strip bandage strips 🩹🩹 for supporting transporting the user’s data between clients without the use of a server-hosted ☁️ database.
Learning Objectives
By the end of this lab, you should be able to:
- create (receive/parse) a “sharable link” such that another user of your app would get to a particular state of the app if they follow it
- export application state from– and import to
localStorage
Prerequisites
- beginning localStorage (e.g. as exercised earlier)
- Familiarity with the browser’s
Locationinterface, especially itssearchproperty and URLSearchParams. - Familiarity with the browser’s
FileReader API
Instructions
- Begin with this starting code
- Complete Parts 1 and 2 app as specified in the page’s aside.
- The result will be that you can add items into the todo list in the page, revisit the page and see that they persisted, but then you can also transport this state to another client (send the link to your phone, your friend, another browser, or another browser container).