How to use a web broser as GUI

R

Roland Mösl

I mean not as a client server system

I mean to use Perl direct as scripting language
like javascript
 
R

Roland Mösl

It involves an easy and a difficult step.
The easy step in writing a browser that understands inline Perl.
The difficult step is to convince people to use your browser
instead of IE, Netscape or whatever they use now.

It's not for web sites,
it's do develop programs to be installed at the clients.

The idea is to use a browser as the GUI
and writing all in Perl

So what browsers have an direct Perl interface
 
J

James Willmore

It's not for web sites,
it's do develop programs to be installed at the clients.

The idea is to use a browser as the GUI
and writing all in Perl

So what browsers have an direct Perl interface

Huh? Perl and CGI are not the same thing. You can use _any_ browser
to interface with the web _server_ on which the Perl script resides.

CGI (Common Gateway Interface) is, as the name implies, an interface
to the web _server_. You can use many languages to communicate
through CGI. For example, you could also use Java Server Pages to
work through the CGI. What browser is prefered in this case, hmm?
You could use C++. Again, what browser would you use, hmm?

As you can see (I hope), Perl is browser agnostic. The real issue is
why you need to use one browser over the other. That's a business
issue, not a Perl issue. Sorry :-(

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
"But I don't like Spam!!!!"
 
K

Kåre Olai Lindbach

It's not for web sites,
it's do develop programs to be installed at the clients.

The idea is to use a browser as the GUI
and writing all in Perl

So what browsers have an direct Perl interface

Perlscript does this. Download Activestate Perl.

It will probably only work for MS-IE, and is thereby locked to MS-OS,
and one need to install AS Perl on all PCs one like to use.

I have played around with it some years back.
 
M

Miriam Born

I mean not as a client server system

I mean to use Perl direct as scripting language
like javascript

You did not tell us anything about the system you are using.

With Microsoft Windows / Internet Explorer / Active Perl it is
possible to use Perl as a scripting language in the Browser (just like
JavaScript or VBScript). The ActiveState distribution contains
examples.

Miriam Born
 
S

Steve Grazzini

James Willmore said:
Huh? Perl and CGI are not the same thing. You can use _any_ browser
to interface with the web _server_ on which the Perl script resides.

I think the OP is talking about using Perl as the client-side scripting
language (as Javascript is commonly used). The only thing I've seen is
Activestate's PerlScript, which can run inside Internet Explorer.
 
J

James Willmore

I think the OP is talking about using Perl as the client-side
scripting language (as Javascript is commonly used). The only thing
I've seen is Activestate's PerlScript, which can run inside Internet
Explorer.

See what I get for _not_ reading the whole thread :)

Sorry about that. Yes, you're correct.

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
I can't understand why a person will take a year or two to write
a novel when he can easily buy one for a few dollars. -- Fred
Allen
 
M

Malcolm Dew-Jones

=?Windows-1252?Q?Roland_M=F6sl?= ([email protected]) wrote:
: I mean not as a client server system

: I mean to use Perl direct as scripting language
: like javascript

An alternative is to run a local web server and write your program in a
manner that is basically a cgi script.

I have used httpi as the basis to do this, but I'm sure there are other
perl based web servers that would work.

If you remove all multithreading (i.e. basically remove all forking) and
only allow connects from the local host, then the web server (written in
perl) ends up being basically an event driven program like a typical
windows or mac program to write.


#!perl
# personal server

open socket for local host only

loop:
wait for connect
# don't fork or anything here, just do the work yourself
parse input
if input eq 'QUIT' then exit loop
calculate results
send back page
continue at top of loop

note that any data you load into memory is always available from one page
to the next since it's just a single tasking program, but you get all the
power of the browser (so for example its trivial to add graphics to you
page by simply sending an IMG tag that points to a local image
file).

I guess that something like apache with mod_perl but restricted to the
local host could also be used like the above.
 
T

Ted Zlatanov

It's not for web sites,
it's do develop programs to be installed at the clients.

The idea is to use a browser as the GUI
and writing all in Perl

So what browsers have an direct Perl interface

w3m has a direct CGI interface, meaning it will execute CGI scripts
directly instead of making the webserver do it. w3m is a very nice
text-mode browser that can display images in a xterm. It works under
cygwin, I believe. See:

http://w3m.sourceforge.net
http://w3m.sourceforge.net/MANUAL#LocalCGI

This does not limit you to Perl for CGI development, either - any
language can be used.

Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top