← Back to context

Comment by Devilspawn6666

3 days ago

In a non-interactive case, what is supposed to be reading a response and deciding which links to do some something with or what to do with them?

Let's say you've got a non-interactive program to get daily market close prices. A response returns a link labelled "foobarxyz", which is completely different to what the API returned yesterday and the day before.

How is your program supposed to magically know what to do? (without your input/interaction)

Why does "your program" need to know anything? The whole point of hypermedia is that there isn't any "program" other than the web browser that agnostically renders whatever html it receives. If the (backend) "program" development team decides that a foobarxyz link should be returned, then that's what is correct.

I suspect that your misunderstanding is because you're still looking at REST as a crud api, rather than what it actually is. That was the point of this article, though it was too technical.

https://htmx.org/essays is a good introduction to these things

  • > Why doesn't fielding's conception make sense for non-interactive clients?

    > Why does "your program" need to know anything? The whole point of hypermedia is that there isn't any "program" other than the web browser that agnostically renders whatever html it receives.

    Seems like you're contradicting yourself here.

    If a non-interactive client isn't supposed to know anything and just "render" whatever it gets back, how can it perform useful work on the result?

    If it can't, in which sense does REST still make sense for non-interactive clients?