[Gambas-user] A couple of questions about building web / cgi applications

Rolf-Werner Eilert eilert-sprachen at ...221...
Fri Feb 13 09:42:43 CET 2015



Am 12.02.2015 19:09, schrieb Bruce Cunningham:
> I'm looking for some advice and maybe some code examples for a project I'm starting.  I'm building an embedded device with an ARM based System-On-Module (similar to an Rpi, but in an sodimm form factor).
>
> Thanks to some great help from members of this mailing list, I have successfully compiled Gambas for the SOM.  The device will have a "main" GUI application that handles the user interface and all of the control logic.  However, it will also have a web interface for remote access to some of the control settings.
>
> Here are my questions:
>
> 1) Does anyone have any code examples for CGI applications in Gambas?  I know there is an option to use the Gambas interpreter to build ASP-like pages, but I would rather the web code be in compiled into a CGI module instead (for security reasons).  I've built CGI applications in VB6, so I have a fairly good understanding how CGI work in general.  I've read the Gambas docs on CGI, but I still don't quite understand it.
>
> 2) What is the easiest way to exchange data (variables and arrays) between the CGI module, and the main application?  Using a file on disk is not a great option, since the device will be using flash for the file system, and these values will be changing several times a second.  That will kill the flash very quickly.
>
> Thanks,
>
> Bruce Cunningham
> bcunningham at ...3336...<mailto:bcunningham at ...3336...>

Hi Bruce,

although I see your point, I don't see where there is a difference 
between a gb.web app and an all-in-one app (apart from the ASP-like 
pages to be stored separately). BUT: I once made some projects this way, 
back in the times of Gambas2, so here is what I have (comments are in 
German, and scarce, so if you have any questions...)

One of the projects (umfragen) is still publicly running on our website 
at http://www.eilert-sprachen.de/cgi-bin/Umfragen.gambas?Selbsttest.data

Take a look at those SUBs which start with "schreibe" (write), that's 
the core of it.

Hope it helps!

Regards
Rolf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: firmen.tar.gz
Type: application/x-gzip
Size: 17707 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150213/9e78e748/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: umfragen.tar.gz
Type: application/x-gzip
Size: 74733 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150213/9e78e748/attachment-0001.bin>


More information about the User mailing list