News for hackers. Stuff that matters.
Re:Web Browser Engineering by vbezhenar on Tuesday October 15, 2024 @10:08AM (#41848784)
This Babylonian tower will crumble one day.

Layout does not have to be so complex. There are dozens of GUI frameworks with simpler layout system. Those are enough for applications everyone uses.

Re:Web Browser Engineering by PaulDavisThe1st on Tuesday October 15, 2024 @11:56AM (#41849894)
Actually, almost every GUI toolkit's scheme for layout has issues, and none of them are perfect.

The ones that use absolute pixel positioning fail when using different resolution displays.

The ones that use box packing fail when you need to deal with different sized displays.

The ones that use constraint programming fail when you need to layout hundreds or thousands of widgets.

CSS-style layout has its own pros and cons, but there is no alternative to it that is clearly better under all circumstances. If you doing layout and want to be resolution-independent, function on everything from phones to giant displays and have thousands of things to layout, CSS is actually likely better than any alternative.

Re:Web Browser Engineering by peoplefromibiza on Wednesday October 16, 2024 @12:17PM (#41860899)
possibly, but videogames have been doing layout for ages without CSS and they can vary a lot from game to game while most desktop applications have basically the same 2-3 layouts: input and edit some text, fill in some form, display some data in a table, a tree or a chart
Re:Web Browser Engineering by psd1 on Wednesday October 16, 2024 @09:46PM (#41865670)
Games lay out one game.

Document readers lay out every possible document.

Re:Web Browser Engineering by peoplefromibiza on Thursday October 17, 2024 @03:41AM (#41867312)
> Document readers lay out every possible document.

you mean like vector graphic software, DTPs, word processors etc etc?

Flash did resolution independent graphics and layouts on the web back in the late '90s, we killed it - not without reasons - but we still haven't created a decent alternative to it

Re:Web Browser Engineering by PaulDavisThe1st on Thursday October 17, 2024 @10:16PM (#41875817)
DAWs (digital audio workstations)

Video editors.

Image editors.

Web browsers.

Circuit, interior and architectural design.

None of these are anything like your "most desktop applications".

Re:Web Browser Engineering by peoplefromibiza on Friday October 25, 2024 @03:00PM (#41948490)
Just to be clear: when you name niche desktop applications you are literally saying that they are not "most of them"

BTW all of those applications you mentioned use many of the same techniques video games use (for the same reason: custom layouts), existed long before the web and are doing just fine without CSS

Re:Web Browser Engineering by maxwell on Tuesday October 15, 2024 @12:16PM (#41850107)
Which do you recommend?
Re:Web Browser Engineering by vbezhenar on Thursday October 17, 2024 @08:24AM (#41868990)
I've used Java Swing, Cocoa, Qt, Android. They are pretty good and were enough to build any kind of complex UI that I needed. I'm not sure what's the best one in the world, but generally I've found most GUI layout managers pretty good.

Even basic tools like those which were found in old Delphi, with anchoring components to the parent side, were sufficient for many UI-s, although some tasks like internalisation could case some pain.

In the end my opinion is that there should be a balance between usability and ease of implementation. Especially for technologies which are supposed to have many implementations.

Re:Web Browser Engineering by msie on Tuesday October 15, 2024 @02:42PM (#41851738)
Pixel positioning is so nice! I remember how easy it was to layout UIs with VB.
Re:Web Browser Engineering by echoangle on Wednesday October 16, 2024 @07:17AM (#41857799)
How does that work when someone resizes a window? I'm genuinely asking because pixel positioning to me sounds like hardcoding positions. Do you have to manually code the reflow when the window becomes narrow for example?
Re:Web Browser Engineering by vbezhenar on Wednesday October 16, 2024 @08:51AM (#41858493)
Pixel positioning usually anchors to a specific side. Like you can anchor label to the right side and it'll move as expected. And you also need to specify minimum width/height to keep thing sane.

Although it works poorly with translations, so it's probably not the best approach, but certainly one of the simplest. If you don't need translations, it works surprisingly well. Basically all Delphi applications used it and there were used a lot in private companies.

Re:Web Browser Engineering by mardifoufs on Tuesday October 15, 2024 @06:58PM (#41853975)
And they all have massive issues, or just provide a worse version of CSS (QT's qss, for example, as it's just a less well documented, non standard and very sparsely talked about CSS implementation. Oh and it doesn't work for everything in QT)