3

最近我们正在寻找将 JavaFX 用作离线 RIA 客户端的可能性。

这个想法是用户可以在有或没有互联网连接的情况下使用上网本在应用程序上工作。通过互联网连接,用户可以通过网络服务与服务器交互。在没有互联网连接的情况下,数据和交易将存储在客户端上,并在连接再次启动时同步。

有人指点我JavaFX。在阅读了一些规范和教程后,我发现他们中的大多数都专注于 UI 构建。所以我不太清楚它如何处理离线存储和同步?有人知道更多吗?

实际上,这个要求让我想到了 Google Gears 而不是 JavaFX。

4

2 回答 2

3

JavaFx is a set of technologies built on-top of Java.

The goal of JavaFx is to make it simpler to build RIA/Desktop GUI applications in Java.

Additionally JavaFX has native support for calling REST services and parsing XML or JSON. It can also call SOAP though REST is more likely in RIA.

Also because JavaFX in a RIA can be run as a Java applet. The newer JVM that run JavaFX are much faster and stable than the original Java applets that gave Java UI such a bad impression. Also an applet can now be dragged from the browser to the user desktop.

And because your JavaFX application is running as an applet - the "offline" storage problem is much simpler. If you really just want to do operations on data already retrieved but have lost a connection - the data is kept in resident memory. Or if you need to actually store it to local storage, you can use any data source supported by Java.

于 2009-08-27T12:26:30.133 回答
1

JavaFX 非常适合离线丰富的应用程序。

我猜你想知道 javafx.io.Storage 和 javafx.io.Resource 允许你离线存储应用程序数据,即使没有安全对话框,因为 Java 会将数据存储在一个安全的沙箱中。你可以在这里查看 javafxdoc

马克是对的,您还可以使用任何其他基于 Java 的方法在客户端计算机上本地存储数据。

于 2009-09-01T00:06:26.670 回答