schizanon, (edited ) to webdev

If there was an element that changes it's content when users interact with other elements on the page, what name would it have?

PLEASE NOTE: I am not suggesting that this element needs to exist; I am only asking what it would be called. I'm building a CustomElement, I just want it to have a name that makes sense.

Vote and suggest others in replies. Please boost for reach!

schizanon, (edited )

Round 3:

An <HTML> element that updates with the result of an HTTP request that some other element on the page made.

Links and forms inside it may be changed so that they only update this element instead of the whole page; similarly to Hotwire: TurboFrames https://turbo.hotwired.dev/handbook/frames

mxbck, to random German
@mxbck@front-end.social avatar

htmx is cool and all, but returning HTML directly from a server? idk, sounds a bit experimental.

vintprox, (edited )
@vintprox@techhub.social avatar

@jorgealvarez @mxbck

I'm really confused as to why this is so novel to those who comment here. #JSON was not even a part of #REST: it is usually not representing anything and is not self-explanatory. Clients somehow have to catch up to API changes all the time, and backend can go chill??? This must be an obvious flaw with #JSONAPI.

And yet, the concept of #hypermedia responses, that #HTMX and #HATEOAS try to remind us of, seems alien to most. Oof, now that's the power of gaslighting in development circles! :rickwhoah:

schizanon, to webdev

Does include ? If so, how does one deliver over a ?

kerfuffle, to webdev
@kerfuffle@mastodon.online avatar

I'm only just finding my way in the land of , but it feels like "trigger a request from any element" is a trap. I want progressive enhancement, which still requires a functional non-Javascript page before adding the nice things htmx offers. I didn't realise how rusty I am with regard to designing a presentation layer for all this in the backend.

kerfuffle,
@kerfuffle@mastodon.online avatar

@_chrismay
Yeah I've been looking at that. Reading the HX-Request header to determine whether to give a full-page response or just a snippet is what I do, and it quickly made it clear that navigating my site structure needs more up-front attention. Which is pretty much in line with #HATEOAS I think.

#progressive_enhancement

schizanon, to webdev

When I got started in #webDev I used a lot of <forms> and when I learned about #REST I wondered why there was no way to generate PUT, PATCH, and DELETE #http verbs from #html

Turns out a main goal of #htmx is to solve that!

https://hypermedia.systems/extending-html-as-hypermedia/#_why_only_get_post

#javaScript #hypermedia

schizanon,

@VamptVo

a) HTML attr based DSLs give me Angular flashbacks. It's declarative, but sometimes I think declarative is harder to grok than imperative.

b) if your UI change required a network request anyway (even if only for confirmation of success) then the performance is the same. but for minor UI state changes, you probably have a point.

@macdonst says that can lead to network request bloat when you need to make a chain of multiple requests to get some resource.

schizanon, to webdev

How do you build an infinite scroller with #HATEOAS?

#REST #http #html #javaScript #api #htmx

schizanon, to webdev

localStorage as the engine of application #state, am I right?

or is it session cookies as the engine of application state?

query strings? location bar? browser?

#webDev #javaScript #hateoas

schizanon, to webdev

Thinking about #htmx:

👍 all the #HTML gets generated on the server; the source of truth.

👎 every #DOM manipulation requires a network request.

👍 #declarative easier to reason about.

👎 app behavior declared in bespoke attribute DSL; harder to reason about.

👍 no need to duplicate #backend state on the #frontend.

👎 no offline support.

#webDev #web #webDevelopment #hypermedia #hateoas

jnv, to random
@jnv@mastodon.social avatar

HATEOAS

🤔

Hate OAS?

schizanon, to webdev

HTMX: when you want the difficulty of not using JavaScript without the benefits of not using JavaScript.

#webDev #htmx #javaScript #html #hypermedia #hateoas

schizanon, to webdev
paulox, to webdev
@paulox@fosstodon.org avatar

HTMX 1.9.7 has been released 🎉

htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext :picklerick:

https://github.com/bigskysoftware/htmx/releases/tag/v1.9.7

[

dusnm, to Meme
@dusnm@fosstodon.org avatar
changelog, to Podcast
@changelog@changelog.social avatar

"The only reason that Google works is because the web is built on the hypermedia principle.” – Kris Brandow

#rest #api #openweb #hypermedia #hateoas #podcast

🎥 https://youtu.be/2WMcZ7KYa34

schizanon, to javascript
schizanon, to webdev

HTMX is just the "back to the land" movement, but for web hippies.

#webDev #htmx #html #javaScript #web #frontend #reactjs #svelte #vue #vuejs #react #hypermedia #hateoas

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • InstantRegret
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • tacticalgear
  • ethstaker
  • modclub
  • cisconetworking
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • megavids
  • provamag3
  • normalnudes
  • Leos
  • lostlight
  • All magazines