Harbour CGI

Issues and Discussions related to Harbour

Moderator: Rathinagiri

nikko1960
Posts: 30
Joined: Fri Sep 13, 2013 8:55 am
Contact:

Re: Harbour CGI

Post by nikko1960 »

hi Roberto

i'm domenico from italy, i have tested your past cgi examples with uhttpd, with a good success.

I believe that one part of IT world is going to web server side.

I do not know how the amount of this part will be in the future, but probably the increase of smartphone sells and popularity and friendly use, need a change on our way of thinking IT.

And you are tracing this way.

i have a some question's

why you have chosen mongoose web server for this example ?

1) a random choose ? ( i do not think )

2) for his low footprint ? ( probably )

3) for lua support ? ( mmhh.... )

and if 3 is one of the answers, do you believe that may be a good opportunity to create a working dbase ( .dbf ) module with .ntx, .cdx ( netio ? ) support for lua.

Or is not necessary, and we must go to a sql database, or the new nosql database like mongodb ?

best regards

Domenico
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Harbour CGI

Post by Roberto Lopez »

nikko1960 wrote: why you have chosen mongoose web server for this example ?

1) a random choose ? ( i do not think )

2) for his low footprint ? ( probably )

3) for lua support ? ( mmhh.... )

and if 3 is one of the answers, do you believe that may be a good opportunity to create a working dbase ( .dbf ) module with .ntx, .cdx ( netio ? ) support for lua.

Or is not necessary, and we must go to a sql database, or the new nosql database like mongodb ?

best regards

Domenico

At first, thanks for your interest on this little experiment.

Since about a year ago, I'm using Harbour uhttpd server as a 'companion' for large HMG applications.

So, the users can manipulate and query data from Windows clients (LAN or remote) connecting to databases via NETIO and via any web browser (currently iPhones, iPads and Android phones) via uhttpd server.

The client web apps (sent to the clients via uhhtpd) are jQuery Mobile using synchronous AJAX for data handling.

I'm working on prototypes (this is the last one viewtopic.php?f=2&t=3256) to make my future work easier and eventually convert all already done web apps.

In fact, I'm looking for a web HMG successor, so, it must be simple and powerful.

I'm triying to decide if I'll go with my current scheme (uhttpd executing .hrb modules) or use CGI.

To test CGI, I've looked for a simple, small and fast server, this is the main reason to choose mongoose.

Was not my intention to use LUA, anyway is a nice language.

Regards,
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
nikko1960
Posts: 30
Joined: Fri Sep 13, 2013 8:55 am
Contact:

Re: Harbour CGI

Post by nikko1960 »

Hi Roberto, thank for the answer.

a simple question,

in your last try, viewtopic.php?f=35&t=3449" onclick="window.open(this.href);return false;,

you write a harbour program to send an html page to the web server ( mongoose ).

it is simple and works well, but in case we use uhttpd version with .hrb files how we can call another page ?

let me explain better, as you know a site for example have an index page and other pages like about page, that are simply static pages with some text or images information inside.

What is , in your opinion , the better way to write these pages, pure html with link, or using for example .hrb to descript these pages ?

One more question,

if we can have an harbour scripting language for web server, like php or for example dbfree
( http://www.dbfree.org/index_main.htm" onclick="window.open(this.href);return false; ), or ( http://activevfp.codeplex.com/SourceCon ... ivevfp.prg" onclick="window.open(this.href);return false; ) could it be a good way to write web applications ?

best regards

Domenico
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Harbour CGI

Post by Roberto Lopez »

nikko1960 wrote:Hi Roberto, thank for the answer.

a simple question,

in your last try, viewtopic.php?f=35&t=3449" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;,

you write a harbour program to send an html page to the web server ( mongoose ).

it is simple and works well, but in case we use uhttpd version with .hrb files how we can call another page ?

let me explain better, as you know a site for example have an index page and other pages like about page, that are simply static pages with some text or images information inside.

What is , in your opinion , the better way to write these pages, pure html with link, or using for example .hrb to descript these pages ?

One more question,

if we can have an harbour scripting language for web server, like php or for example dbfree
( http://www.dbfree.org/index_main.htm" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false; ), or ( http://activevfp.codeplex.com/SourceCon ... ivevfp.prg" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false; ) could it be a good way to write web applications ?

best regards

Domenico
If you look at : viewtopic.php?f=2&t=3256 you'll find answers to your questions.

My idea about this, is to not use Harbour to create sites, but web applications (all pages are generated dynamically from server).

Moreover, you can link a static pages from a buttons if you wish, using the current scheme.

Of course this is only my vision about this and (of course again) there is multiple different approaches to the problem.

I'll work on CGI side in the next weeks trying to simplify library code and application creation to determine which will be the best approach.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply