ssr-playground
jimm.horse
ssr-playground | jimm.horse | |
---|---|---|
1 | 2 | |
20 | 0 | |
- | - | |
10.0 | 7.1 | |
almost 2 years ago | 6 months ago | |
JavaScript | JavaScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ssr-playground
jimm.horse
-
Throwing away 10 months of work after 2 months on the job
My own website is a kind of hybrid SSR/SPA in PHP. Navigating pages with JS enabled seamlessly updates the relevant DOM nodes with an AJAX call (and uses the history API etc), but going to a page fresh is entirely PHP.
It was fun to write. Relevant code is here:
https://github.com/ldyeax/jimm.horse/blob/master/j/j.php
https://github.com/ldyeax/jimm.horse/blob/cb6a1c03504cbe6b63...
I actually uncovered a niche bug across multiple browsers with this PHP code. In at least Firefox and Edge, if a page is cached with a fetch using accept:text/json, the response will be shown from view-source of the html page you have open, even if the content is different when you fetch the page with accept:text/html
-
Htmx Is the Future
I've made my personal website something of a hybrid SPA. WithJS enabled it only loads and replaces the relevant portions of the page, but a page renders fully from PHP going to it directly.
Relevant code:
https://github.com/ldyeax/jimm.horse/blob/master/j/j.php
https://github.com/ldyeax/jimm.horse/blob/master/j/component...
The JS would be much more elegant if script tags didn't need special handling to execute on insertion.
The experience is very seamless this way - I'm very pleased with it. It's live at https://sfw.jimm.horse - the dynamic behavior can be found clicking through the icons on the bottom.
What are some alternatives?
awesome-python-htmx - A curated list of things related to python-based web development using htmx
Alpine.js - A rugged, minimal framework for composing JavaScript behavior in your markup.
hyperview - Server-driven mobile apps with React Native
htmx-components - 🧩 Async HTMX + JSX
idiomorph - A DOM-merging algorithm
Yup - Dead simple Object schema validation