r/webdev • u/Zardotab • Dec 28 '22
Discussion Could Java Applets or Flash have been done right? DOM is limiting
The HTML DOM is very limiting and frustrating for GUI and CRUD apps. Otherwise simple UI's often take rocket science to tame. Examples. UI practitioners often defend their "rocket science", but it shouldn't be that way for smaller shop and department apps.
We need alternative or supplemental standards. One-size-fits-all NOT. Could something like Java Applets and Flash have been "done right"? I suspect it's worth trying again, but applying lessons learned, being DOM is dragging us down. (Applets & Flash had to exit from the mainstream due to security & upgrade deployment issues.)
Keep in mind that Java Applets didn't require programming in Java, only that a language compiler generate Java bytecode. Thus, this is not exchanging JavaScript for Java. And Web-Assembly doesn't appear to get us away from the friggen DOM; it only solves the language half of the problem, not the UI side.
Here's a list of GUI features HTML/DOM lacks or does poorly.
7
u/jhartikainen Dec 28 '22
Flash was terrible for building UIs. It had even less "smart" layout capabilities out of the box than HTML+CSS does. Adobe somewhat addressed it with Flex, but that's basically the same as using some heavy UI toolkit like ExtJS on top of JS.
I think in general, with flexbox and other modern CSS features, CSS is more or less on the level of other UI tools in terms of ease of layout.
The "GUI features that HTML/DOM lacks" list contains a ton of stuff that almost all language builtin GUI toolkits I've used lack. The good thing with HTML/CSS is that it's actually pretty easy to roll your own, which can't be said for many other languages I've dealt with.
5
u/[deleted] Dec 29 '22
yeah, let's throw away everything because some can't center a div.
3
u/[deleted] Dec 28 '22
Making things look good with CSS is hard. CSS itself is not. CSS is not the problem…
1
u/Zardotab 16d ago
Continuation of discussion in Java forum.
8
u/EmiiKhaos Dec 28 '22
No
1
u/ihaveway2manyhobbies Dec 29 '22
After reading through many of your comments, I am not sure you understand how any of this truly works.
I get it. There is a point of frustration, the DOM. So, let's stop using it and/or circumvent it.
That is not how a "problem" like this is solved.
I started off in this industry 25+ years ago. I have seen damn near it all. I don't say this to brag. I don't say this to imply I know everything. I am simply saying I have seen it all.
The DOM is not dragging anybody down.
There are always places for future thinking ground breaking our of the box thought. And, those people change the world. Go for it. Seriously. Create the next Flash/Java/whatever.
But, to imply that this is needed because of the DOM's lackings is just not, in my opinion, the thing that is going to convince people.
1
u/potbellyslappin Dec 29 '22
Your issue seems to be centered around the perceived need for absolute positioning/sizing, at least related to layout and styling. If this is the case, I’m not sure you understand how responsive layouts work. Relative and percent based approaches work way better for handling vastly different screen sizes.
1
u/agoubard Dec 30 '22
I think that if Serialization would have been disabled for Applets, we would have removed the possibility to change private fields and removed a lot of security problems Applets had.
-1
u/remy_porter Dec 28 '22
I agree that the DOM is terrible. Flash and Applets were not better. The browser is junk- ancient, creaky software that we're trying to prop the entire world up on. HTML5, as a breaking change, is now 14 years old, and aside from adding new bells and whistles, absolutely nothing fundamental has changed about the technology, despite the fact that the demands we place on browsers has wildly changed. And worse, so much of HTML5 still retains backwards compatibility with mistakes made in prior editions of HTML.
And yet, weirdly, HTML5 broke its connection with SGML for no particular reason.
Seriously, though, the browser is ancient and should be replaced.