This was originally a reply to a rant about the excessive complexity of webdev.

The complexity in webdev is mostly necessary to deal with Javascript and the browser APIs, coupled with the general difficulty of the task at hand, namely to let the user interact with amounts of data far beyond network capacity. The solution isn't to reject progress but to pick your libraries wisely and manage your complexity with tools like type safe languages, unit tests and good architecture.

When webdev was simple, it was normal to have the user redownload the whole page everytime you wanted to change something. It was also normal to have the server query the database everytime a new user requested the same page even though nothing could have changed. It was an inefficient sloppy mess that only passed because we had nothing better and because most webpages were built by amateurs.

Today webpages are built like actual programs, with executables downloaded from a static file server and variable data obtained through an API that's preferably stateless by design and has a clever stateful cache. Client side caches are programmable and invalidations can be delivered through any of three widely supported server-client message protocols. It's not to look smart, it's engineering. Although 5G gets a lot of media coverage, most mobile traffic still flows through slow and expensive connections to devices with tiny batteries, and the only reason our ever increasing traffic doesn't break everything is the insanely sophisticated infrastructure we designed to make things as efficient as humanly possible.

  • 1
    I've had a few comments where I'm like "that'd be a pretty good rant too".
  • 1
    Definitely an analysis that rings true for a lot of SaaS. However, let us not forget that 90% of websites are still just static pages without state mgmt or crappy Wordpress installs.

    And of the remaining 10% few leverage the full capacity of modern webtech. The example you give of partial reload, or not re-executing the same query, is still considered an "optimization" for which budget needs to be allocated in most projects I've worked on (even for higher profile companies)
  • 2
    So the part that nobody wants to hear. Web is crippled by the DOM. Specifically the letter D. Too much effort goes into contorting a document into an application. Then when the CSS fails the application is unusable. When the JS fails the application is unusable. Accessibility is terrible without a lot of tweaking. Every application needs those things.

    Layout and basic functionality for applications is stupid with current web standards. Good luck changing standards. Everything is hacks right now.
  • 0
    @irene CSS Grid and Flexbox, along with keyframes, 3d transforms and a bunch of other features, are all efforts to move away from the "document" analogy. By now if you can tolerate a 1% support margin you can use essentially the same if not more layout tools than most other GUI libraries. Soon layout and render worklets will also have decent platform support, 3 years from now they'll be within the 5% support margin. Today's web standards have very little to do with documents, and tomorrow's will be more featureful than any other GUI library to date.
  • 1
    @lbfalvy You can either reinvent or evolve a standard. Those are your paths. You seem to favor evolution.

    We have big companies talking about metaverses and that will require a lot of standardization. So why don’t we define an extensible 2D/3D standard that has objects reference global assets? The same paradigm can be used for page layouts as objects in a 3D space.

    It is kind of silly to have style, which is on literally every part of a page on the internet, as something totally detached from the objects that it styles. Then we have stylesheets reference a bunch of global assets like fonts and images. Which are imported on the page layout in a global area.
  • 0
    @irene I agree that the isolation of CSS is pointless and annoying, the semi-standard solution to this is CSS modules but they aren't popular enough that I could just publish a component with a CSS module and expect it to work with anyone else's config, like ES modules. I don't universally favour evolution as a prospect, but in hindsight the evolution of CSS was very successful.
  • 0
    @irene I don't think it is fair to say the document analogy no longer stands (cf my previous comment).
    It is semantically useful for average users and will continue to be the default.

    CSS provides way more flexibility and ease of use than its desktop GUI toolkit counterparts which also partly explains the rise of Electron apps despite the sometimes sluggish perf. Webpack allows Including external assets (lazily) from inside objects and plain JS does too (eg. new Audio, new Image)

    For the 1% apps that do need super-awesome graphics & perf tweaks in-browser WebGL, canvas & workers already do the trick.
  • 0
    @webketje “That’s just the way it is” is how we are going to be stuck with proprietary technologies for upcoming web experiences. The future is proprietary and embeddable. So I don’t think there is a chance to change the web standards but I do think they are falling far behind the initial intent of HTML and that the need an overhaul that goes beyond more bandaids.
  • 0
    @irene mind elaborating on your last comment? I don't quite get what you mean as first you seem to deplore that we will be stuck in proprietary tech, then affirm it will be the future?
    I suppose you're referring to webpack & electron in my prev comment? And don't you mean that web standards' scope have expanded far beyond (=have outgrown) instead of fallen behind the initial HTML doc concept?

    I agree the current specs are not optimal for some applications, my point is they are optimal for the lowest common denominator
  • 1
    @webketje Okay so about “denominators”. How does 3D AR and other things fit into the web? It doesn’t unless it is in a container on a web page. So the denominator we are using HTML/JS/CSS is not divisible. It isn’t the lowest common denominator it is a denominator that is too high to capture other experiences on the web. That was how we ended up with Flash and app stores.

    What we have now is a format that is too rigid so throughout the web history we use plugins. Companies are going to make their new metaverse plugins or apps that take the user outside the browser. There will be no standards. Why? Because the web standards can never fit that purpose. I don’t like it, it isn’t a good solution for open standards, but that is how it is because people are going to refuse to pursue better standards.
  • 0
    @irene thanks, I'm on the same page now. I didn't realize we were already at that point in time.
    Yeah when I said lowest common denominator I meant as in "from interactions that most or all people have to do on a device" (consulting info & filling forms).
    So should the web standards evolve to absorb eg advanced 3D rendering in a lower-level lang standard, or should web pages only serve as an entry-point, linking to say, a webgl:// URL (for illustration only) that transmits the request to a separate runtime (as app store links do?
Add Comment