Window Shopping Marko JS
While I'm window-shopping open-source software like Godot Game Engine, I might as well jot down a few notes in another open-source package. Marko is a web app framework for building user interfaces. Many web development frameworks are free open source so, unlike Godot, that wasn't why Marko got on my radar.
The starting point was this Mastodon post boosted by someone on my follow list, linking to an article "Why not React?" explaining how React (another client-side web development framework) was built to solve certain problems but solved them in a way that made it very hard to build a high performance React application.
The author asserted that React was built so teams at Facebook can work together to ship features, isolating each team from the implementation details of components created by other teams. This was an important feature for Facebook, because it also meant teams are isolated from each other's organizational drama. However, such isolation meant many levels of runtime indirection that takes time every time some little event happens.
There was also a brief mention of Angular, the web framework I've occasionally put time into learning. And here the author asserted that Angular was built so Google can build large-scale desktop applications that run in a web browser. Born into a world where code lives and runs in an always-open browser tab on a desktop computer, Angular grew up in an environment of high bandwidth and plentiful processing power. Then Google realized more of the world's internet access are done from phones than from desktop computers, and Angular doesn't work as well in such environments of limited bandwidth and processing power.
What's the solution? The author is a proponent of streamed HTML, a feature so obscure that it doesn't even get called a consistent name. The underlying browser support has existed for most of the history of browsers, yet it hasn't been commonly used. Perhaps (this is my guess) the fact it is so old made it hard to stand out in the "oh new shiny!" nature of web evolution and the ADHD behavior it forces on web developers. It also breaks the common path pattern for many popular web frameworks, roughly analogous to Unity DOTS or entity component systems.
What's the solution? Use a framework that supports streamed HTML at its core. Marko was originally developed by eBay to help make browsing auctions fast and responsive. While it has evolved from there (here's a history of Marko up to the publishing date in 2017) it has maintained that focus on keeping things responsive for users. One of the more recent evolutions is allowing Progressive Web Apps (PWA) to be built with Marko.
It all sounds very good, but Marko is incompatible with one of my usage scenarios. Marko's magic comes from server-side and client-side runtime components working together. They minimize the computational requirements on the client browser (friendlier to phones) and also to minimize the amount of data transmitted (friendlier to data plans.) However, this also means Marko is not compatible with static web servers where there is no server-side computation at all. (Well, not impossible. But if Marko is built for static serving, it loses much of its advantages.) This means when I build a web app to be served from an ESP32, Marko might not be the best option. Marko grew up in an environment where the server-side resources (of eBay) is vastly greater than whatever is on the client. When I'm serving from an ESP32, the situation is reversed: the phone browser has more memory, storage, and computing power.
I'm going to keep Marko on my mind if I ever build a web app that can take benefit from Marko's advantages, but from this cursory glance I already know it won't be the right hammer for every nail. As opposed to today's web browsers, which try to do it all and hence have grown to become Swiss Army Knife of software packed with capabilities like PDF document viewers.