Page 1 of 1
Way from PC APP to WEB APP
Posted: Mon Sep 17, 2018 7:30 am
by Victorio
Hi,
I want create new web application , which can control Xbase++ aplication running on server.
I am searching simpliest way
My app which running on server is database application, use DBF /CDX databases via ODBC SQL VFP driver.
One from databases is shared with many users, to this database every user write some data record, which server application processing and return result with information in record in this database and also create some PDF files on server, and this PDFf user need to show in viewer and can print it.
Now this do from client application, which is installed on client PCs and server application, which is installed on server in LAN. (application is same, but only swith to mode server or client)
This I want modify, to not need install any client app, and every processes write via internet browser.
Best will be no need any web server (apache,...) and everything do with Xbase++, eXpress++ and XB2NET library.
Is this right way to do it ?
I test some examples from xb2net, also read many informations about CGI, WAA,... but I admit that I still do not understand how it works

Re: Way from PC APP to WEB APP
Posted: Mon Sep 17, 2018 3:31 pm
by bwolfsohn
the xb2net application IS your web server.
a browser can communicate with it the same way it does with a "standard" web server, only the xb2net server can interpret it and translate it into data that can be sorted in your standard xbase++ databases.
Roger has some examples in his express i believe..
you start with a basic framework and go from there...
one step at a time...
Re: Way from PC APP to WEB APP
Posted: Tue Sep 18, 2018 12:58 am
by Tom
You need to understand how it works. You need to collect some information about session management and non-persistant connections. The "TimeClock"-sample of Xb2.Net will help you to get an idea of how this should be done.
If you want your app to be a web app aswell, there are several ways to do this with Xbase++. I agree the best way is Xb2.Net, but it also might be done with HTTPEndPoint of Xbase++ and CX/P. The idea is the same. (WAA is 90s-bullshit, don't use this.)
You create a back-end, a server app which provides all the information needed. If this server app is connected and a valid login has passed, you create web pages, HTML documents containing the data and forms and stuff. With HTML5 and JQuery and lots of other tools, you may create very cool, modern and reflexive pages. Anyway, at the end you create HTML documents containing data, maybe some buttons and other elements that help the user to navigate. But navigation is formular intpretation or hyperlink usage. There is no app in the browser, and the connection to your server application is lost inbetween (what is meant with non-persistant). Your server needs to handle session management with IDs (like the TimeClock-sample does) and/or cookies. At the end, a web app gets a request and creates a document, that's how this is done. We use Xb2.Net, eXpress++ and Xbase++ to do this. Here are some screenshots of how one of our "web apps" (which don't exist, since these are documents created by the server) looks like. It looks greate on any device and it's done using a free framework using bootstrap, typescript, JQUery and some other techniques.
Re: Way from PC APP to WEB APP
Posted: Tue Sep 18, 2018 2:16 am
by Victorio
Brian, Tom, thank you very much for advices.
So I see, this is long way to create my first functioning app
Tom, Httpendpoint I cannot use because this is supported only with Proffesional Xbase++ version.
Xb2net I have, but without ssl, this can be also problem, but later I can upgrade it.
Now I am looking and testing examples in XB2NET, like WEBSERVE,TCLIENT,...
And only after your advice to look TimeClock example, where I see htm examples like Login etc. This help me very.
Viktor
Re: Way from PC APP to WEB APP
Posted: Tue Sep 18, 2018 2:51 am
by Tom
Hi, Viktor.
The session management in the TimeClock-sample is very useful. And you only need to add three, four lines of code after upgrading to SSL. This is simple. The hardest thing is to achieve SSL certificates and manage them, but there are some batch files and other tools for "Let's encrypt"-certificates in the newest Xb2.Net-bundle aswell.
Re: Way from PC APP to WEB APP
Posted: Tue Sep 18, 2018 5:48 am
by skiman
Hi Tom,
Tom wrote: It looks greate on any device and it's done using a free framework using bootstrap, typescript, JQUery and some other techniques.
Can you tell us which framework this is?
Re: Way from PC APP to WEB APP
Posted: Tue Sep 18, 2018 6:30 am
by Tom