Live data from Hacker News

Show HN: I made a HTMX Playground 100% in the browser

lassebomh.github.io

91–100 of 126 posts

Re: Show HN: I made a HTMX Playground 100% in the browser

#91
post #74

Earlier quoted context omitted.

I know nothing about HTMX. Where do I look first?

https://htmx.org/ The examples at https://htmx.org/examples/ may also be helpful

aha! I already have access to LiveView so this seems redundant but this is good to know about

Re: Show HN: I made a HTMX Playground 100% in the browser

#92

Earlier quoted context omitted.

I know nothing about HTMX. Where do I look first?

If you want a longer introduction you can read out book (free online): https://hypermedia.systems

ah, thanks! This looks to satisfy a similar use-case to LiveView which I already have access to in my current stack but it's always good to know about other options

Re: Show HN: I made a HTMX Playground 100% in the browser

#93

Earlier quoted context omitted.

If I understood correctly, you can achive this with `hx-target` and `hx-select` - I'm doing this in an app to replace an editor content based on which link is clicked. - https://htmx.org/attributes/hx-select/ - https://htmx.org/attributes/hx-target/

Oh that's neat - so you can return more than htmx will use and it can select the element it needs in the response and discard the rest

Yep, I actually don't even do server side checks in my app I am building, I just hx-boost on my html element and then server side I redirect back to the page that should have the updated content, just like you would a traditional server rendered app, and htmx then swaps out the body, but if I use target and that I can tell it to only return say the `` tag and maybe another part of the page, the rest doesn't change.

Re: Show HN: I made a HTMX Playground 100% in the browser

#94
post #7

Is Htmx just the long overdue successor to DHTML that was all the hype in, say, 1997?

believe it or not I was around back then and, no, htmx is not the successor to DHTML, which was very JavaScript heavy htmx is an attempt to generalize the two core hypermedia controls in HTML (anchors & forms). It does this by making any element able to respond to any event by issuing any type of HTTP request and then placing the returned HTML anywhere (and in any manner) in the DOM. This last idea is called transclu…

If you have time, I have a question I haven't been able to answer reading the docs or skimming the linked book. My company's front end apps communicate exclusively with a GraphQL orchestration layer. I tried a while back to learn HTMX by building a demo remake of one of our apps, and I actually couldn't figure out how to make those requests. Am I missing something, or is this just a bad use case for HTMX?

Re: Show HN: I made a HTMX Playground 100% in the browser

#95

Earlier quoted context omitted.

Likewise man. In the face of avoiding JS, I think we've both taken one for the team here

Wait til you find out I'm using htmx with node.

Wait til he finds out what htmx is built with.

Re: Show HN: I made a HTMX Playground 100% in the browser

#97
post #90

hey there, I'm the creator of htmx, and I really appreciate you making this! very cool!

Haven’t tried htmx. Have you heard of phoenix liveview? Are they similar concepts?

htmx is lower level than the various liveview implementations

this makes htmx more work, in general, to accomplish things but also less opaque

htmx is laser focused on generalizing hypermedia controls in HTML (anchors & forms)

Re: Show HN: I made a HTMX Playground 100% in the browser

#98
post #94

Earlier quoted context omitted.

believe it or not I was around back then and, no, htmx is not the successor to DHTML, which was very JavaScript heavy htmx is an attempt to generalize the two core hypermedia controls in HTML (anchors & forms). It does this by making any element able to respond to any event by issuing any type of HTTP request and then placing the returned HTML anywhere (and in any manner) in the DOM. This last idea is called transclu…

If you have time, I have a question I haven't been able to answer reading the docs or skimming the linked book. My company's front end apps communicate exclusively with a GraphQL orchestration layer. I tried a while back to learn HTMX by building a demo remake of one of our apps, and I actually couldn't figure out how to make those requests. Am I missing something, or is this just a bad use case for HTMX?

sounds like a bad use case for htmx, if your server isn't returning hypermedia you are making your life pretty difficult

doable, but not fun

Re: Show HN: I made a HTMX Playground 100% in the browser

#99

Earlier quoted context omitted.

believe it or not I was around back then and, no, htmx is not the successor to DHTML, which was very JavaScript heavy htmx is an attempt to generalize the two core hypermedia controls in HTML (anchors & forms). It does this by making any element able to respond to any event by issuing any type of HTTP request and then placing the returned HTML anywhere (and in any manner) in the DOM. This last idea is called transclu…

I know this isn't something the authors can fix just like that, but shipping and import duties mean that the hard cover book is about as expensive for me as the smartphone I'm writing this on ($96.32 for a Samsung Galacy M04 as compared to $96.6 for the book). The book is great though. If you can't afford it I highly recommend reading it on the website. I haven't gotten through the last section just yet due to family…

Unfortunately I can't do much about the cost of shipping, etc.

You can head here:

https://hypermedia.systems/hypermedia-systems/

and print the book to PDF, adjusting fonts, etc as you like, and then print it out at a local print shop, if you want the text in high-res print.

If you like the cover, you can purchase a poster of it here:

https://swag.htmx.org/products/hypermedia-systems-cover-post...

We are selling the 18x12 at cost so people can have it w/o spending $50 on the hardback.

Re: Show HN: I made a HTMX Playground 100% in the browser

#100

Earlier quoted context omitted.

believe it or not I was around back then and, no, htmx is not the successor to DHTML, which was very JavaScript heavy htmx is an attempt to generalize the two core hypermedia controls in HTML (anchors & forms). It does this by making any element able to respond to any event by issuing any type of HTTP request and then placing the returned HTML anywhere (and in any manner) in the DOM. This last idea is called transclu…

This sort of sounds like turbolinks (or whatever it is called now)?

To an extent, htmx is the successor to intercooler.js, which was released in 2013 and which was a turbolinks-adjacent technology (although never really noticed by the 37Signals folks).

htmx is a bit more focused on one core concept, generalizing hypermedia controls, than hotwire.dev is, and is a little less magic. Both are fine choices for a hypermedia driven application.

Post reply on HN