by zackbrown · 2y ago · 0 comments
HTML & CSS themselves have become a major bottleneck to quality and creativity. The arcane layout model, the baggage of backwards compatibility, the cognitive dissonance — played out over decades of design-by-committee — between "this is a document engine" and "this is an app engine."
The rendering-thread-is-the-main-thread architecture of JS plus the JS garbage collector cause jitters & frame drops that most people don't consciously recognize, but everyone subconsciously recognizes. These little bits of jank are why consumers can recognize webview-wrapped apps vs. native apps.
Don't get me wrong — HTML and CSS and JS have brought us far, and the zero-trust execution environment that is the browser is an amazing feat of humanity.
I hope the "new ways of doing things" you describe include a major innovation on HTML and CSS and JS. WebAssembly makes this possible today — and I have dedicated the last few years of my life to proving this concept[0], and I hope others explore similar avenues. We deserve a better substrate, and this can be done without reinventing the browser.
[0] www.pax.dev
> There has never been a better markup language.
> It has been the best thing for accessibility we ever came up with.
I observe past tense in both sentences above.
So perhaps we agree, the salient question is: is it the best thing we can come up with? With a focus on the future.
I argue we can do better, while celebrating and building off of what's great about the past & present.[0]
[0] https://docs.pax.dev/intro-priorities-and-prior-art/#:~:text...
All other content representation infrastructures that weren't text first, like java applets or flash died because they were no match for HTML.
Silverlight sought to do this with XAML, but it had other problems (required a plugin right as plugins were on their way out; CLR was a huge dependency; too locked down and proprietary under Ballmer leadership)
Can you imagine a text-first content representation, which is visually editable with the UX of a vector design tool? This is the rabbit hole that drives our work on Pax.
That and, of course, the half-page box telling you how much better off you'd be if you were using the app.
Don't get me wrong, I also could imagine better markup languages for that purpose. But everything I have seen in the wild was worse in multiple, show-stopping ways.
Maybe instead of coming up with a new thing, we just need a clear way to solve the pain points and put the solutions into CSS4 and HTML6
For interactive interfaces, I think it's not very good.
This page speaks to a different approach (I'm the author) https://skinnyjames.codeberg.page/hokusai/concepts/layouting...
HTML/CSS is pretty good!
SwiftUI's HStack and VStack are solid, though they suffer from ambient API complexity & Conway's law.[0]
Figma's autolayout is a strong reference, but it's not a tool for creating software.
> Maybe instead of coming up with a new thing, we just need a clear way to solve the pain points and put the solutions into CSS4 and HTML6
Why not both? Innovate freely and independently (the prerogative of any builder) and adopt as spec any innovations that pass committee.
[0] arguably same diagnosis, different course of disease vs. HTML/CSS
None of these is a perfect technology, but I believe the most practical answer to the question driving this thread[0] is to study/understand the landscape, then build towards a better future.[1]
[0] > Care to point us to a better combination than HTML/CSS when it comes to layouting flexible interfaces?
[1] www.pax.dev
But actually, HTML and CSS is pretty good considering the problems is solves.
Agreed: pretty good. Shouldn't we pursue excellence?
Alternate layout engines for the web might be a fun experiment, PhD thesis, or talent retention program, but it's not practical.
Flexbox was once an "alternate layout engine for the web," as was Flash player, as is Figma. Framer, Retool, and Squarespace all offer alternate layout engines tailored for visual building. All of these seem practical to me.
It's one of the core things that has enabled the web to be as useful as it is. One of the things that draws people in, and keeps them using it.
Yes, there are problems with what we have. But if you break compatibility, you'll either not be adopted, or part of the crowd that the audience yells at for taking away their favourite things. You'll kill efforts and bury knowledge bases.
Taken to an extreme, "don't break backwards compatibility" has an insidious failure mode, which is "don't innovate." The car could not have come about without a willingness to break backwards compatibility with horse drawn carriages, plows, mills, hitching posts, etc.
The adoption of a radically new technology like this is voluntary, collaborative, and progressive. Provided it offers enough value to exceed the switching costs, there's no need to kill efforts or bury knowledge bases.
<Text>Hi {firstName} </Text>
and also requiring double the number brackets
There are modern cleaner markup alternatives like kdl
We predict 95%+ of Pax will be written by machines, especially visual design tools and LLMs, so verbosity becomes less important (LLMs may even benefit from explicit closing tags.) We're innovating on multiple axes, including language, so we chose to make the syntax itself as boring and uninnovative as possible.
Also, will it be read 95% of the time by machines during design? That's not what the demo shows with the side-by-side xml and output, which I expect is a much more common workflow than 5%
The innovating part is what puzzled me and prompted this question - why cling to the old garbage when you're doing new design?
Syntax is fairly contentious. "One man's trash is another man's treasure," on your note of "old garbage." It's hard to please everyone, however:
We could offer syntax "skins," since the data storage mechanism is a layer separated from the AST (thus different ASTs/syntaxes could de/serialize from the same persisted data.) So folks who want closing tags can have them; folks who want a YAML-like format could have it; folks who want a KDL-like language could have it.
At the language level, Pax's distinguishing characteristic is that it's the union of an expression language and a markup language; this is the reason we couldn't use an off the shelf markup language / parser. But again, KDL or YAML could be extended with PAXEL to make pax-kdl and pax-yaml flavors alongside pax-xml.
We had to start somewhere, and starting as close as possible to the markup lingua franca (HTML) made sense to us. It'd be a dream for Pax to be loved / adopted enough that we or anyone else cares to make a syntax skin.
Very powerful but also very limited languages and formats that know what their purpose is.
The difference between Webflow and Figma is immense; Pax unlocks a Figma-style visual creative experience while building software.
Unlike Flash: driven by a markup language, fully open source, no plugin required, solves a11y, compiles to native apps incl. mobile
Unlike Silverlight: fully open source, no plugin required, no heavy VM
Unlike JavaFX: no plugin required, no heavy VM, visual builder is a vector design tool
Unlike Flutter: designed for web (small footprint, a11y out of the box); first-party and foundationally integrated visual builder, visual builder is a vector design tool
Our solution requires language constraints — a hermetic separation of concerns between the declarative description language (.pax) and a Turing-complete programming language (starting with Rust.)
These language constraints and rendering requirements[0] are so core to our solution that building anywhere other than the systems level was not tenable.
[0] Specifically, the runtime must render in "design tool coordinates," to enable a vector design tool authoring UX. This authoring experience must also be extremely fast, like Figma's. The rendering engine must be designed around this requirement and neither HTML/CSS's or Flutter's were.