Live data from Hacker News

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

lassebomh.github.io

31–40 of 126 posts

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

#31

I wonder if it would be a good idea to move the whole HATEOAS thing towards things like desktop and mobile apps. Might be a fun experiment.

Mobile dev here. If you are talking about native mobile then I'v played around with using HATEOAS with native code in the past (around ~2013).

It works fine but is obviously not as flexible as on the web. It also does require that each linkable screen be developed in a strict black box fashion.

It was a fun exercise to try out, but not sure what the value of using it in production would be.

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

#32

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

Thankyou for the awesome library! I have a question. Is there a way to use HTMX with minimal server side changes. Specifically if I have an existing page that you fill in a form and submit and response is of course the entire page. I think it would be cool to tell htmx that the whole page is being returned BUT I only want to update #my-form and that way you don’t need any “if htmx request” kinda stuff on the server.…

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/

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

#34

Earlier quoted context omitted.

Thankyou for the awesome library! I have a question. Is there a way to use HTMX with minimal server side changes. Specifically if I have an existing page that you fill in a form and submit and response is of course the entire page. I think it would be cool to tell htmx that the whole page is being returned BUT I only want to update #my-form and that way you don’t need any “if htmx request” kinda stuff on the server.…

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/

That could be it! I missed that one. Will try it next time.

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

#40

I wonder if it would be a good idea to move the whole HATEOAS thing towards things like desktop and mobile apps. Might be a fun experiment.

Mobile dev here. If you are talking about native mobile then I'v played around with using HATEOAS with native code in the past (around ~2013). It works fine but is obviously not as flexible as on the web. It also does require that each linkable screen be developed in a strict black box fashion. It was a fun exercise to try out, but not sure what the value of using it in production would be.

I've found that HATEOAS is actually quite good for CRUD. You "link" to "lists" and items, and the information in the responses is enough to assemble pages, forms, other lists.

This way you only gotta build the "abstraction" in the app itself, the real structure of each page is entirely in the APIs.

Thing is, this saves money at the start, but people obviously want more customisation than is appropriate here. And as more and more pages become bespoke, hypermedia stop making sense :(

Post reply on HN