Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to boost your programming skills in HTML wi...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

How to boost your programming skills in HTML with HTMX

Are you tired of all those boring JS frameworks that load a HUGE node_modules in your machine, do a lot of useless and automagic stuff and seem like they want to create a PHP 2.0. You just want to build a simple form application using only the technologies that actually runs in the browser? Your problems are OVER. In this tech talk, I will show you all you can do with HTMX, a small, dependency-free, extensible, IE11-compatible library that extends your HTML (without transforming it into JS code). So you will be able to build modern user interfaces with the simplicity and power of hypertext.

Avatar for Luis von Rondow

Luis von Rondow

December 06, 2023
Tweet

More Decks by Luis von Rondow

Other Decks in Programming

Transcript

  1. whoami software engineer since 2018 js frameworks hater lofi organizer

    of this beaultiful meetup i believe in francesinha supremacy
  2. a brief story of web web 2.0 $.ajax({ url: "test.html",

    context: document.body }).done(function() { $( this ).addClass( "done" ); }); 1 2 3 4 5 6 $.ajax({ url: "script.php", type: "POST", data: {id : menuId}, dataType: "html" }); 1 2 3 4 5 6
  3. 1. state generated on the server 2. state sent down

    via JSON (intermidated) 3. app cache + a huge management (business logic) of this state on client 4. BOOM: produces a new state rendered on HTML
  4. the server will tell me when it changes or the

    client can ask for a change and htmx provides a very automated and declarative way of doing it
  5. hx-get will get stuff from an endpoint and set the

    element innerHTML to the response HTML hx-post will trigger a post to an endpoint and set the element innerHTML to the response HTML
  6. hx-get will get stuff from an endpoint and set the

    element innerHTML to the response HTML hx-post will trigger a post to an endpoint and set the element innerHTML to the response HTML hx-target hx-swap
  7. references - ThePrimegean - Fireship - Isaac Harris-Holt HTMX docs

    The Truth About HTMX | Prime Reacts htmx in 100 seconds HTMX for Impatient Devs