[Gambas-user] Web apps

Rob Kudla sourceforge-raindog2 at ...94...
Fri Nov 29 23:00:11 CET 2013


On 11/29/2013 03:39 PM, John Rose wrote:
> I have a rather naive question. I presume that Gambas would also be good
> for developing client-server apps e.g. with a database resident on a
> server. Can Gambas be used to develop web apps i.e. where all the logic
> is on the server?

Yes, the Gambas documentation wiki is a CGI program written in Gambas. I
think the source is included in the Gambas tarball as an example, or used
to be.

You can also implement a web server in Gambas, and I seem to remember
someone implementing "Gambas Server Pages", though I think intermingling
code and HTML is bad practice for all but the most trivial applications.

I've long thought about coming up with a way to translate gb.qt/gb.gtk
programs into gb.web programs with Javascript on the client side to forward
events back to the server for handling. Maintaining state would be an issue
(a CGI normally runs once, sends HTML to the client and exits, while a
Gambas desktop program normally runs as a single instance for the user's
entire interaction, keeping database handles open, drawable objects in
memory, remembering things as basic as cursor position, etc.) and what
works well in a desktop paradigm will usually not make for a very good
HTML5 app. Plus, it probably would have sucked, especially if you had
something like a MouseMove event handler that caused the Gambas CGI to load
and run every time it fired.

Rob




More information about the User mailing list