DEV Community

Cover image for πŸ”₯I have launched a project and think it help you, maybe :)

πŸ”₯I have launched a project and think it help you, maybe :)

Anthony Max on November 12, 2024

Hello everyone! In this article I would like to tell you about the start of the project, which I think may be of interest to you. The work on the c...
Collapse
 
ben profile image
Ben Halpern

Neat

Collapse
 
anthonymax profile image
Anthony Max • Edited

Hello! Ty!

Hello

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.

Collapse
 
leob profile image
leob

What does it do better than HTMX ?

Collapse
 
anthonymax profile image
Anthony Max • Edited

In short, just try to customize the request to the server or use AbortController and other innovations added to ecmascript. (spoiler) you are unlikely to succeed, or will not succeed at all, because XMLHTTPRequest in 2024 will not allow this

Collapse
 
anthonymax profile image
Anthony Max

Hello! I wrote about this in detail on my old account, I need to duplicate it on the new one and add it to the blog. dev.to/antonmak1/hmpl-best-alterna...

Collapse
 
leob profile image
leob

Thanks, yes I see it:

"Why use HMPL and what are its advantages over HTMX?"

Collapse
 
campoto profile image
Cedrick F. Campoto

Hi, I also made this,
npmjs.com/package/kwikjs

Maybe we can help each other.

Collapse
 
sujaykundu777 profile image
Sujay Kundu

Nice one !

Collapse
 
anthonymax profile image
Anthony Max

Ty!
pepe

Collapse
 
riley320 profile image
Riley

Looks interesting, but I’m not sure if it really beats something like Alpine.js for simplicity.

Collapse
 
anthonymax profile image
Anthony Max

Yes, it's not a matter of simplicity anymore, but of customization.

Collapse
 
graham_scott_5578a7c1dfec profile image
Graham Scott

Reach out to this media-lord at "hackingloop6@ gmail . com, if you doubt your partner's commitment. He really helped me during my divorce which proved my ex was cheating both emotionally and financially. His hacking service is reliable.