PERL,PHP,CGI

John Hockaday johnh at erin.gov.au
Thu Jun 22 16:34:22 PDT 2000


I am sending this to the list so that Bertha doesn't get inundated with
replies.  Please ignore this message if you know about PHP, PERL and
CGI.

Hi Bertha,

There are several differences between PHP, PERL and CGI.

Simply:

	PHP is like Hypertext Markup Language (HTML) in which it uses
	tags to build a template that will allow access to a database
	through the World Wide Web (WWW).  It is very simple to use as
	you only need to know about HTML and understand the concepts of
	templates and accessing databases.

	PERL is a scripting language that can do almost anything that
	any other programming language can do.  It is really easy to
	use because you don't have to declare variable types, you just
	use them.  It doesn't have some Object Oriented (OO) features
	as in JAVA and C++ etc. but it is still very powerful. There are
	so many PERL packages that do specific things you usually don't
	have to do much programming other than calling these packages
	and using them to suit yourself.  Packages are usually located
	at the Comprehensive Perl Archive Network (CPAN) site (
	http://www.perl.com/CPAN/ ) and PERL can be accessed via (
	http://www.perl.com/ )

	CGI (Common Gateway Interface) is a way of a WWW server
	delivering dynamic HTML pages to a WWW browser via Hypertext
	Transfer Protocol (HTTP).  It can be written in any programming
	language as it is just an executable that runs when an HTML
	form is submitted.  (There're other ways but this is a simple
	explanation to get you started.)  You must have a WWW server
	set up on a machine that allows access to it via HTTP and
	usually a dedicated port such as port 80.

	HTTP is a "stateless" connection.  That is, the WWW browser
	connects to the WWW server, the server does what it is asked to
	so and then closes the connection to the WWW browser.  The next
	time the same WWW browser contacts the WWW server the WWW
	server treats it as a completely new connection.

You are probably wondering what to use to suit your needs.

	With all of these you will need to have a good idea of HTML or
	a very good book on HTML as is seems that your need is to
	deliver HTML pages.

	To deliver HTML pages you need a WWW server.  Apache is free
	and good.

	If you just want to access a database and present them on the
	WWW and you don't have programming skills then PHP may be the
	answer.  It will handle the CGI part of the WWW accesses and
	via your templates it will present information accessed to the
	database.  It is simple but limited.

	If you know how to program then PERL is for you.  It allows you
	to access a database via the DBI package and allows you to
	build CGI scripts via the CGI package.  Lots of other packages
	will help you with other bits and pieces like the IO package
	for accessing files etc.  Just remember to look at CPAN before
	you try to do anything as it may already have been done for
	you.

	If you have complicated WWW server needs and need to keep on
	passing information back and forwards from the WWW browser to
	the WWW server then you should be looking at Java servlets.
	These make a "stateful" connection and so know what the WWW
	browser has asked from a previous WWW page.  It is faster than
	CGI because it doesn't have to keep on passing information
	about the previous WWW connection.  Java is a full OO except
	that it doesn't allow multiple inheritance.  However, you can
	get around this by inheriting from one class and then
	implementing from many other classes.

You will have to match you skills to what you want to do.

I have given a very simple explanation. I hope that I have correctly
interpreted what you were asking.  If not, then I am sorry for this
lengthy explanation.

Good luck. ;-)


Johnh

> Date: Wed, 21 Jun 2000 13:16:25 -0700 (PDT)
> From: bertha amalia serrato de la cruz <bertha_bonita at yahoo.com>
> Subject: PERL,PHP,CGI
> To: MAPSERVER <mapserver-users at lists.gis.umn.edu>
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
> 
> hello
> 
> i need know the diference betweem PHP,PERL and CGI
> what's better?..
> where can i found information?, i would like learn PHP
> and PERL but the link in the mapserver page " not
> found"
> 
> what is more comfortable for using wtih mapserver?
> Why?
> 
> i'm waiting for a soon answer
> 
> =====
> *--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>     Bertha A. Serrato
>     bserrato at cicese.mx
>     CICESE,División de Ciencias de la Tierra.
>     Ensenada, B.C.
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> 
> __________________________________________________
> Do You Yahoo!?
> Send instant messages with Yahoo! Messenger.
> http://im.yahoo.com/




More information about the MapServer-users mailing list