4 ms·
I think the document web markup language would have to be more like server-side HTML templating languages[1] with the added ability to talk to REST endpoints th
by 66fm472tjy7 6y ago
I think the document web markup language would have to be more like server-side HTML templating languages[1] with the added ability to talk to REST endpoints than markdown. That means declarative support for
* declaring JSON (or similar format, but why reinvent the wheel) variables
* rendering the values of these variables
* interacting with the variables with controls (inputs, check boxes, selects, etc)
* conditional rendering based on those variables
* iteration over them
* submitting a form as a JSON object
* saving a JSON response from the server into a variable
* re-rendering the effects of a variable change without a full page reload
I think a major reason for why we ended up here[2] is because browsers did not add these features to HTML and thus devs resorted to AJAX and small JS snippets at first and then kept expanding the use of JS.
[1] as a Java dev who used to do front-end before the ascendance of client side SPA frameworks I'm thinking of JSP, JSF, Thymeleaf, etc. Maybe the client side stuff used nowadays is similar, I'm just not familiar with it.
[2] being forced to run a turing-complete programming language just to display a fully static document, leaving one exposed to security risks (yes, the browser guys are doing a much better job sandboxing than Flash, Java Applets, etc) and tracking.
- baystep 6y agoI wonder if something like Nunjucks but with CommonMark could work great for the document web.
- bE9a3S5So8igd3 6y agohttps://en.wikipedia.org/wiki/Apache_Tapestry https://en.wikipedia.org/wiki/Apache_Tapestry
- ratww 6y ago> I think a major reason for why we ended up here[2] is because browsers did not add these features to HTML and thus devs resorted to AJAX and small JS snippets at first and then kept expanding the use of JS. That's my hunch as well. If HTML had built-in features such as modals (maybe as an evolution of popups), or partial rendering of server side data (maybe as an evolution of frames/iframes), it would have taken more time to reach the current state. Btw, your list reminds me of Intercooler.js.