DEV Community

Discussion on: Understanding Transitional JavaScript Apps

Collapse
 
jon49 profile image
Jon Nyman

I've been experimenting with going from Server side rendering all the way to offline app capability. For certain apps I think this is possible and desired and others it isn't.

But basically, I start with forms as the core so it can submit even if you have no JS. Then I wrote my own HTMX-like library (HTMF) that focuses on forms instead of having the expectation that JavaScript will be available.

Then for the next step I use a service worker to render the HTML for each page that interacts with HTMF and I save the data to indexeddb and then syncs this data to the back end.

I'm just one person with a day job and family so I don't have a whole lot of time to develop this. But it has been fun and I've tried to keep it fairly minimal on the JS side of things. I haven't gotten this completely implemented yet either. It would be nice to get to the point where it works across all the domains. But I don't see any reason why it shouldn't work.

Links:

github.com/jon49/htmf
github.com/jon49/html-template-tag...
github.com/jon49/WeightTracker/tre...