[Gambas-user] gb.web (was Database manager)

Benoit Minisini gambas at ...1...
Wed Mar 26 14:24:58 CET 2008


On mercredi 26 mars 2008, Ron wrote:
> >> btw, im stunned as how fast a gambas cgi program is, i'm building one to
> >> run my website on , with doc.cgi as example, it's great!
> >
> > 'doc.cgi' is just a big awful quick & dirty hack. You should based your
> > CGI script on the gb.web component instead. It has an ASP-like interface.
> >
> > And I like the speed of CGI scripts written in Gambas too. :-) After all,
> > I earn my life with the gb.web component now.
> >
> > And if you replace your apache http server by something like thttpd, it
> > will faster again!
> >
> > I plan to enhance the web support in the IDE. Now users wants web
> > applications. Mainly windows users, because local applications that you
> > must install on each computer is a real nightmare on this OS.
>
> Ok,
>
> I have looked at gb.web before I began to make a gambas cgi program, but
> I didn't find enough example code to understand all the document
> references. Anything available now? 

gb.web is very inspired from ASP, so if you know ASP, you will not be lost. If 
not, you must first start to learn how CGI works, i.e. how it receives its 
data (Request class), and how it sends its web page back (Response class). 
You must learn what an URI is, and how to encode/decode it.

The only missing feature is the ability to put Gambas code inside HTML pages, 
like ASP or PHP or others do. But I'm not sure this is necessarily a good 
idea...

> How much effort would it take to adapt 
> doc.cgi to use gb.web?

A lot. As I said, doc.cgi is a quick hack written before gb.web.

>
> I'm using apache because i'm familiar with it's virtual host settings
> etc, the speed is good enough for now, I'm even scanning a dir tree and
> parse files on the fly to generate my web contents, in fact i'm building
> a bloxsom (perl file based blogging) alike program in Gambas.

You will use thttpd if you really need speed. It is a less then 100K http 
server.

>
> I will try again with gb.web since I now have more clear what I want my
> CGI script to do, maybe that helps a bit ;-)
>
> Later I need some gb.image functionality like resize etc, would be nice
> for creating a photogallery.
> But it depends on gui components, which I don't use ofcourse... 

I agree, an non-gui image manipulation component would be great.

Regards,

-- 
Benoit Minisini




More information about the User mailing list