javadatabaseswingcloudcommunication

What and How the Java Swing concept related to Cloud?


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.


Solution

  • 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.