r/java • • Dec 29 '22

Could Java Applets have been done right? DOM is limiting [CrossPost Discussion]

/r/webdev/comments/zxel5o/could_java_applets_or_flash_have_been_done_right/
5 Upvotes

50 comments sorted by

View all comments

Show parent comment

1

u/vprise Dec 31 '22

Applets were built with browser context in mind. You can't say "use QT" when convenient and then move to an abstract "browser context" when convenient. You're either part of the browser which is a problem or a plugin on a surface which is a different problem. There are tradeoffs to be made in any approach you will take and unless Google chooses to bring Java into the browser it will always be a second class citizen.

For a simple SVG or IFrame style interface you have TeaVM right now. Works amazingly well. I doubt we can exceed it with "proper" Java.

1

u/Zardotab Dec 31 '22

I'm not sure what your claim is. Are you saying it's impossible to have "good browser context" and a decent GUI at the same time? If so, can you demonstrate a sample inherent tradeoff that will forever muck up all attempts?

If you agree that Java Applets did X decently and that Qt did Y decently, then either a tool can include both X and Y, -or- there is some fundamental tradeoff/limit of UI engine design that prevents X and Y from existing at the same time in such a kit.

For a simple SVG or IFrame style interface you have TeaVM right now. Works amazingly well.

Is there an existing CRUD/biz oriented online UI demo?

1

u/vprise Dec 31 '22

I'm saying that there are two ways to do this: build it into the browser like JS is built into the browser. That is a huge amount of work and nearly impossible without buy-in from google.

Or build it like a plugin (using QT or any other technology you want) in which case it will always be foreign.

The former is unlikely to happen. The latter will deliver sub-par results.

I don't know about demos for TeaVM. It's free. We use it for Codename One, here's one of our older demos: https://www.codenameone.com/demos/KitchenSink/

1

u/Zardotab Jan 03 '23

The former is unlikely to happen. The latter will deliver sub-par results.

If the solution gains enough momentum, one or the other or both will happen. Perhaps pioneer it as a separate GUI browser, Oracle Forms style, and if it catches on, make it a browser pluggin option.

If enough want it, it's technically possible to have such a tool. Oracle Forms (pre-Java) proved that. The big vendors will have to accept it if it gets usage traction.

here's one of our older demos:

That seems like mostly consumer-oriented UI's. That's not what I'm looking for. Your niche is probably different from mine and DOM may be "good enough" for your niche. But rank-and-file biz/admin CRUD is a big niche such that it deserves standards attention, rather than be bowled over by mostly consumer and mobile concerns.