Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jared White (ResistanceNet ✊)
Jared White (ResistanceNet ✊)
@jaredwhite@indieweb.social  ·  activity timestamp 15 hours ago

I wonder if any idea in frontend web development has been as ghastly terrible and resulting in the most awful UX losses of the past decade as:

UI = f(state)

🙄

  • Copy link
  • Flag this post
  • Block
Heribert Schütz
Heribert Schütz
@hcschuetz@mastodon.social replied  ·  activity timestamp 6 hours ago

State and UI

@jaredwhite wonders "if any idea in frontend web development has been as ghastly terrible and resulting in the most awful UX losses of the past decade as:

UI = f(state)"

https://indieweb.social/@jaredwhite/115925161669511741

This sounds like a rhetorical question to me. Nevertheless I'll try to give some answers in this thread.

#WebDevelopment #WebDev #UI #DOM #React #Flux #Redux

  • Copy link
  • Flag this comment
  • Block
Joeri Sebrechts
Joeri Sebrechts
@joeri_s@mstdn.social replied  ·  activity timestamp 12 hours ago

@jaredwhite
It is a leaky abstraction that inevitably gets people into trouble, because a usable web UI carries intrinsic state: route, focus, collapsed/expanded, cursor position, selection, scroll position, etc.

Those are also all the failure modes of “modern” web frontends, and that is not an accident.

  • Copy link
  • Flag this comment
  • Block
westbrook
westbrook
@westbrook@mastodon.social replied  ·  activity timestamp 15 hours ago

@jaredwhite Is UI not a function of state? If not, what is it?

  • Copy link
  • Flag this comment
  • Block
Ryan
Ryan
@ryan@hachyderm.io replied  ·  activity timestamp 15 hours ago

@jaredwhite I'm curious about alternative mental models.

For me it really clicked and matched how I thought about UIs intuitively. Many years later and I don't reach for React first anymore, but it's still how I approach UIs!

Is it because it falls apart at a certain size for you? Or is it because people take it farther than pragmatism?

  • Copy link
  • Flag this comment
  • Block
Jared White (ResistanceNet ✊)
Jared White (ResistanceNet ✊)
@jaredwhite@indieweb.social replied  ·  activity timestamp 15 hours ago

@ryan it's probably fine as a sort of shorthand as you're working through problems in an abstract way, but it's just not at all how the web actually works.

It's important to remember what DOM stands for: Document Object Model. It is a deserialized object graph (HTML being the serialized format). The "state" lives within the objects and in the relationships between those objects.

Web UI is therefore targeted, judicial manipulation of individual object states plus object graph relationships.

  • 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.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct