PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Notifications from a WinDev app to a WebDev site
Notifications from a WinDev app to a WebDev site
Débuté par Gus, 03 aoû. 2015 21:10 - 9 réponses
Posté le 03 août 2015 - 21:10
Hello:

I have a WebDev site (WB20) which needs to receive notifications from a WinDev applications, whenever some data changes. I tried Shared Memory but I don't think it's a good idea, because the increase of data would cause problem with the size of the Shared memory.

I was thinking on the WinDev app to send notifications via TCP or UDP, but I'm not sure how the WebDev site can receive this kind of messages. Is there any way to implement this in a WebDev site? Or any other suggestion for these notifications?

Thanks in advance.
Gus
Posté le 03 août 2015 - 21:37
Hi,
httprequest from Wd ap to Wb site,also is possible from wd mobile to webdev site.
Posté le 03 août 2015 - 23:45
Hello Novica:

Thanks for the answer.
I think I omitted more details about what I'm trying to do...
Let's say the user access a web page which presents data values. If this data value changes overtime, I would like to update the web page the user is accessing, without the user having to click on the refresh button.

Using HTTPRequest from the WinDev application would retrieve data from the web site, but I don't see how can I trigger the update I'm intended to do....

Regards;
Gus
Posté le 04 août 2015 - 12:07
Hi Gus,

there is a new option in webdev 20 allowing just that. Basically, it's about having a background task on the server and pushing the data to the browser automatically. Everything is in the help.

Otherwise, you can use a timer on the page (browsr side) with an ajaxexecuteasynchronous to check if new data arrived on the server, and refresh from there if necessary.

Best regards
Posté le 05 août 2015 - 00:00
Hello Fabrice:
Thanks for your time.

Are you referring to the Parallel Tasks types and functions or the AutomaticEvent and ManualEvent new types?

Thanks
Gus
Posté le 05 août 2015 - 16:28
Hi Gus,

no. Parallel tasks are in windev.
There is a new server push mode in webdev.

Best regards
Posté le 05 août 2015 - 17:53
Thanks, Fabrice.

I'm completely lost.... I couldn't find anything like "push", "Push Mode", or "server push mode" in the help.... I didn't find it in the 920 new features of version 20...

Don't you remember the exact name or would you have a link for this feature in the help?

Thanks in advance
Gus
Posté le 06 août 2015 - 12:15
Hi Gus,

I checked, and there is an article about how to do it in the LST 100, using the html 5 server sent event mechanism. If you are interested, you can buy that number directly on pcsoft web site.

However, there are limitations:
- it's html5 only (so old browser are out)
- it's not supported by IE
- only classic webdev page support this (not awp, not php)

So the only real universal system is the timer in browser code and ajaxexecuteasynchronous.

Best regards
Posté le 07 août 2015 - 00:07
Hi:
Thanks again for the email.

This is a good mechanism to push data from WebDev server to the Browser.

But going back to my original question, I need to synchronize the WebDev server app with the latest data generated in a WinDev app, so I'm looking to see how I can push data from a WinDev app to a WebDev server. Then, I would use the mentioned mechanism to push data from the WebDev server to the Browser.

I will continue investigating the best way to do this.

Thanks and Regards;
Gus
Posté le 07 août 2015 - 11:03
Hi Gus

that part is easy. As said in the first answer here, you can use httprequest to send data to an awp page.

If you need it, I'm using this technique in wxreplication, so you can have the full working example if you want

Best regards