RE: Static data for web pages
Larry Masinter <[email protected]> Sun, 10 May 2020 12:41:58 -0700
| Newsgroups | gmane.org.w3c.tag |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format. ------=_NextPart_000_0089_01D626C8.65868E00 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Check out the work of the WPACK group in IETF as a possible container = model for data and app. =20 =20 From: Melvin Carvalho <[email protected]>=20 Sent: Sunday, May 10, 2020 2:09 AM To: TAG List <[email protected]>; Tim Berners-Lee <[email protected]> Subject: Static data for web pages =20 Hi Tag =20 I wanted to ask about a possible data model for the web. Whether it = exists, or whether or not it's a good idea. =20 It revolves around the popular idea of Single Page Applications (SPA) = and "static" data. Single pages applications written in JS are well = understood, I am going to consider an app without routes, so truly a = "single page" SPA. =20 State management is a common challenge. Where the state of the app is = kept in a self contained store of some kind. =20 The problem is that when you reload the app the store will reset itself = and the variables will not remember where they were when they left off. = =20 Other languages have a solution for this called "static" variables. = Ones that remain constant to a degree. But I dont think we have = "static" variables on the web, AFAIK. =20 A typical work around to this would be to have some kind of REST API = with a server running to maintain that API and perhaps a bearer token to = authenticate and allow you to save state. That's quite an overhead. =20 What if, instead an SPA were to have a static part. Perhaps readers of = this list are familiar with "data islands", a bunch of data that is = stored in a script tag and is global. This could be in turn used to = initialize the app. =20 What if you could use that global data to bootstrap your SPA and indeed = change it, and keep it persistent. A method to do this could be along = Timbl's ideas of a read write web where you send a bearer token and PUT = the data back to the page you are looking at. But only change the data = island. The app itself could be a single line shim. =20 Could this be a solution to create persistent static data for web pages = and single pages apps, on the web? =20 Would love to hear if there's any existing solutions to this, or any = feedback =20 Best Melvin ------=_NextPart_000_0089_01D626C8.65868E00 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta = http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta = name=3DGenerator content=3D"Microsoft Word 15 (filtered = medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} p.msonormal0, li.msonormal0, div.msonormal0 {mso-style-name:msonormal; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; font-size:11.0pt; font-family:"Calibri",sans-serif;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri",sans-serif;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US = link=3D"#0563C1" vlink=3D"#954F72"><div class=3DWordSection1><p = class=3DMsoNormal>Check out the work of the WPACK group in IETF as a = possible container model for data and app.<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><div = style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in = 4.0pt'><div><div style=3D'border:none;border-top:solid #E1E1E1 = 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b>From:</b> = Melvin Carvalho <[email protected]> <br><b>Sent:</b> = Sunday, May 10, 2020 2:09 AM<br><b>To:</b> TAG List = <[email protected]>; Tim Berners-Lee = <[email protected]><br><b>Subject:</b> Static data for web = pages<o:p></o:p></p></div></div><p = class=3DMsoNormal><o:p> </o:p></p><div><div><p class=3DMsoNormal>Hi = Tag<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p class=3DMsoNormal>I = wanted to ask about a possible data model for the web. Whether it = exists, or whether or not it's a good idea.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>It revolves around the popular idea of Single Page = Applications (SPA) and "static" data. Single pages = applications written in JS are well understood, I am going to consider = an app without routes, so truly a "single page" = SPA.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>State management is a common challenge. Where = the state of the app is kept in a self contained store of some = kind.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>The problem is that when you reload the app the store = will reset itself and the variables will not remember where they were = when they left off. <o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>Other languages have a solution for this called = "static" variables. Ones that remain constant to a = degree. But I dont think we have "static" variables on = the web, AFAIK.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p class=3DMsoNormal>A = typical work around to this would be to have some kind of REST API with = a server running to maintain that API and perhaps a bearer token to = authenticate and allow you to save state. That's quite an = overhead.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>What if, instead an SPA were to have a static = part. Perhaps readers of this list are familiar with "data = islands", a bunch of data that is stored in a script tag and is = global. This could be in turn used to initialize the = app.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>What if you could use that global data to bootstrap = your SPA and indeed change it, and keep it persistent. A method to = do this could be along Timbl's ideas of a read write web where you send = a bearer token and PUT the data back to the page you are looking = at. But only change the data island. The app itself could be = a single line shim.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>Could this be a solution to create persistent static = data for web pages and single pages apps, on the = web?<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>Would love to hear if there's any existing solutions = to this, or any feedback<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>Best<o:p></o:p></p></div><div><p = class=3DMsoNormal>Melvin<o:p></o:p></p></div></div></div></div></body></h= tml> ------=_NextPart_000_0089_01D626C8.65868E00--