Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Daz
Daz
@daz@floss.social  ·  activity timestamp 2 days ago

I've started writing up a coding guide for hypermedia-driven application architectures. #htmx
It's very much a work in progress. Some bits not started yet. But I'm quite happy with some of it...
https://hda.daz.is/architecture/why-hypermedia-driven-architecture/
More to come some!
#React is an obsolete tech and hopefully my guide, when done, will help people who want to switch to #HDA architecture from #spa
Hopefully the #Rust won't put people off.

Hypermedia-Driven Applications with Rust

Why Hypermedia-Driven Architecture

The architectural argument for building web applications where HTML is the API.
  • Copy link
  • Flag this post
  • Block
Strypey
Strypey
@strypey@mastodon.nzoss.nz  ·  activity timestamp yesterday

"HTML-embedded attributes (such as htmx’s hx-get, hx-post, hx-swap) drive dynamic behaviour. The developer declares what should happen in the markup rather than writing imperative JavaScript to manage requests, state, and DOM updates."

@daz

https://hda.daz.is/architecture/why-hypermedia-driven-architecture/

There's a lot here that's beyond my lay knowledge of how any of this works, but so much of your explanation feels intuitively *right*. This bit in particular, made me go "yes!".

@alcinnz

Hypermedia-Driven Applications with Rust

Why Hypermedia-Driven Architecture

The architectural argument for building web applications where HTML is the API.
  • Copy link
  • Flag this comment
  • Block
Strypey
Strypey
@strypey@mastodon.nzoss.nz  ·  activity timestamp yesterday

Also this, especially the last sentence, yes, yes, yes!

"The key mechanism is partial page replacement. When the user interacts with an element, the browser sends an HTTP request and receives an HTML fragment. That fragment replaces a targeted region of the DOM. The server controls what the user sees next, because the server produces the HTML. The client is a rendering engine, not an application runtime."

https://hda.daz.is/architecture/why-hypermedia-driven-architecture/

@daz @alcinnz

Hypermedia-Driven Applications with Rust

Why Hypermedia-Driven Architecture

The architectural argument for building web applications where HTML is the API.
  • Copy link
  • Flag this comment
  • Block
Strypey
Strypey
@strypey@mastodon.nzoss.nz  ·  activity timestamp yesterday

So @daz, do you think the HDA architecture could be used in a rewrite of fediverse.party?

https://codeberg.org/fediverse/fediparty/

I recently inherited stewardship responsibility, despite having only participated in the project as a researcher. So I don't really know how the guts of the site works. But I get the impression it has npm dependencies, which is something I want to avoid for all the reasons you list in the section on Supply Chain Attacks here;

https://hda.daz.is/architecture/spa-vs-hda/

@alcinnz

Hypermedia-Driven Applications with Rust

SPA vs HDA: A Side-by-Side Comparison

The same feature implemented in both architectures, with quantitative comparison.
Codeberg.org

fediparty

:milky_way: A quick look into Fediverse networks -
  • Copy link
  • Flag this comment
  • Block
Daz
Daz
@daz@floss.social  ·  activity timestamp yesterday

@strypey @alcinnz looks like a static site? all generated offline. Unless I missed some interactive/SPA features? I just looked quickly and saw the Hexo site generator.

  • Copy link
  • Flag this comment
  • Block
Strypey
Strypey
@strypey@mastodon.nzoss.nz  ·  activity timestamp 23 hours ago

@daz
> looks like a static site? all generated offline

Embarrassing to admit but true, I don't have the first clue.

> Unless I missed some interactive/SPA features?

There are some mildly interactive features, like the tickboxes here;

https://fediverse.party/en/miscellaneous/

and the FediQuiz;

https://14th.fediverse.party/

@alcinnz

  • Fediverse.Party - explore federated networks
Let's make social media free, federated and fun! Fediverse.Party is your guide into the world of decentralized, autonomous networks running on free open software on a myriad of servers across the world. No ads and no algorithms. Join Fediverse and become part of the new interconnected Web!
  • Copy link
  • Flag this comment
  • Block
Daz
Daz
@daz@floss.social  ·  activity timestamp 22 hours ago

@strypey @alcinnz
That's good...

Static site > HDA > SPA

Only add complexity when it can't be avoided.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct