DEV Community

Discussion on: 🔥I have launched a project and think it help you, maybe :)

Collapse
 
grenishrai profile image
Grenish rai

It's really great knowing that there is some alternative to HTMX and Alpine.js. But I've few question in my mind regarding performance and security.

What specific optimizations does HMPL implement to ensure faster page loads compared to client-side frameworks? And how does it manage server load when rendering UI components server-side?

What security measures are in place to prevent common vulnerabilities such as XSS or CSRF in HMPL applications? How does it handles data validation and sanitization?

If the question regarding security is not that relevant then it's okay but I'm really curious about performance.

Collapse
 
anthonymax profile image
Anthony Max • Edited

In terms of performance, there is a point in the documentation about memoization, this mechanism allows to significantly speed up interaction with the user interface, since the components will be taken from the cache. In terms of security, DOMParser is used by default in HMPL instead of innerHTML, and all script tags are removed when processing the UI. This allows for maximum, as far as possible, safe interaction with the server. In terms of the rest, since HMPL is completely customized, that is, almost everything depends on the programmer, unlike HTMX, then the issue of security lies more with the programmer himself.