Exchanging data between desktop app and web app

Hi to all,

I m thinking to make a desktop app to support my web app. I don’t know if it is possible through desktop to connect with his account automatically (providing credentials in a desktop app textboxes) and get some data from his own database or to save some there. Is that possible and how to transmit records’ SQLite data?
Appreciate any help in that (and more if you include some code examples, if necessary)
:slight_smile:

PS: I read in forum that may I have to use HTTPSecureSocket, FireWallPort and JSon…
but still wonder how to implement log-in and transmit data. Can’t find any examples in it…
Thank you in advanced.

Your question is very generic. The answer is - of course - “yes, you can”. But you need to be more specific about what you want to do.

My web app is hosting to Xojo Cloud. I want through the desktop to log in to the web app and then to exchnage data with remote SQLite database (reading/writing records). Please tell me what specific details you need to know… Is it possible to open a private conversation, if needed?

What you want is a web service, which can be implemented any number of ways.

This video might be a good starting point:

Making DB Web Services with Xojo

Or this blog post: Web Services: Xojo Web, At Your Service

More web services information is here:
http://developer.xojo.com/web-services-rest

Thank Paul,
I will have a look there and be back with the remaining of my ignorance in the subject…

Hi Paul,
Well, I had a look there. I can’t use PAW and have difficulties in setting up LUNA to use with my Xojo Cloud account ’ database (how to set it up and make it works).

However, I saw the webminar
http://developer.xojo.com/webinar-database-web-service

which has a sample (EEWS) of Eddie’sWebServices. I tried it with RESTy to try to test getAllCustomers and getCustomer.
My problem is what I have to do to test the updateCustomer (the webinar does not contain it, but the code contains this API)

I then tried the code found in Xojo blog Javier’s article at

https://blog.xojo.com/2018/09/26/web-services-xojo-web-at-your-service/

but it gives an error (MySocket1.sendItem) in trying to update a record. Could you please help me in that?

Dim MySocket1 As HTTPSecureSocket
dim d as new dictionary
d.value(“Title”) = “Mi nuevo album”
d.value(“ArtistId”) = “1111”

dim item as new JSONItem

item.Value(“newAlbum”) = d
MySocket1.sendItem(item, “http://127.0.0.1:8080/Api/AddAlbum”)

An error? What error?

In general you have to write the code to handle the web service API calls. The techniques are what are described in the various posts, the code that runs when the API is called is up to you so you can implement things however works best for you. If you do not want to build out the web service back-end code yourself, using something like Aloe Express is a great place to start.

Aloe Express