質問

One of my friend asking me something related to Client Software and Cloud. Java Desktop Swing as Client and Web as Data Resource (Database -1 single hosting). That's the main thing I've heard.

If there's a common java app used as a client how do the app communicate to the data resource (on the web)...?

I answered with "passing database Query", Database Query from Client to Web (Data Resource). But, after I recalled it back, my method is dangerous. What is the safer thing to be done? Is it needed to create another app on the Web used as a bridge (API)?

Need advice on this matter.

役に立ちましたか?

解決

One way to implement this will be to have REST based API at the backend and your swing GUI interacting with that API using HTTP calls. You can use Apache's HTTPClient library for making HTTP calls.

他のヒント

Deploy your Swing application via Java Web Start. Running in a sandbox, "the application may only connect to the host on which it resides."—faq.

If you application runs via Java WebStart, you can simply run a webserver on the cloud and deploy it there like you would on any other web server. The users of course would need to hava a JRE in order to be able to run it.

Another option, if you are looking for a truly thin HTML/JavaScript cloud based delivery, is AjaxSwing. It would run your Swing application on the cloud and convert the UI it at runtime to HTML/JavaScript, making it indistinguishable from any other cloud based software as a service.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top