How to integrate Java FX and Spring MVC


I want to use JavaFx as the front-end in my web application. My question is that you can associate a model object with a form developed using Java Fx.
I ask you to inquire about this. Please let me know if you need more clarification regarding this.

+6
source share
2 answers

The main differences between web interfaces (for example, Spring MVC) and rich clients (and such RIAs as JavaFX) are that for web interfaces server logic works in one JVM as a web framework, while for rich clients, server logic and the client runs on two separate JVMs, one on the server machine and one on the client machine.

Rich clients are usually downloaded / installed completely before the user can launch it, and for web interfaces, each HTML page may be dynamically created first and then sent to the user as needed.

Since the user usually already has a full rich client from the very beginning, only the actual data (DTO) is sent back and forth using some remote service, such as web services.

Thus, this means that the JavaFX client cannot access server objects (for example, attached JPA objects). You need to wrap the data and send it to the JavaFX client using a service (see Service Facade and DTO Templates).

+3
source

The main difference between JAVAFX and any Java EE framework is the same as the difference between swing applications and Java EE applications.

You can design applications using JAVAFX for direct use on the desktop or for deployment as browser applets using the Java browser plug-in. But it is impossible to use it as a basis for developing the Java EE application interface.

Read this post:

https://www.java.net//node/674176

+3
source

Source: https://habr.com/ru/post/916762/


All Articles