[Gambas-user] WebPage support in Gambas

Rob Kudla sourceforge-raindog2 at ...94...
Sun Mar 18 17:52:41 CET 2012


On 03/18/2012 09:29 AM, Benoît Minisini wrote:
> Nothing is engraved in the marble (french expression), 

The equivalent English phrase is "etched in stone", so pretty close.

> so please tell what you think about that, and if you have ideas!

I started separating the code from the markup in my web apps about 10
years ago, but many will still want something analogous to ASP/PHP.
Congratulations on getting it working.

A few years back, when it first became possible to write Gambas CGIs, I
started working on a Gambas library with companion Javascript library to
essentially render Gambas forms as web pages, and handle events through
AJAX, using Javascript to render the form in the browser and Gambas to
do all the actual processing. I ended up abandoning the project because
I needed to get something done right away and I was doing all the
Javascript from scratch.

These days, though, something like jQuery on the browser side would make
such a thing much easier to implement in a RESTful way, allowing modern
HTML5 apps to be written (at least on the server side) in Gambas. You
could have essentially a Gambas jQuery plugin that does nothing but pass
events to the server side using $.ajax, but allow advanced users to
insert their own Javascript code if they wanted to do any extra
validation or effects or whatever. With some kind of JSON message
passing convention and a centralized Javascript event dispatcher, you
could have events trigger other events, have timers, etc., just like a
native Gambas form, but in an HTML5 page that looks like any other web
app. I could probably help you write the Javascript side of that, if
nothing else.

Maintaining state on the server side would be more difficult (unless you
used keep-alive to do everything over one connection) but web
programmers are used to dealing with state issues, or at least they
should be.

To integrate it fully into the Gambas IDE might be more work than anyone
is willing to do, though.

Rob




More information about the User mailing list