Sending data from desktop app (Windows) to Web server

Hi, I am pretty sure this is discussed and I did looked at older post but I am not too sure so creating a new post. Sorry if this spams the forum.

I need to understand how can XOJO desktop app send data from PC/Mac to web server. Let me explain what i am trying to achieve, my application is mostly desktop with a web app component (non-xojo) on VPS. I would need to update some information as an when available to web server from desktop so customers can access it directly from portal. Once I send the data (like customer ID, order #, date), the web server should reply with acknowledge data back.

Can this be achieved with XOJO? can experts please help me how ? A code sample will be great

Thanks in advance.

[quote=123940:@Wahed Qadri]Hi, I am pretty sure this is discussed and I did looked at older post but I am not too sure so creating a new post. Sorry if this spams the forum.

I need to understand how can XOJO desktop app send data from PC/Mac to web server. Let me explain what i am trying to achieve, my application is mostly desktop with a web app component (non-xojo) on VPS. I would need to update some information as an when available to web server from desktop so customers can access it directly from portal. Once I send the data (like customer ID, order #, date), the web server should reply with acknowledge data back.

Can this be achieved with XOJO? can experts please help me how ? A code sample will be great[/quote]

Without knowing how your web app is communicating, it is impossible to give you any code. Most web apps communicate through URL parameters, or the Get and Put methods.

Your desktop app can use HTTPSocket to do so.

Thanks Michel,
Sorry i am not a programmer so may not be explaining it technically properly. At this point there is no communication between web app and desktop , that was my question how best can it be achieved with Xojo. I am open to suggestions/options. I did think about SFTP sending the information in a XML file to a folder location on web server listened every 5 seconds. Once it finds a file it reads and sends acknowledge back into another xml regularly monitored by desktop. That was something I thought about but not sure if this is a viable solution or probably an overhead and there could be better options than this

[quote=123945:@Wahed Qadri]Thanks Michel,
Sorry i am not a programmer so may not be explaining it technically properly. At this point there is no communication between web app and desktop , that was my question how best can it be achieved with Xojo. I am open to suggestions/options. I did think about SFTP sending the information in a XML file to a folder location on web server listened every 5 seconds. Once it finds a file it reads and sends acknowledge back into another xml regularly monitored by desktop. That was something I thought about but not sure if this is a viable solution or probably an overhead and there could be better options than this[/quote]

Wahed, In principle anything is possible, but requires precise details about the manipulations involved.

For instance, uploading a file at regular intervals and having your web app check its content looks like a possibility, but there maybe much easier ways of proceeding, depending on the capacities of your web app. For instance, a web app can offer a web service interface, a special URL where your app can post parameters the same way arguments are passed to a page, and receive data.

The first step, much before asking for code, is to define what you want to achieve. What kind of data your desktop application will need to send, how long will it be, how often, what will it expect, what will be the size of the data, what format (is XML the most appropriate). Once you have done that first work, it then will be a lot clearer what your programming options are on the desktop side, and on the web app side.

Another consideration is what degree of control you have on the web app : does it have an API ? How do you communicate with it at the moment ? How easy is it to modify it for your communication needs ? Are you programming it yourself or is it managed by someone else ? If someone else is programming the web app, he may be able to advise in this project.

All questions going far beyond this simple thread…