Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you say more about (the|your perceived) relationship between SQL and htmx? When looking up HTMX[1] I was surprised to see what looks like a relatively young project with no direct relation obvious to SQL.

[1]: https://htmx.org/



htmx is a hypermedia-oriented library (like hotwire, unpoly, etc.) and so when you use htmx you exchange HTML with the server, rather than JSON. This means that HTML construction takes place on the server side, where SQL is available.

This is in contrast with traditional SPA libraries such as React, which typically access data via JSON APIs and construct a user interface on the client side. You can't make SQL generally available on the client side due to the obvious security issues, but projects like GraphQL have attempted to make the client side more flexible. Unfortunately I believe there is an inherent trade off with client-side data access that I outline here: https://intercoolerjs.org/2016/02/17/api-churn-vs-security.h...

So, as developers rediscover hypermedia & hypermedia oriented libraries, they will suddenly have access to SQL again.

And, as I mention above, new technologies like React Server Components, by putting evaluation on the server, also make SQL more easily accessible for developers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: