[Mapserver-users] Perl mapscript

Sean Gillies sgillies at frii.com
Fri May 23 10:45:13 EDT 2003


On Friday, May 23, 2003, at 02:00  AM, Mark Balman wrote:

> Hi All
>
> I want to start using mapscript but would like to know which is the 
> easier
> for a beginner - Perl or PHP? I tried to install php mapscript but 
> alas not
> yet! although I "think" I have installed perl mapscript ok but really 
> don't
> know where to begin, can anyone point me in the right direction..
>
> TIA
>
> Mark
>
Mark,

The knock against Perl MapScript in the past has been the difficulty
in building it on Win32 systems.  Perl is a very useful language to
learn, certainly, as there is a universe of contributed modules and
scripts.

PHP MapScript may be a better choice for rapid development of apps,
as PHP is easier to install than Perl products like Embperl.  PHP
MapScript has the most users and an active group of developers
and so has many, well-documented, functions and many examples.
PHP is of very limited utility outside of your web environment, so
not a good general purpose language to learn.

If you are looking to start from scratch, I recommend that you also
evaluate the Python flavor of MapScript.  Python is an excellent
general purpose language with its own universe of excellent
standard and contributed code modules.  Python web applications can
be built using a range of technologies from straight CGI (using
cgilib module), to HTML with embedded Python (using SPYCE for example),
or to full-fledged application servers using Twisted or Zope.

There are excellent Python GIS tools out there including AVPython
(Python interpreter embedded in ArcView), PySDE (Python interface
to ArcSDE), and GDAL, OGR, and Shapefile modules.

Python has exceptionally strong support for testing and profiling;
far exceeding those built in to Perl or PHP.  Add to this an
shell-like interpreter and you have a super environment for
coding and debugging web apps.

I have looked into all the 'P*' flavors of MapScript, and Python
MapScript is by far the easiest to build on Linux, Win32, and OS X.
Thanks to Python distutils, install is trivial.  Also included
with Python MapScript are unit tests that you can use to validate
your module.

Python MapScript's greatest defficiency is lack of formal documentation.
Most Python users refer to the Perl MapScript documentation as they
share much of the same code, and refer to extra documentation on the
MapServer Wiki site for Python-specific documentation.  New and
improved documentation will be coming with the next major release
of MapServer.

Hope this helps,
Sean

--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies




More information about the mapserver-users mailing list