[Gambas-user] Web application development

Benoit Minisini gambas at ...1...
Mon Oct 16 23:24:46 CEST 2006


On Monday 16 October 2006 23:04, Rob wrote:
> On Monday 16 October 2006 16:21, Daniel Campos wrote:
> > In that sense people interested in "gb.ajax" (I hope somebody
> > finds a better name), should check the Comet programming
> > technology:
> > http://en.wikipedia.org/wiki/Comet_%28programming%29 , that
> > surely will provide big ideas for that component.
>
> I had actually expected to make use of the Comet technique, but I
> don't think it's safe to assume browsers will always behave
> nicely (i.e. not break the connection) and I certainly don't
> want to put any requirements on the server except for having
> Gambas installed as a CGI interpreter (i.e. no special
> middleware or proxy.)  So state still needs to be maintained
> between requests, and cleaned out periodically.
>
> But at its simplest, Comet can be implemented as "open a
> connection, when the connection returns something, handle it,
> and when the connection closes, immediately reopen it."  You
> have a message queue on the browser side that transmits requests
> over that one persistent connection and receives drawing and
> timer events from the server side.  I would also want to have
> some kind of ping or heartbeat functionality, because if there's
> one thing I've learned in the last year and a half of being up
> to my elbows in Ajax, it's that TCP connections are not quite as
> reliable in the real world as they are in the spec.
>
> I agree that "gb.ajax" or "gb.web.ajax" would suck as a name, but
> you can't deny its buzzword compliance ;)  If someone does
> suggest another name, I hope that it isn't just "gb.comet"
> or "gb.SomeOtherToolkit" or "gb.SomeNewMeaninglessName".  I'd
> sooner call it "gb.form.web" (or "gb.web.form"), if that won't
> raise people's expectations too high.
>
> > A person here was able to run parts of the Squeak environment
> > (Smalltalk) directly in a browser. Comet techniques also
> > allows to draw directly on a client web canvas (Firefox and
> > Safari/Webkit have one, and there's an emulation for IE), and
> > even work sending graphical events from the client to the
> > server and sending a server-client reply using Javascript
> > injection.
>
> I certainly intend to support the Firefox canvas in some way,
> though I don't know whether my graphics-fu and/or the Firefox
> canvas itself is good enough to implement most of what Gambas'
> DrawingArea does.
>
> In answer to Benoit's earlier post, I see your point about having
> different controls for the web vs. gb.qt/gb.gtk, but the whole
> point of my "gb.ajax" concept is to allow novice web programmers
> to design their forms in the Gambas IDE and deploy them to the
> web just by moving the checkmark from "gb.qt" to "gb.ajax" in
> project properties.  It will make for some pretty crappy forms
> being deployed, but then, look at the hideous things people have
> done with Scriptaculous.  I don't think anyone would say they'd
> rather that it hadn't been written.
>
> It's a lofty goal, but why have goals that aren't?
>
> Rob
>

Just tell us where you can go in emulating gb.qt and gb.gth controls in 
gb.web.form.

I have started a documentation page for Daniel to explain the internal 
behaviour of gb.qt controls: http://gambasdoc.org/help/api/guicomp. (Have you 
read it Daniel?)

I think you may find information there for your needs.

Maybe we can imagine two components: gb.web.form and gb.web.form.ajax. The 
first component will simply includes Web controls that do not need Ajax (i.e. 
some HTML forms and Javascript only).

Regards,

-- 
Benoit Minisini





More information about the User mailing list