Title: {New Direction for interactives in Httpd/Toadhttpd} Class: {blog} Date: {Thu Aug 06 06:42:55 EDT 2020} Content-Type: {html} Format: {clay} date: {Thu Aug 06 06:42:55 EDT 2020} owner: ed44b6ff-12b4-4158-b7ca-03873dd57e42 --- BEGIN CONTENT --- para {Much of my work with [link http://www.tcl.tk/software/tclhttpd/ tclhttpd], the [link https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/httpd/httpd.md {httpd module}] , and [link http://fossil.etoyoc.com/fossil/toadhttpd Toadhttpd] have been built around the concept that the web client is an inert consumer of data. Any fancy interactives or reports had to be spoon fed to the client as finished HTML from the server.} para {Yes, this concept is decades old, out of date, and stems from learning to develop web sites in the midst of the browser wars. But, finally after 15 years or so, I think I'm ready to stop being a [link https://tvtropes.org/pmwiki/pmwiki.php/Main/ShellShockedVeteran {grizzled shell-shocked veteren}].} para {Today the norm is for a client to download a template of a page, and load in specific elements later via Jquery (or any other number of technologies.) A script on the page then adapts the content downloaded into [link https://knowyourmeme.com/memes/this-isnt-even-my-final-form {it's final form}].} para {Of course, there is still plenty of room in the ecosystem for a server to still sling dynamic content. But nowadays most of that dynamic content is in the form of XML or JSON data that feeds javascript.} para {I'll be playing in my next few blog posts at reformulating many of my web sites widgets as Javascript enabled players.} para {The relevant source files for today's exercise:} set UL [my tag UL] $UL item [link /[my request get PREFIX_URI]/table.json {table.json - JSON file}] $UL item [link /[my request get PREFIX_URI]/feed.js {feed.js - Javascript code}] $UL item [link /[my request get PREFIX_URI]/source.txt {source.txt - Raw markup for this page}] set TABLE [my tag table id border 1 mytable class {table table-striped}] $TABLE tag thead content {