Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2002
    Location
    Michigan
    Posts
    19

    What language is the easiest to learn? PHP or CGI

    What language is the easiest to learn PHP, or CGI. Is their a large difference between the two languages. Also which one do you think is better?

    I'm intererested in putting a topsite toplist on the main page of my website.

    Thanks guys for your comments, in advance.

  2. #2
    Join Date
    Aug 2001
    Location
    United kingdom
    Posts
    1,003
    PHP is definitely easier to learn than CGI/Perl. I used to always code in Perl, but then got interested in PHP and started to do all coding in PHP/MySQL. Both languages are more or less the same, you'll find function names are either the same or similar. If you want a top list script, you could try HotScripts.com, they'll have a list of the many top site scripts available on the web for free (that's if you don't really want to learn a language).

    Alan
    Alan Ho
    Former Systems Administrator

  3. #3
    Join Date
    Jul 2002
    Location
    UK
    Posts
    169
    I used to code perl untill I found out about php.

    php is definately easier to code, its nearly the same but has less - to put it bluntly - crap.

    You could code your own php/mysql top sites list within 2 - 4 weeks of learning some php. I did it

  4. #4
    Join Date
    Oct 2000
    Location
    Australia
    Posts
    538
    I think most people tend to agree that PHP is easier to learn than Perl (note that CGI isn't a language, it's an interface, and you can run PHP under CGI if you want, but I assume you mean Perl, as it is most commonly run under CGI). Perl is more versatile than PHP, however, and is commonly used for many other tasks beyond web development as well.

    If you're just interested in web development, PHP is probably the way to go. If you're looking longer term to get into programming, Perl is perhaps a better choice.

  5. #5
    Join Date
    Feb 2002
    Location
    UK
    Posts
    3,100
    Php

  6. #6
    Join Date
    Aug 2002
    Posts
    96
    PHP is definately easier.

  7. #7
    Join Date
    Jan 2002
    Location
    United Kingdom
    Posts
    1,287
    PHP.
    Bannaz™ | Amazing HTML5 Banner Ad Designer!
    Leading designers in online advertising
    Need banners? Visit our Website

  8. #8
    CGI is no language, wonder what you mean...

  9. #9
    Join Date
    Feb 2002
    Location
    UK
    Posts
    3,100
    Cgi = Perl

  10. #10
    Join Date
    Mar 2002
    Location
    Westbury, LI NY
    Posts
    1,705
    Originally posted by Darth
    Cgi = Perl
    cgi != perl

    CGI stands for "Common Gateway Interface".

    What language are CGIs written in? Almost any scripting or programming language, although of course the language has to be one which runs on your Web server's platform. The most common language for creating CGI scripts is Perl (stands for "Practical Extraction and Report Language" -- sound like something your dentist would enjoy?). Perl is a very flexible and powerful language and is especially good at handling text (doing sophisticated search and replace with wildcards, for example). It also has the advantage of running on all platforms (sometimes requires small modifications to port form one system to another). I like to try out new Perl scripts on my Mac Powerbook, where I can run both server and browser locally, then upload the script to the university Unix server once it's working. That way I can get the bugs out before crashing the university's server.


    Another cross-platform option is C or C++, a complex programming language whose learning curve is probably prohibitive for folks who want to have a family life. However, if you have the time and ambition, C will offer the best performance in CGI's. On Windows Web servers Visual Basic (VB) is often used for CGI's. If you're worked in VB already, this is clearly the way to go, if not it may not be as good a choice as Perl if you're thinking in terms of educational use where you'll likely be doing a lot of text parsing and processing. There are a good number of VB scripts available off the Internet as well as scores of books. Microsoft is the patron of VB so it is likely to be around for a while. In fact Microsoft has introduced VBScript as a competitor to JavaScript. VB does not run on Unix or Mac servers.


    On Mac servers a variety of languages are used, most commonly AppleScript and Frontier. Of all the possible CGI languages AppleScript is the easiest to learn. As compared to Perl or C you can actually read and understand most scripts written in AppleScript. The commands actually look like English (rather than cryptic geekspeak). By the way, there are versions of AppleScript for many different (human) languages. So you could write your AppleScript CGI in French or Spanish. You can pick up AppleScript especially quickly if you're worked at all in HyperCard or Toolbook -- the syntax is very similar. As matter of fact you can also use HyperCard to write your CGI's; versions 2.0 or higher allow you to write your scripts in Hypertalk or AppleScript.


    Another popular CGI choice on Mac servers is Frontier. Frontier has a steeper learning curve than AppleScript, but it runs faster, has more built-in functionality, and is multi-threaded. Multi-threaded means that the CGI can service more than one user at the a time. Otherwise a new user must wait until the CGI is done with its current user. This is actually in most cases not as big an issue as it may sound. Most CGI's execute in a couple of seconds; the ones which take longer are probably writing data to a log file or database, operations which normally can only happen one user at a time. Frontier is also now available for Windows.

  11. #11
    Join Date
    Aug 2002
    Location
    Long beach
    Posts
    113
    PHP is easier to learn. There are many free scripts also available on the net.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •