The modern web is an amazing piece of technology. It is a platform for connecting people and technology in a way few imagined. This would never have happened by attempting to design it all up-front. As an industry, we have really started to care about the design of applications: from the implementation to the user’s experience. This is genuinely great, and I’m proud to use this tech to build apps. I’m also excited at the efforts of really smart people to improve this world. But as I’ve mentioned, I think the current stack is an abomination. Especially for people who are not programmers, and never will be.
HTML is mostly pretty good. It’s a reasonably straight-forward way of describing the structure of your user interface. It’s designed to focus on meaning, and be entirely declarative. There is something of a bizarre modern obsession with continuing to make HTML easy for humans to write, over making it easy for computers to read, but that’s minor. It’s biggest failing is that it’s not self-extensible: in HTML I can’t create a new HTML element, define how this is produced from other HTML elements and then go ahead and use my new element. In a normal programming language this is the sort of abstraction that you’d get from a function.
CSS is the worst of the lot. The underlying model is confused, so confused that it took over a decade for browser implementations to converge. But the language itself is horrifically lacking in basic features: there’s no abstraction, no expressions, no variables. Everything must be pre-computed before it can be inserted into CSS, and CSS itself has no way to avoid repetition. Of course, there’s a plethora of languages to make writing CSS easier: SASS and Less are probably the most popular.
My background is in R&D and using computer science to build complex products. I only made my way into web applications and web design through the course of my career. Given my background, I know that the computer screen is just a field of pixels of almost infinite possible colours, that the maths to produce beautiful graphics is very well understood and highly optimizable, and that modern graphics hardware is amazing in its power. Over the years I’ve frequently been shown beautiful web designs with “Look at this beautiful web page we built!” While they have been beautiful, my reaction has always been “so what?” It’s readable, usable and even pretty but it’s not art, so what do I care — graphics are a solved problem. Eventually I figured it out: there was a missing “despite CSS.”
And these three horrible languages have radically different syntaxes that you’ll need to learn. And there’s no easy way to embed one within any of the others. And for anything but the most trivial of apps you’ll need at least three different files. And that’s going to make it hard to share with anyone else. And you’ll inevitably find something goes wrong when you try to host what you’ve built on the web where someone other than yourself can see it.
And all this without even talking about getting it to work with any kind of back-end.
There must be a better way.