JavaFx 离线能力?

发布于 2024-08-03 16:08:09 字数 281 浏览 3 评论 0原文

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

这个想法是,用户可以使用上网本在有或没有互联网连接的情况下使用该应用程序。通过互联网连接,用户可以通过Web服务与服务器交互。如果没有互联网连接,数据和交易将存储在客户端上,并在连接再次建立后同步。

有人向我指出 JavaFX。在阅读了一些规范和教程后,我发现其中大部分都专注于 UI 构建。所以我不太清楚它如何处理离线存储和同步?有人对此了解更多吗?

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

Recently we are looking for the possibility to use JavaFX as an offline RIA client.

The idea is that user can use the netbook to work on the app with or without internet connection. With internet connection, user can interact with server through web services. Without internet connection, data and transaction will be stored on client and sync once connection is up again.

Someone point me to JavaFX. After reading some spec and tutorials, I found that most of them is focusing on UI-building. So I don't quite actually know how it can handle offline storage and synchronization? Any one know more about this?

Actually the requirement makes me think of Google Gears rather than JavaFX.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

澉约 2024-08-10 16:08:09

JavaFx 是一组构建在 Java 之上的技术。

JavaFx 的目标是让用 Java 构建 RIA/桌面 GUI 应用程序变得更加简单。

此外,JavaFX 还原生支持调用 REST 服务以及解析 XML 或 JSON。它也可以调用 SOAP,尽管在 RIA 中 REST 更可能。

还因为 RIA 中的 JavaFX 可以作为 Java 小程序运行。运行 JavaFX 的较新 JVM 比原始 Java 小程序更快、更稳定,而原始 Java 小程序给 Java UI 留下了不好的印象。现在还可以将小程序从浏览器拖动到用户桌面。

而且由于您的 JavaFX 应用程序作为小程序运行 - “离线”存储问题要简单得多。如果您确实只想对已检索但失去连接的数据进行操作 - 数据将保存在常驻内存中。或者,如果您需要实际将其存储到本地存储,则可以使用 Java 支持的任何数据源。

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.

对不⑦ 2024-08-10 16:08:09

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

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

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

JavaFX is perfect for an offline rich application.

I'm guessing you want to hear about the javafx.io.Storage and javafx.io.Resource which allow you to store application data offline, even without that security dialog because Java will store the data in a secure sandbox. You can check out the javafxdoc on this here

Mark is right that you can also use any other Java-based method to store data locally on client machines.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文