Using JavaFX as GUI Module

Hi, I’ve been using CUBA Platform and Studio for quite a time, and I really see this as super super helpful tool. So first of all, THANK YOU!

I’d like to share an idea that maybe will be useful to us all. As we know, Swing is way too old for GUI development. The better replacement for Swing is JavaFX, especially since Java 8, it’s already part of ORACLE JDK and ORACLE JRE. Also we can download OpenJFX for those who don’t want to use ORACLE JDK.

What do you think? Here’re some features that’ll improve CUBA if using JavaFX:

  • Use of .fxml
  • Easier for styling
  • Easier data binding
  • Easier customization
  • More modular (e.g. Include fxml file in fxml file)

I know maybe it’s a lot of work… But anyway, thank you for your hardwork!

Hi Yosi,

Thank you for your kind words about our product!

Regarding desktop client, let me ask you a question: what benefits do you see in the current Swing (or potential Java FX) client in comparison with the existing web client based on Vaadin?

What I see is that there is an opertunity to execute programs
on client computer and load documents in the native programs.
This is not possible through the browser.

Hi Konstantin,

Based on my experience, browsers still cannot do fully what native clients can do. Kjell already mentioned some examples. And another simple example is printing.

In POS for example, we need to integrate with receipt printer. And if using browser, cannot fully do it.

2 Likes

Okay, that makes sense of course. What if we provide a way to wrap our web UI (based on Vaadin) into a native desktop application using the Electron framework, so you will have API to all native functions?

3 Likes

That would be an good idea?
We will have benefits from both worlds.
How long would it take to implement this?

Currently I cannot give you any timeframes. Would be great if you create an idea here on the forum so we could collect more feedback on this feature from the community.

sounds interesting to me too

Interesting and interested

It is a fantastic idea, to have the best of both worlds and because there are still many applications that need to be developed for desktop, Electron is an excellent choice and position Cuba in the top with very few rivals.
Greetings.

In fact, we performed a small research on this approach for development of Desktop applications. You can find the results of this research here: GitHub - jreznot/electron-java-app: Electron Java application - What if you could build Desktop applications on Java with HTML 5 UI It is a small Java application on Vaadin that can be easily packed to Electron launcher, to one executable that combines embedded Jetty server, Vaadin UI and Electron shell.

Currently, we want to collect your thoughts on this approach and measure demand for such a Desktop-client applications. It would be great if you share a couple of your use cases so we can check if this approach is really suitable for your needs.

1 Like

I have some cases where I need to open docx, xlsx and other types of documents which is difficult to open in browsers. The best would be if there could be an opertunity to open documents and edit them in ex: Word and then recognice if the file was changed/saved and then upload the document to CUBA again. But I think that we also have to build a plugin for Office too to send the changed file back to CUBA.

1 Like

I’m interested in the Desktop side to work outlets and access control systems for payroll settlement. The particular thing of this is the integration that must be done with different devices such as: wallet drawer, web camera, fingerprint reader, weight or digital balance, card reader debit and credit, etc.
Another peculiarity is that the desktop environment can at some point work offline and therefore store information in local connectivity topics.

As I thought to solve ?, use JavaFX consuming application services developed with CUBA Framework

1 Like

I haven’t used electron at all. So I don’t know about it. But based on their idea and documentation, it seems very good idea to just put the web app into desktop framework.

Hello, we are a chain of supermarkets with many sales centers and many pos, we have an application in java that runs in these pos and we are planning to replace it, the fact is that we do not see clear the future of javafx. We have specific needs that are linked to hardware, control of: drawers, scanners, payment by credit cards, customer displays, touch screens, etc. In addition to all this we need massive update systems, since with each new release of the application there are Which update more than 500 posts and requires some automated system to do so, communication with work queues exchanging information online with the central servers, remote access to the screens of these Pos … really have a solution made on the web with the Advantages that we can provide and that can work on the desktop with local hardware there will be a world of possibilities for all this type of applications.
Greetings.

1 Like