pretty cool seeing your breakdown, makes me rethink if iām sticking with my stack out of laziness or actual need - you ever feel like itās just habit that keeps you on one tool for ages?
Well, here it depends on what someone needs in the task - yes. But, it does not cancel the fact that with HTMX you will not be able to customize the request normally.
Overview: The discussion emphasizes HMPL as a viable replacement for HTMX in web development, providing similar functionalities while being more customizable.
Modules Comparison
Both HTMX and HMPL work with HTML from the server
Similar concept but different implementations
HTMX is minimalistic, while HMPL offers more customization
Simple Clicker Example
HTMX Implementation: A basic counter with limited settings
Uses XMLHTTPRequest for request handling
Limited customization options
HMPL Implementation: Compiles a similar clicker using JavaScript
Allows greater flexibility in request handling
Key Problems Identified
HTMX
Minimal JavaScript dependency makes customization difficult
Requests are sent using a 25-year-old XMLHTTPRequest standard
HMPL
Utilizes customizable fetch for modern JavaScript features
Complex Form Example
HTMX: Form submissions with basic functionality
Uses hx-include to include form data
HMPL: Replicates form behavior with enhanced request customization
Capable of modifying requests by extracting form data.
Size Comparison
HTMX leads in application size efficiency
Smaller application sizes when using minimal settings
HMPL shows decent dimensionality compared to alternatives.
Conclusion
Users can still opt for HTMX, but HMPL offers an alternative for those needing more functionality.
The choice depends on the complexity of the application and the specific needs of the developer.
Love this deep dive into how much more flexibility HMPL offers on request customization compared to HTMX.
Curious if there are still any scenarios where you'd reach for HTMX over HMPL, or have you fully switched?
When size is the only thing that matters, otherwise I choose HMPL
pretty cool seeing your breakdown, makes me rethink if iām sticking with my stack out of laziness or actual need - you ever feel like itās just habit that keeps you on one tool for ages?
Yes
Well, I just wrote an article about this.
Like the styling from HTMX. Like the KISS convention from HTMX. Like the HTML approach from HTMX. So Hmpl is not for me.
Well, here it depends on what someone needs in the task - yes. But, it does not cancel the fact that with HTMX you will not be able to customize the request normally.
Loved the alternative..
I think this is a great replacement.
Overview: The discussion emphasizes HMPL as a viable replacement for HTMX in web development, providing similar functionalities while being more customizable.
Modules Comparison
Simple Clicker Example
Key Problems Identified
fetchfor modern JavaScript featuresComplex Form Example
hx-includeto include form dataSize Comparison
Conclusion
made with love by axrisi
