Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
10
Erster Beitrag:
vor 2 Jahren, 10 Monaten
Letzter Beitrag:
vor 2 Jahren, 10 Monaten
Beteiligte Autoren:
Gus, Fabrice Harari, Novica Njagojevic

Notifications from a WinDev app to a WebDev site

Startbeitrag von Gus am 03.08.2015 19: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

Antworten:

Hi,
httprequest from Wd ap to Wb site,also is possible from wd mobile to webdev site.

von Novica Njagojevic - am 03.08.2015 19:37
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

von Gus - am 03.08.2015 21:45
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

von Fabrice Harari - am 04.08.2015 10:07
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

von Gus - am 04.08.2015 22:00
Hi Gus,

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

Best regards

von Fabrice Harari - am 05.08.2015 14:28
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

von Gus - am 05.08.2015 15:53
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

von Fabrice Harari - am 06.08.2015 10:15
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

von Gus - am 06.08.2015 22:07
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

von Fabrice Harari - am 07.08.2015 09:03
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.