Page 2 of 2

Posted: Thu Mar 16, 2006 10:08 pm
by Pantcho!!
Well in the first post you made i understood 2 things:
1. you are trying to find alternative to PHP/ASP
2. if there is an alternative to .NET in PB

for number 1 i can tell you that i program my own CGI's in PB.
that is of course with Paul's great CGI lib, where you can program as reguler in PB and spit it out to the client's browser.
so go to http://www.reelmedia.org/cgi-bin/PurePr ... s&sub=ASM4
download the lib and start working with it, of course you need a server to test your cgi's.
anyway it works like a charm for me at my site:
http://www.cellphoto.net

for number 2, i dont have a clue :P

anyway PB rocks!

cya.

Posted: Thu Mar 16, 2006 10:45 pm
by Edwin Knoppert
CGI is cool, but must say we have rewritten all our cgi apps (5 a 6 or so) to ASP.NET
The issue with CGI is that code is not merged whit html output, as is done with ASP/ASP.NET (well, you know what i mean :) )
I never liked ASP, a really immature language imo, variants, no real access to API's dll's and such.
Two good reasons i choose for ASP.NET
But CGI is 2nd best i guess.
CGI is imo not a serious method to write larger apps, it is possible yeah yeah (bla bla)..

Posted: Fri Mar 17, 2006 6:00 pm
by ricardo
Edwin Knoppert wrote: The issue with CGI is that code is not merged whit html output, as is done with ASP/ASP.NET (well, you know what i mean :) )
I was playing with cgi and have this idea (want your comments please):

Make a CGI.exe, call it from SSI

Code: Select all

<!--#exec cgi="myscript.whatever"-->
Then, in your CGI using the ProgramParameter() you can know the name of the 'script' and then open it in your cgi app and do whatever you want with it and return the StdOut needed.

By this way you can make your CGI 'parse' some pages and do whatever you want with it before giving it as StdOut.

Are there any simpler way to achieve the same?

Posted: Fri Mar 17, 2006 6:28 pm
by Edwin Knoppert
I would not use this meta statement.
Simply point users to the cgi, evt. with a filename as param which is parsed and modified and streamed towards the user.
Simple.

Why not isapi?
Might be better regarding sessions and such.
An exe releases it self each time.

Posted: Fri Mar 17, 2006 6:35 pm
by ricardo
Edwin Knoppert wrote:I
Why not isapi?
Do you know how to code it in PB?

Posted: Fri Mar 17, 2006 7:42 pm
by Edwin Knoppert
Sorry, i did this in another language a long time ago.
Still, *if* you would consider using the ASP.NET framework to handle your requests only.
You can pass the request to any pb exe or dll you want.
I mean you would only need a generic handler.

Imagne the PB cgi way as it is now:

http://www.mysite.com/cgi-bin/theexe.exe?html=html1.htm
This way you could read the htm1.htm by the cgi, modify it and stream it back.

The same you can do with ASP.NET and pb like:
http://www.mysite.com/myaspnetapp1/myha ... =html1.htm
Then with a few simple calls you pass it to a pb exe or dll and return some results and let ASP.NET stream it back.
So you won't need serious asp.net knowledge and still benefit of the good asp.net (isapi) handling.
The asp.net code could remain the same for long time.
Unless you seriously won't use asp.net to handle the requests :)

Posted: Fri Mar 17, 2006 9:39 pm
by ricardo
Why not use my CGI as some interpreter associated with some extension?

Im testing it in this way and it works fine...

Is there anything that make this not recommended?
Still, *if* you would consider using the ASP.NET framework to handle your requests only.
You can pass the request to any pb exe or dll you want.
This part is very interesting too.
How to do it?

Re: Web development like PB-programming

Posted: Fri Aug 19, 2011 11:21 am
by Fred
Locked