views:

538

answers:

2

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.

+1  A: 

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.

Mark Wilcox
A: 

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.

Eric Wendelin