Page 1 of 1

PHP-Like language.

Posted: Mon Jul 05, 2004 2:47 am
by embrance
Would it be possible to create an internet language like PHP with PB?
Any intorductions on how?

Posted: Mon Jul 05, 2004 4:29 am
by fweil
What purpose do you think to ?

Are you thinking to a script parser / interpreter or to possible compiled code generated from scripts ? Do you expect such an environment to work on an http server only ?

I guess it is possible, maybe interesting and I agree to try to do something like that. But not to reinvent the wheel ...

Well I will open an editor and start something.

If some people in the meanwhile have milestones to give I will listen carefully.

Rgrds

Posted: Mon Jul 05, 2004 10:50 am
by plouf
php interpreter is nothink more than an cgi app producing output to
stdout

there are a cgi example in purearea (if a am not wrong) and a cgi lib
by elchoni

Posted: Mon Jul 05, 2004 4:48 pm
by embrance
I have seen something like PHP,called PSP(Pascal Server Pages).
So i guess its posible.However from where to start?
It would be cool to have internet apps like windows app runnig formm a web-browser.think of it.

Posted: Mon Jul 05, 2004 4:49 pm
by embrance
BTW im from Greece too! :wink:

Posted: Mon Jul 05, 2004 5:40 pm
by fweil
I use to design websites since two years more or less using PB to build all the pages.

I do partly static and partly dynamic things.

Now if you want we work a bit to build a kind of CGI able to help in generating active HTML, I can probably help.

Rgrds

Posted: Mon Jul 05, 2004 9:56 pm
by GedB
Perhaps it could work more like JSP than PHP.

JSP works by compiling pages on the fly and caching binary. When a page is called it checks the source against the binary. If the source is newer than the binary it is compiled. Then the binary is run and the results returned.

This is different to PHP, where the page is interpreted each time it is executed.

Sandboxing PB isn't that difficulty, you just take away any PureLibraries you don't want to make available.

In fact, a completely new set of web enabled PureLibraries could be developed, specifically geated towards the web.

PB's lightening fast compiler would make it ideal for the job, and smaller executables load quicker. Imagine the performance!