9 ms·
I just find the way DOM/CSS does layout and styling to be completely convoluted and crazy compared to any desktop toolkit since 1990. Center anything either ver
by alkonaut 9y ago
I just find the way DOM/CSS does layout and styling to be completely convoluted and crazy compared to any desktop toolkit since 1990. Center anything either vertically or horizontally - that cannot require me to google and most importantly cannot have multiple different solutions. Simple things should not just have simple solutions, they should have one simple solution.
Memory-unsafe programs on the desktop should go the same way as the HTML layout model.
- marmart 9y agoGridbox and Flexbox largely make layouts sane again.
- giblaz 9y agoThis to both. However, the problem with the web is there are old implementations that must be maintained in browsers for backwards compatibility. The issue with this is that it increases the barrier to entry for web development because it's much harder for a new person to even know what options to gravitate to. Of course, there are books and guides to help people, but how would someone figure out which guides are worth it? There are a lot of highly rated books on the topic of web development and if you don't already know what you need, it can be daunting. But yes, flexbox is great.
- spynxic 9y agoFor the sake of creativity, suppose browsers were the wrong direction to take for web exploration. What do we do now? The same idea may be applied to an operating system's ability to allow a user to operate on their machine. Edit: It would be useful to consider why the need for a universal interface to the internet was originally sought out.
- azernik 9y agoThe old implementations are going away a lot faster than any greenfield environment can totally replace the browser.
- bayonetz 9y agoTrue but it's crazy that it took 20 years to get sane layout control.
- thecrazyone 9y agoWell _it is_ crazy. We can't trace an alternate history and work with that. We work with what we have. I think, here, we might looking at it with the wrong lens. I'm unable to find the right words to say this. Let me say this statement feels ungrateful. Web is the largest and fastest growing ecosystem of software we've right now (refer: community size, number of projects on github, say, in Javascipt, CSS, and other web technologies). You're comparing what is what should've been. By that measure, any human activity will fall short of not only yours but anybody's expectations. You'd think that getting sane layout control is easy, but apparently it's not. Getting a lot of humans to agree on a fast growing technology is hard (it seems like). PS: I'm not saying "nothing could've been better, be happy with what you have", not at all. I'm just saying this seems like complaining and a better approach is to try and make it better I needn't have written up a long tirade for such a simple statement. I see that this is the same sentiment that's espoused by several others in this thread, and thought I'd try and provide a different perspective to look at this with edit: formatting
- vinnymac 9y agoYour perspective is very interesting to me. It makes me think that as software gets better/easier to write, as web development has become lately, people want to question why it is becoming better/easier. I think this self-reflection we have all been doing on the web is what is causing people to post so many threads and articles with this being the topic.
- mike_hearn 9y agoSane layout control for apps was a solved problem 15 years ago (well, for some definition of sane). Look at toolkits like Swing, GTK2, Qt, heck even Cocoa has better layout control for apps than HTML. Flexbox is essentially an import of those concepts to CSS. There are no new ideas there. But now flip it around and try to make a beautiful, responsive document in Swing or GTK. The layout managers that make them so great for laying out UIs won't help you much there. They can do it, they have layout managers that operate somewhat like a CSS box flow, but it won't be as natural or as easy. So it's worth considering if it's easier to evolve HTML towards sane layout management for app-like things, or GUI toolkits towards sane layout management for document-like things.
- x0x0 9y agoI used vb6 20 years ago and have recently (quite unfortunately) had to learn html/js/css basics. The web is hot garbage for displaying form data compared to microsoft tools circa 1996.
- petra 9y agoThe web isn't the place to look for good tooling. Properiatery low-code tools built over the web are a better starting point.
- Udik 9y agoThe problem is that if you present an average web user with the interface you can design (quickly and efficiently) in VB6, they'll spit in your face. Much of the complexity of web design is not in the tools; it's in the fact that users don't expect a standard whatsoever, they just expect their UIs to be as slick and customly designed as magazines. If every website was written using the same standard, predefined set of widgets and components, the complexity would disappear.
- olmo 9y agoMost enterprise web apps use bootstrap, that is quite Standart. But they do it on top of react/angular/grunt/we pack and a zillion npm packages to choose and keep updated. Nothing of this was necessary to make VB6 applications.
- 9y ago
- yesimahuman 9y agoThe DOM is a tree UI data structure like any other UI system. CSS is certainly...unique, sure.
- rtpg 9y agoI've found that , once you build up the right set of components for yourself, you can easily get nice layouts that work on a variety of screens without much work. There sometimes ends up with edge cases, but overall it works well so long as you design things with the tooling on mind. Meanwhile I've struggled to get things looking well with GTK+ or Tcl/tk. Especially when the UI I'm trying to make is dynamic. The tooling has never seemed very condusive to "fit content"-style UIs
- 3131s 9y ago> Especially when the UI I'm trying to make is dynamic. That's where I still run into problems with CSS too. However, at some point, and not because I started using flexbox / grid, CSS did click for me and now it's mostly second nature to get the layout that I'm going for. My feeling on this whole topic is that while as a web developer I have often thought "there must be a simpler way", every time I actually start to imagine what that would look like I end up re-imagining something similar to the web stack as it is now. There is a lot of inherent complexity to GUI-based networked client-server applications that need to be responsive, continuously integrated, database-backed, real-time, etc.
- TheAceOfHearts 9y agoAs the other commenter said, flexbox and gridbox help alleviate many issues that used to be commonly raised a few years back. Check out Yoga [0]. It's a small layout engine based on flexbox and the CSS box moel. It doesn't cover all use-cases, but it's pretty powerful for its size. I It's important to remember that CSS and the DOM was initially created and developed with certain kinds of documents in mind. Both are certainly quirky and missing a lot of features, but I wouldn't say they're as bad as many people make it out to be. Based on my experience with native desktop toolkits, they're all quirky in one way or another. One of the biggest issues with modern CSS is that it doesn't have sensible defaults for web apps. Could you provide an example of your preferred approach to handling layout and styles, and talk a bit about what why you consider it superior? What key features do you consider missing from CSS and the web? [0] https://facebook.github.io/yoga/ https://facebook.github.io/yoga/
- jiggunjer 9y agoWhat bothers me is that I can't make rules with the same expressive power as a regex. Also css lacks properties for controlling wrapping limits and non-linear image scaling. And for some reason I always have to optimize on either width or height, I can't control both perfectly.
- TheAceOfHearts 9y agoI don't understand the first point, could you clarify? Do you mean you wish to define your own CSS properties? You may find it exciting to learn that there's ongoing work to enable this functionality and more through Houdini [0]. You can check out a few examples at this houdini-samples [1] repo. I'm unclear on what you mean by wrapping limits and non-linear image scaling. Could you provide an example of what you'd like to achieve? As for having to optimize for width or height. Have you looked into display: grid? I believe it may help enable the kind of layout you're interesting in achieving. [0] https://drafts.css-houdini.org https://drafts.css-houdini.org [1] https://github.com/GoogleChromeLabs/houdini-samples https://github.com/GoogleChromeLabs/houdini-samples
- RUG3Y 9y ago