[Gambas-user] classic asp and vbscript compatibility

Laxminarayan AB topplereffect at ...1858...
Mon Feb 11 19:34:12 CET 2008


Hi,

On Monday 11 February 2008 02:00, you wrote:
> On dimanche 10 février 2008, Laxminarayan AB wrote:
> > is there an attempt to make vbscript and jscript conversion or run
> > directly under gambas?
>
> No, but something very similar is doable. The gb.web component have all the
> methods equivalent to ASP. The only thing that is missing is a support for
> an equivalent of the ASP pages.

Excellent.
shall look into it very soon and hopefully report back with some progress.

> > What i know so far:
> > - compiled gambas 2 from source - works fine
> > - saw the excellent set of examples, but gambas web runs as CGI, afaik
>
> A CGI script written in Gambas can beat all bloated ASP.NET applications.
> Tested in reality :-) SO CGI is not really a problem.

agreed :-)

> A support for FastCGI would be better.

Have to look

> > - have a long familiarity with MS VB, VB.Net
> >
> > What i would like to see or do is gambas as an apache module or with a
> > native web server to host "ASP" applications. I know that writing a web
> > server is not an easy task.
>
> You don't write a web server. You use Apache, or better, thttpd (or
> lighttpd). For just running CGI scripts and serving static contents, thttpd
> is very small and fast.

Great.

> > I know that Gambas is not aiming to repeat the mistakes of VB. So, maybe
> > the VBScript API can be emulated by a wrapper over gb web, just to
> > maintain syntax compatiblity. Debugging and other things can be added
> > while improving the port. (Or does it need to be designed into new code?)
>
> Real compatibility is a matter of translating the VBScript syntax into
> Gambas syntax. I.e. it would be a sort of converter that would be run
> before the compilation.

OK.

> Debugging a CGI script is really not easy at the moment. To do that, I need
> to embed a web server into gb.web (thttpd!) so that the Gambas CGI script
> is independent.

OK.

> Note you don't have to make a program for each page. Your web site should
> be a unique CGI script, a unique Gambas project, will the rendering code of
> all pages inside.

OK.

> > The need for ASP compatibility is that MS is trying to phase out ASP and
> > there is a ton of code in ASP. And many users of ASP. MS does not mind
> > ditching them or forcing them to learn ASP.Net. ASP.Net is very slow and

> A VBScript->Gambas translator would be easy I think, more than a VB->Gambas
> translator, as the syntax is less complex. Except for obscure ASP methods,
> and for ActiveX components that are just there to prevent you from escaping
> from Windows.

OK.

> I think I was not very clear, but continue on asking questions if you are
> motivated.

Clear enough :)  
Now, I just have to RTFM and WTFC ....

> Please give more details, as sometimes I don't have the idea to add some
> very easy features. But if you want code folding, you have to wait, wait...
>
> :-)

Code-folding can be done temporarily from another "established" IDE or editor
with gambas2 syntax highlighting - both on windows and linux.
In that way, code can be written comfortably and then tested via gambas2 IDE. 
Although this sounds like riding two horses at once, it is not as impractical 
as it may sound.

Hopefully I'll soon have some good code to show. :)

/L




More information about the User mailing list