| ▲ | stefan_ 4 days ago | ||||||||||||||||||||||||||||||||||
Three levels down and people have entirely forgotten what my post was. My "server" is some anemic ARM core built into real physical hardware with 64M of read-only storage. I don't want it spending its time "hydrating" some DOM, I don't want to bring any of this frontend insanity on there at all. No code hosted on npm shall ever run on that processor or I can't go to sleep in peace. So how do we still get a fancy SPA website? Build it all down to a simple zip bundle, the ARM can serve those static files just fine. The SPA talks to the ARM via a few JSON APIs. Very nice clean boundary. | |||||||||||||||||||||||||||||||||||
| ▲ | listenallyall 3 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
Yes, if your server is a weak, limited processor, you want to keep the demands on it as low and lean as possible, and let the client do the heavy lifting. HTMX is not a good fit for this scenario, just like PostgreSQL is not a good database to embed on your devices. This isn't a controversial idea and nobody would try to sell you on HTMX for your use case. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | array_key_first 3 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
My understanding is that HTML templating is often cheaper server-side than JSON serialization. | |||||||||||||||||||||||||||||||||||
| ▲ | ErroneousBosh 3 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
What's npm got to do with it? Why can't your code fill in the blanks in some HTML template instead of filling in the blanks in some JSON? | |||||||||||||||||||||||||||||||||||