r/java • • Mar 12 '19

Announcing: JavaFX 12

https://gluonhq.com/announcing-javafx-12/
99 Upvotes

27 comments sorted by

8

u/Taobitz Mar 12 '19

I’m going to show my ignorance here, but would you only use JavaFX be for thick clients?

Spring/DropWizard etc seem the dominant choice for web layer.

I’ve never needed to learn it if I’m honest, hence I’m curious where it best fits.

6

u/[deleted] Mar 13 '19

What do you use for you day to day work? Web apps or desktop? Desktop apps are usually faster and nicer to use. Web apps are easier for dev/IT to deploy manage. But for user experience, it is hard to beat desktop.

2

u/vplatt Mar 13 '19

Full confession: I've used Swing and FX only a little bit. What would you see as its features vs. the typical web app today?

I've done a fair bit of desktop development. I'm not an expert per se. But it seems like web apps have caught up in almost all respects, except probably performance. When you consider most architectures today contain a REST layer, there doesn't seem to be much point to a desktop client of any flavor.

What advantages do "rich client" or desktop as it is known today, present from your point of view? I ask only as someone who wanted to remain with desktop development, but could not simply because of market natural selection. TIA.

4

u/[deleted] Mar 13 '19

Performance :-)

1

u/vplatt Mar 13 '19

I can't argue with that. But with the major web stacks eventually moving to wasm, that probably won't be as big an advantage in the future.

0

u/[deleted] Mar 14 '19

[deleted]

1

u/vplatt Mar 15 '19

It's highly debatable whether those will be in the hands of the average person within any foreseeable time period. Arguing that the major web stacks will all eventually move to wasm is enough of a leap for me at the moment.

3

u/LouGarret76 Mar 15 '19

My experience is that Desktop apps are cheaper to develop and deploy as they requires no servers, this no in house infrastructure team or cloud.

In big companies. Any webapp quickly become a long project involving tems around the word, ie Devs, Infra, Securiy, Business ... And you can spend months, sometimes years discussing the proper way to do things before writing the first line of codes. The time you reach your minimum viable product is usually long.

Whereas desktop apps is suited for small user base applications that will be used locally or on an intranet. The devs teams are closer to the business and the project is more agile, you reach a minimum viable product quicker. And you focus on delivering value quickly.

3

u/vplatt Mar 15 '19 edited Mar 20 '19

That's been my experience as well.

Part of the reason for that is that many (most?) desktop apps are acknowledged to be in-house line of business apps only. They know there aren't going to be many hundreds or thousands of users. The other reason usually depends on the organization having a mature rollout and update strategy for these applications. Without that, a smooth desktop rollout experience is very difficult. And while, that may not require near the overhead that you mention around a web app that's exposed externally, it's still not free.

The other reason web apps are comparatively expensive is simply because they have to be if they are exposed externally. You cannot simply leave endpoints out on publicly available networks without extensive work to ensure security, reliability, etc.

That's enough said about that, but what I often find with organizations I've been in is that they often have made an app into a web app, and it doesn't need to be publicly available, and it doesn't need to have a huge install base. In other words, the two best reasons to make an app for the web aren't there. Then they go about taking all the usual pains to secure the app, make it scalable, etc. and it's still just a LOB app!

There is a definite cargo cult culture out there among application architects who don't actually want to make the hard calls and have multiple technologies in their toolbelt. They would rather that all applications be web applications simply because they don't want to think about it, want to take glory for these supposedly huge external web apps they've designed, and they really don't seem to care about all the extra expense they incur in doing that. In the meantime, they leave huge holes in the functionality of the web apps relative to the precision, control, and speed that an actual rich client experience could deliver.

1

u/LouGarret76 Mar 16 '19

I have seen a fair share of those web apps. They tend not to survive long either and sometimes are even dead before going to production as the user needs have evolved quite drastically during the 1,5+year the project has been going on.

3

u/DuncanIdahos7thClone Mar 15 '19

Try label printing in a web app. Not doable unless you want the user suffer through print dialogs over and over. The web still has no printing api that can avoid the dialogs and notify when a print hits the print queue.

3

u/vplatt Mar 15 '19 edited Mar 15 '19

Awesome example! Yes, I had forgotten about this niche, but I've bumped up against it several times for check printing, label printing to paper, and label printing to etching machines. Barcode reading isn't too bad to integrate into a web app these days though.

And yes, let's not forget queue control either. Just ensuring that the app has sent the job to the correct type of printer if that's a requirement can also be quite problematic from a web app. Or at the very least, it would require several layers of architecture that a typical rich client app simply wouldn't need. The web app would need an API to a printer control server or cluster, those would need to present a queue API, printer selection API by features, and then there needs to be security on those, etc. A rich client app could simply query the installed printers by name, feature, etc. and then take the user's request from there.

There's many other scenarios like this that are simply more complicated and expensive to implement with web architectures.

2

u/DuncanIdahos7thClone Mar 15 '19

It's not a niche really. A lot of business apps need to be able to print. Now you can use server-side printing but that fails with label printers as many don't have network support. There's also no way to query for the list of printers the user has access to.

1

u/vplatt Mar 15 '19

Yeah, the server-side printing is tricky. That layer would typically need metadata management of its own around the printers that would support the queries the printers themselves do not. Legacy or dumb printers would need to have that metadata entered by a human in order to be usable, and some of them can support the metadata queries, but typically only for certain brands.

11

u/sporff Mar 12 '19

I think so. Where i work, we have at least 2 large scale projects using JavaFX which are used as a UI to operate machines we build.

It's one of the better desktop UIs I've used.

48

u/rotharius Mar 12 '19

Development of JavaFX 13 is already in full swing

Wait, what? ;)

11

u/Chaoslab Mar 12 '19

/slowgolfclap

9

u/RotaryJihad Mar 12 '19

This makes me very happy! https://bugs.openjdk.java.net/browse/JDK-8211304 was effecting a free (but not open source) tool my team uses. This release should make it easier for the upstream maintainers to update their dependencies and solve the issue.

8

u/[deleted] Mar 12 '19

Is there a technical reason there's no build for 64-bit ARM processors? None of the ARM linux distros I've looked at have it. It seems like AWS a1 instances make build infrastructure a non-issue.

2

u/johan_vos Mar 19 '19

Interesting question. If ARM64 is growing on desktop, it is definitely something we have to look at for building.

1

u/[deleted] Mar 19 '19

Build docs seem out of date, but in them I see,

Gradle automatically handles the downloading of all dependencies (such as Antlr and SWT located under \rt\build\libs)

Do you know how it downloads SWT? Fedora has latest Eclipse packaged on aarch64, so there must be an SWT package in there somewhere... Beyond SWT, are there any other native bits?

I am considering a Dockerfile OpenJFX build starting from Fedora so a) build instructions are extremely easy, and b) producing ARM builds is as easy as rerunning the container build on different machines. Maybe the OpenJFX team could take it and run them on AWS A1 instances at that point for official distribution.

Alternately, it seems someone managed to get a working build for ARMv7.

2

u/johan_vos Mar 20 '19

We have builds for ARMv6hf: https://gluonhq.com/products/javafx/

If there are changes needed to build on ARMv8, it would be great to create a PR at https://github.com/javafxports/openjdk-jfx so we can merge them. Basically, it probably starts with copying buildSrc/armv6hf.gradle into an armv8 specific file and make some changes. But I don't expect many changes.

2

u/iqgoldmine Mar 12 '19

what are the major differences?

8

u/deepthought-64 Mar 12 '19

I guess the most noted change is the version number :)

I quickly looked over the changelog [here] and found nothing earth-moving.

Edit:Fiddled around with the link

1

u/openlowcode May 20 '19

I really appreciate your efforts. I am currently developing a framework making use of javafx, what I need is a stable framework that looks nice, is fast, and allows spreadsheet-like ergonomics. I think javafx is not far from there, and I am really looking forward at the improvements. Especially, I have been struggling with the tableview.

1

u/LouGarret76 Jun 02 '19

Have you check spreadsheetView from controlsfx