Easy CGI Languages.

L

leke

Not sure if this is the right place to be asking this...
I'm a graphic designer just moving into CGI web page creation. I solel
want learn a programming language for doing CGI scripts.
I need a language that is relatively quick and easy to learn, and i
supported by many Web hosts (including free ones).
I have done lots of browsing, but without a good, long time workin
knowledge of languages it's hard to judge what's best.

What I know (which is not a lot):
I know most servers support Perl, but I want to try and steer clear o
Perl because it frightens me (well Perl and Regular Expressions).
I'm learning REBOL at the moment because I think it's real easy fo
doing CGI stuff (and no Regex)!
Only thing is that not a lot of hosts support REBOL (and no free one
at present).

Which languages are you guys using to do your CGI?
Heard of any new languages worth having a look at?

Thanks ,
L


-
lek
 
J

Jim Higson

leke said:
Not sure if this is the right place to be asking this...
I'm a graphic designer just moving into CGI web page creation. I solely
want learn a programming language for doing CGI scripts.
I need a language that is relatively quick and easy to learn, and is
supported by many Web hosts (including free ones).
I have done lots of browsing, but without a good, long time working
knowledge of languages it's hard to judge what's best.

What I know (which is not a lot):
I know most servers support Perl, but I want to try and steer clear of
Perl because it frightens me (well Perl and Regular Expressions).
I'm learning REBOL at the moment because I think it's real easy for
doing CGI stuff (and no Regex)!
Only thing is that not a lot of hosts support REBOL (and no free ones
at present).

Which languages are you guys using to do your CGI?
Heard of any new languages worth having a look at?

Thanks ,
L.

Not technically a language, and it depends waht you want to do, but XSLT is
powerful and not too difficult.

It can be used to create filters that transform one XML format to another,
for example XML data in a database to XHTML webpages.
 
T

Toby Inkster

leke said:
I need a language that is relatively quick and easy to learn, and is
supported by many Web hosts (including free ones).
[...]
I know most servers support Perl, but I want to try and steer clear of
Perl because it frightens me (well Perl and Regular Expressions).

Perl can look scary, but it's actually pretty easy. Although lines like:

$x=~s#foo#bar#gi;

can look very confusing (in the above example, could be made a lot clearer
with better spacing and some comments!) you'll find that Perl's flexibility
allows you to code the way that you think; and doesn't force you to think
the way that you code.

PHP is quite similar to Perl. The syntax *looks* a lot cleaner but in
reality the language is just as much of a mess as Perl -- maybe more so.
For reference the above line of code in PHP would be:

$x = preg_replace('/foo/', 'bar', $x);

C is very widely supported, but realistically you will need shell access
to the server to use C. The C language itself is quite clean, but it's not
really specialised towards string manipulation like Perl and PHP are, so
you'd end up doing a lot more work to achieve the same effect.

Shell scripting (bash, tcsh and friends) are supported very widely too.
Again, they're not as good at string processing as Perl and PHP, but they
do come in handy for a lot of simpler scripts.

Python is another option, though not as widely supported as the others.
I'm not all that familiar with it though, so I'll defer judgement. Ditto
Ruby.

If you're on a Windows host then you can probably script in any language
supported by the WSH, which includes Perl and Python and also JScript and
VBScript and a few others.
 
L

Leif K-Brooks

leke said:
I solely want learn a programming language for doing CGI scripts.

Try Python. It has very clear code, and the web host support should be
reasonably decent.
 
M

Mitja

leke said:
Not sure if this is the right place to be asking this...
I'm a graphic designer just moving into CGI web page
creation. I solely want learn a programming language for
doing CGI scripts.
I need a language that is relatively quick and easy to
learn, and is supported by many Web hosts (including free
ones).

For a beginner, I'd recommend python - it's very intuitive and easy to learn while at the same time powerful enough for nearly
anything. Support is not as good as that for perl, but if you find an appropriate host, I'd say go for it.

If getting as wide a range of hosts as possible is what really counts, then php is probably the way to go, though perl and asp are
very well supported on linux and windows-based servers, respectively. It is however true that perl can be complicated for a beginner
and that asp lacks power and is often clumsy - so that's why php.
 
M

Mel

leke said:
Not sure if this is the right place to be asking this...
I'm a graphic designer just moving into CGI web page creation. I solely
want learn a programming language for doing CGI scripts.
I need a language that is relatively quick and easy to learn, and is
supported by many Web hosts (including free ones).
I have done lots of browsing, but without a good, long time working
knowledge of languages it's hard to judge what's best.

What I know (which is not a lot):
I know most servers support Perl, but I want to try and steer clear of
Perl because it frightens me (well Perl and Regular Expressions).
I'm learning REBOL at the moment because I think it's real easy for
doing CGI stuff (and no Regex)!
Only thing is that not a lot of hosts support REBOL (and no free ones
at present).

Which languages are you guys using to do your CGI?
Heard of any new languages worth having a look at?

Thanks ,
L.

You can Try: http://Toolkit.RedOlive.com
Its a complete programming environment using "REAL-LANGUAGE" instead
of <@#$> tags. You make a function call to get a tabnotebook, error
dialog etc. It is free for personal use and you will be up and running
in less than 5 minutes. Resonable doumentation and a Sandbox to play
with. Cut and paste examples into the sandbox and see what you get,
then move it to your application.

Mel
 
A

Art Sackett

Alan said:
Look at php - you can do anything perl can do without the hassle

Um, no, PHP cannot do anything that perl can do. It might appear that
way to someone who doesn't grok perl, and that someone might be well
served by PHP, but that's not the same as doing everything perl can do.
 
A

Andy Dingley

Which languages are you guys using to do your CGI?

I haven't done CGI in years. I write server back-ends, but I don't
use CGI to connect to them.


As a suggestion for languages, I'd suggest PHP. It's not very good,
but it's relatively easy to learn and it's dead easy to find hosts
for.

If you do want to use Perl, go with mod_perl rather than CGI
(naturally you'll be using Apaches as the web server)
 
N

Nik Coughin

Art said:
Um, no, PHP cannot do anything that perl can do. It might appear that
way to someone who doesn't grok perl, and that someone might be well
served by PHP, but that's not the same as doing everything perl can
do.

Maybe not so in practise, but in theory can't any Turing-complete language
do anything that any other Turing-complete language can do? What can Perl
do that PHP can't? I'm not trying to start a debate BTW, I'm just curious.
 
W

WebcastMaker

Not sure if this is the right place to be asking this...
I'm a graphic designer just moving into CGI web page creation. I solely
want learn a programming language for doing CGI scripts.

God forbid someone suggests ASP.
 
A

Adrienne

God forbid someone suggests ASP.

ASP has its good points, it's pretty easy to use. The only real problem is
ASP seems to want to use components, and they're usually not free. That's
why I'm a roll yer own kinda gal.
 
T

Toby Inkster

Nik said:
Maybe not so in practise, but in theory can't any Turing-complete language
do anything that any other Turing-complete language can do?

True, but there are some things that are infintely easier in Perl than
PHP.

For example, writing a GUI media player in PHP would be hard because
AFAIK PHP doesn't have any libraries to play multimedia files -- you'd
have to write those functions and *then* write your media player. Compare
this with Perl where you can write an OGG player in under 350 lines of
code:
http://tobyinkster.co.uk/jukebox
 
S

Shailesh Humbad

leke said:
Not sure if this is the right place to be asking this...
I'm a graphic designer just moving into CGI web page creation. I solely
want learn a programming language for doing CGI scripts.
I need a language that is relatively quick and easy to learn, and is
supported by many Web hosts (including free ones).
I have done lots of browsing, but without a good, long time working
knowledge of languages it's hard to judge what's best.

What I know (which is not a lot):
I know most servers support Perl, but I want to try and steer clear of
Perl because it frightens me (well Perl and Regular Expressions).
I'm learning REBOL at the moment because I think it's real easy for
doing CGI stuff (and no Regex)!
Only thing is that not a lot of hosts support REBOL (and no free ones
at present).

Which languages are you guys using to do your CGI?
Heard of any new languages worth having a look at?

Thanks ,
L.

If you want support of free hosting, then PHP is definitely the way to
go. You can go learn Perl if you want to know what things like $_ and
@! mean, otherwise go with PHP and you deal with things like $_SERVER
and $_POST. For large applications developed by many people, ASP.Net
is great, but in your case the extra hosting cost might not make it
worth your while. Someone suggested C, but I'd steer away from that.
Only if you need maximum speed, use C++ with STL.

Here is a quick and dirty PHP tutorial I made a long time ago:

http://www.somacon.com/phptutorial/

Regex are scary because they are so condensed. It is literally like
learning a new alphabet in a different language, with who knows how
many characters (maybe 50). I swear it was easier for me to learn the
Hindi alphabet than it was for me to learn the Regex alphabet. Here
is a quick Perl intro I wrote a little while ago:

http://www.somacon.com/docs/perl_regular_expressions_by_example.php
 
R

rf

Toby Inkster
True, but there are some things that are infintely easier in Perl than
PHP.

For example, writing a GUI media player in PHP would be hard because
AFAIK PHP doesn't have any libraries to play multimedia files -- you'd
have to write those functions and *then* write your media player. Compare
this with Perl where you can write an OGG player in under 350 lines of
code:
http://tobyinkster.co.uk/jukebox

Now *I* am confused.

Are not Perl and PHP server side things (yes I know IIRC perl can be used to
"write" things);

Is a server side thing ever expected to be able to play MM files and do GUI
stuff? That is surely the realm of client side. Who would be "listening" to
the server side MM? The webmaster? It would be a cacophony :)

Rephrasing the question posed: As a *server side thing*, and limited to a
*server side stuff* how is Perl better than PHP?

The OP clearly states CGI languages, implying server side. Or, on the other
hand, am I missing something :)
 
T

Toby Inkster

rf said:
Toby said:
For example, writing a GUI media player in PHP would be hard because
AFAIK PHP doesn't have any libraries to play multimedia files
[...] http://tobyinkster.co.uk/jukebox

Are not Perl and PHP server side things (yes I know IIRC perl can be
used to "write" things); [...] That is surely the realm of client side.
Who would be "listening" to the server side MM?

The media player is most certainly client side -- there is no server -- it
has nothing to do with the web -- it's just written in Perl.
Rephrasing the question posed: As a *server side thing*, and limited to
a *server side stuff* how is Perl better than PHP?

We drifted off mere server-side processing into a more general "Perl can
do stuff PHP can't" and "But they're both Turing-complete so you can
translate from one to the other" thread.
 
D

Dylan Parry

Spake Shailesh Humbad unto thee:
Regex are scary because they are so condensed.

Yes, regular expressions are indeed scary on first glance, but they are
probably one of the most useful things one can ever learn! I'd suggest
that anyone who wants to learn to program should at some point take a look
at Perl Regexp, as this type seems to be used by so many other languages
in addition to any other format they support.

Regexp are so useful and can do so many different things, from email
address syntax checking to query string formatting in SQL. It's all good :)
 
M

Matthias Gutfeldt

Art said:
Um, no, PHP cannot do anything that perl can do. It might appear that
way to someone who doesn't grok perl, and that someone might be well
served by PHP, but that's not the same as doing everything perl can do.

OK, so what can Perl do that PHP can't do? Besides giving me splitting
headaches, that is.


Matthias
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top