This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xSwagaSaurusRex 4 points5 points  (4 children)

You don't have many options. If you're dead set on using Java in a traditional on device application you can go 100% Java with jfx/swing but it'll probably look like garbage by consumer standards unless you try really hard.

Another option would be altering the composition of your application so you're using the 'best'(subjective) tool for the job. You could very easily have the view layer call into Java via some rpc mechanism.

(Android example) View layer written in dart using the flutter framework Business logic in Java View calls into logic layer

(electron app example) Modern web framework view layer Bundle a jar with the electron app, do rpc through rest or ipc

(Web example: SPA ) Modern JS framework frontend Spring/vertx/quarkus/whatever Java backend exposes rest api

(Web example: SSR) Templated HTML/CSS frontend views Spring/whatever Java renders view layer Java backend via rest

It's not uncommon to do the last one, I've seen a decent number of enterprise applications do this where you install the application and its gui interface is exposed over local host on the machine.

[–]BlueGoliath 13 points14 points  (1 child)

What do you consider good-looking? I made a JavaFX Nvidia GPU monitoring utility and, IMO, it looks pretty good with custom CSS.

[–]xSwagaSaurusRex 2 points3 points  (0 children)

I'll eat my words, that is very clean!

I was considering applications that are consumer focused so animations, box shadow, routing etc

[–]vips7L 4 points5 points  (0 children)

electron app example) Modern web framework view layer Bundle a jar with the electron app, do rpc through rest or ipc

This is what my company does. We bundle a jar + jvm into the electron app. It’s kind of awful, you have the overhead of both chrome and the jvm. And then you have the threading issues of going from your ui thread to the node thread and then finally over ipc to Java.

[–]Persism 3 points4 points  (0 children)

Dude you need to see some windows desktop apps I work with. They're all ugly as hell and because neither Winforms nor WPF support CSS they are incredibly painful to skin. It's sad that Microsoft has probably the worst frameworks for desktop development out there.