PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WX21] How to integrate Windev mobile with desktop/LAN Windev?
[WX21] How to integrate Windev mobile with desktop/LAN Windev?
Iniciado por guest, 26,abr. 2016 20:24 - 9 respuestas
Publicado el 26,abril 2016 - 20:24
Hi all,

Before starting to knock my head against the brickwall, I would like to hear the opinions and hints from more experienced WX developers on how to use a mobile device to update HFSQL Classic or C/S data.

Let's take a simple example like real time inventory counting of product balances. The data is on a (traditional) Windows PC but it would be updated with a mobile device. So

- is this possible in real time or should I consider some other approaches?
- what would be the best mobile device type and OS?
- is a WLAN connection reliable enough for data processing?
- how should the path of the data file be referred to in the mobile?
- Strings having "high ascii" characters like åäöü etc, are in Windows ANSI format in the PC. How to handle them in the mobile device?

Any hints and tips will be highly appreciated.

best regards
Ola
Publicado el 26,abril 2016 - 20:33
Hi

Should be posible realtime. I would do a save to local db and the n sinc.
I would go for Android. IOS is more difficult to get in app store

regards
Publicado el 26,abril 2016 - 22:15
Hello Ola

Have a look at Fabrice's open source replication engine.
Fabrice created a modified copy for me and we have used it for nearly a year and it works perfectly. It runs in background on the Windev computer and sends and receives data automatically to and from a Webdev web server which for us, is just a dumb data repository. Our Android app downloads its data from the webserver and returns data to the web server, where it is picked up automatically by the replication engine running in the Windev computer. It has been trouble free in all the time it has been running for us. Our Android app has a manually triggered process to do the send and receive but yours could run as data is saved on the device or every few minutes,
For me, one of the other attractions is that the webserver data is not exposed as it is only accessed from two purpose built applications.
You can download a copy of the engine directly from Fabrice's web site.

Regards
Al
Publicado el 27,abril 2016 - 19:57
If your tablet is running windows, then you might be able to do the whole project using WinDev.

I have a tablet app written using Windev that communicates with a socket service running on my server written using Windev. Since the data is in Visual Foxpro I then do some magic to update the data. It's all realtime. The "secret sauce" is to have a set of services running on the server that the tablet can talk to which provides some useful isolation and puts the heavy lifting on the server rather than the tablet.

Good luck.

Stewart Crisler
Publicado el 28,abril 2016 - 12:47
Thanks all,

I now have some kind of idea about the project. Seems a bit more complicated than I expected, and true "real time" obviously is not an option with mobile phones, not even Windows-ones.

@Allard: Are you referring with sinc to Windev's own replication system? Is it really useable and reliable? I remember reading in some posting that it's OK as long as it works, but if something goes wrong, then you're in deep (beep); recovery would be very difficult.

@Al: Do I have to buy Webdev to get Webdev web server? What kind of mods do you have in Fabrice's open source replication engine?

@Stewart: I was mainly thinking of using pocket size mobile phones, but talking about tablets made me think of the possibility of just using a standard small (10 inch or so) Windows laptop (they have a better keyboard), and writing to the database directly over the WLAN. Maybe with the addition of a pistol grip glued to its underside to help the handling ot it:-)

Best regards
Ola
Publicado el 28,abril 2016 - 16:21
Hi,

I think you should use the system of frarice. It is opensource and indeed better if somthing goed wrong

Regards
Allard
Publicado el 28,abril 2016 - 20:01
My client is using the 7" Iconia tablet by Acer. We have that paired with a blue tooth bar code scanner. With finger size buttons and most of the input done via bar code, it makes for a very versatile arrangement.

The trick is Wifi which gets you on the LAN. If you have to go through the phone circuits, now you have a very different challenge.

I have implemented the basic HTTP protocol in a few hundred lines of Windev code (just shows how flexible Windev is). Generally I'm talking to myself in which case I use my own protocol. Fundamentally it's all just a socket server. If you really want robust then you can look at something like ZeroMQ either explicitly or implement the idea in Windev which has excellent queue support particularly now that you get variable protection in version 21.

WX gives you lots of great choices for addressing tough challenges.

Stewrt Crisler
Publicado el 28,abril 2016 - 22:34
Hello Ola

The changes were just to accomodate my files (and my brain) so I didn't have to change all my files to include the key structure used in the replication system.

It can be a real time process, we just don't use it that way.

The Windev "engine" is a separate exe that runs all the time on my Windev application server and polls nominated files for changes to see if they need to be sent to the web server to update the data there and the server to see if it needs to bring data back.

On the Android phone/tablet the design of our app is that the user determines when they update but the update code could run automatically every time a new record is saved. In your case, when the phone app saved a new product quantity onto the phone data, it would also do a send and receive ( or just a send) to the web server. The Windev engine would automatically pick up that data and bring it back.

Regards
Al
Publicado el 29,abril 2016 - 07:49
My dear friend
In windev you have many option, if you have static IP you use that to access your C/S file directly in real time


Regards
Publicado el 29,abril 2016 - 16:20
Hi everybody

I'm coming late on that one.

The changes done for Al were quite wide as he didn't want to modify his files to accommodate the replication system as it was.

As a result, there is a loss of quite a few of the functionalities of the original system, and it's also slower than my original system. But the whole communication system is still the same and works quite well.

You will need to have webdev to use it, as the web component (2 awp pages) need to be recompiled with your analysis (you could ask me to do that part for you, but it wouldn't be practical in the long term, as this is a step needed each time the analysis changes).

Best regards