It's about time the web got a decent layout system.
Every UI toolkit that I know of (wxWidgets, Tcl/Tk, Qt) has some form of layout mechanism (box layout, grid layout, etc), and they'd had it for years/decades.
On the web though, people have been hacking around this omission for ages with tables and assorted "grid" systems (pure css, bootstrap, etc).
The needs for layout management was there for as long as I can remember, and this isn't a particularly tough problem to solve (Tcl/Tk has had "pack" since the late 90s, IIRC).
Why the hell did it take so long for the web to come up with a decent layout mechanism?
Because Web browsers originally operated under a document-focused paradigm rather than an application-focused paradigm. (The CSS box model spec makes much more sense if you dig through it with this in mind.) Even after Javascript came out, there wasn't really a notion of a Web application in the modern sense- if you wanted to deliver rich content, the primary way to do it was via Flash or Java applets. I would hazard to say this was the case from around 1995 to 2005?
Anyways, I think the demand for more sophisticated layout systems didn't emerge in earnest until browsers started to experience the paradigm shift from "dynamic text document renderer" to "application runtime environment". If I had to put a date on it, I'd say that this happened during the 2005-2007 period, during which we saw the first big wave of Javascript libraries (including Prototype, jQuery, and MooTools), as well as the launch of the original iPhone _without_ Flash support.
As for the length of time it's taken to release Grid, it looks like W3C has at least been aware of the problem for quite some time- the first "Advanced Layout" Working Draft was published in 2005, but it looks like it didn't stabilize into the current Grid layout until about 2015.
> As for the length of time it's taken to release Grid, it looks like W3C has at least been aware of the problem for quite some time- the first "Advanced Layout" Working Draft was published in 2005, but it looks like it didn't stabilize into the current Grid layout until about 2015.
The current Grid layout is largely the same as that proposed by MS at the August 2010 F2F in Oslo.
Note that many of the early/mid-2000s specs essentially got paused while CSS 2.1 was finished (because it's hard to define new things clearly until you define the existing things clearly), and while waiting for more implementer interest.
The question is why it was deemed necessary to morph the document-centric Web into a Frankenplatform, and for what price. The complexity of CSS has already driven Opera (who once employed the original inventor of CSS) out of the business of producing a web renderer.
It’s a de facto platform driven by 3.5 billion users. No one “deemed” anything necessary, it just became. And it wasn’t for lack of trying, either (see Java, Adobe AIR, et. al.).
Web development is just starting to catch up to where we were fifteen years ago. Things like type safety, unit testing, and dependency management are still fairly new on the Javascript side of the house, and I'd argue that Maven is lightyears ahead of NPM or pack or gulp or whatever the fuck the kids are using these days.
The UI side is even worse. When you compare $todays_web_framework to QT or Swing, it's like dropping into some terrible alternate timeline where the size of a thing on-screen can only be divined by spraying the proper mixture of cattle bones and chicken entrails on a ouija board beneath a blood moon.
We intentionally moved from Qt to Electron for desktop app development. Electron apps look better generally and are far easier to maintain than Qt-based apps. CSS has its warts but it's very expressive these days. Don't even get me started on Swing versus React. A decent set of React components are more declarative, easier to maintain, and faster to develop with than Swing. You also have powerful testing tools in React like Jest snapshots and Enzyme, which allow you to inspect and test the output of your UI in ways that are not straightforward with Swing.
> I'd argue that Maven is lightyears ahead of NPM or pack or gulp or whatever the fuck the kids are using these days.
Would you? You think a build system that’s so pointlessly convoluted and verbose that you’re literally encouraged to resort to copy-pasting blocks of XML and using fucking Eclipse to accomplish even the most basic tasks is somehow superior to package.json or Gulpfile.js setups?
It is not, at least in 2017. Qt5 is great, specially with QrQuick, but you need to commit to C++ and that's a problem in itself. (No, the Python binding are unholy with restrictive license and poor docs)
Swing is on a whole other level of verbosity. For anything more complex, you actually need a GUI editor.
Need an actually good looking set of widgets or even simple customizations? You have way less options than what's available in CSS and have to resort to Graphics2d drawing.
> Why the hell did it take so long for the web to come up with a decent layout mechanism?
Because CSS wasn't originally intended to handle layout (got knows what was but there you are), the W3C was historically a bit of a shit-show (one would argue it still is) and had internal competitors to CSS (hello XSL-FO), then people finally accepted the inevitable but started with something which wasn't quite actually sufficient (flexbox) and still took multiple years to get it not-completely wrong, then there were multiple competing alternatives for whole-page layout (the XUL-derived Template Layout and Microsoft's Grid).
And so we reach 2018, having spent the last 20 years or so doing ad-hoc bits-and-pieces reinventions of half of DSSSL. But it doesn't use S-Expression so I guess that's great.
Well, some specs have been around for a while, but nobody implemented em. For example, I think the first version of flexbox was being proposed at least 10 years ago, but it took a few years for it to get picked up.
If I recall correctly, the initial grid spec was supported by IE10 and IE11, and those were released quite a while ago.
Making big changes on the web is difficult because it requires multiple independent parties to agree and it cannot break backwards compatibility. So you need to define how it all interacts with all the legacy stuff and additionally consider how things will evolve.
Another issue is that CSS has many poor defaults for applications, so developers end up fighting it often.
There's ongoing work to make things better in the future by allowing you polyfill things. Check out the Houdini spec stuff, which lets you define custom styles, layout, etc.
Every UI toolkit that I know of (wxWidgets, Tcl/Tk, Qt) has some form of layout mechanism (box layout, grid layout, etc), and they'd had it for years/decades.
On the web though, people have been hacking around this omission for ages with tables and assorted "grid" systems (pure css, bootstrap, etc).
The needs for layout management was there for as long as I can remember, and this isn't a particularly tough problem to solve (Tcl/Tk has had "pack" since the late 90s, IIRC).
Why the hell did it take so long for the web to come up with a decent layout mechanism?