Declarative partial updates

16 points by nemin 10 hours ago on lobsters | 3 comments

I thought this was related to the proposals by the HTMX people but it doesn’t seem to support requests triggered by user interactions.

[OP] nemin | 8 hours ago

Yes, they are similar at first glance, but actually serve different purposes.

The HTMX proposals, as far as I understand, are more about allowing interactivity without JS by enabling more elements to use more HTTP request types and dynamic partial replacements based on user input.

Meanwhile this seems to be more about streamlining streaming HTML for unblocking page renders while you're still waiting for data to load and also to allow automatically replacing parts of the DOM tree.

Neat stuff, but feels somewhat less generally useful than the Triptych project.

apetros | 2 hours ago

The Triptych Project is primarily focused on making the basic user interaction primitives more flexible: forms should have all the methods; buttons should be able to independently trigger requests; requests should be able to replace a specific part of the page. It's deliberately constrained to extending existing UX metaphors.

I think declarative page updates are cool and serve a complementary purpose. Rather than respond to client interactions, sometimes you need to let the server drive when and where things appear. The main use case highlighted here is out of order streaming (a.k.a. islands). There's totally a need for that and I'm excited to see Chrome work on a declarative way to do it.

Also, the third and final Triptych proposal should be out in a week or two. (source: I'm one of the authors)