Python vs PHP vs Perl mapscript

Sean Gillies sgillies at FRII.COM
Tue Jan 18 15:19:05 PST 2005


Jon,

You are welcome.  There is no wiki right now, but I hear that the
target for a new one is mid-Spring.

cheers,
Sean

On Jan 18, 2005, at 12:40 PM, Jon Saints wrote:

> Wow...
>
> Thanks so much Sean. I believe that this is a great
> overview. Is there a mapserver wiki somewhere where we
> could publish this information.
>
> Jon
>
>
> --- Sean Gillies <sgillies at FRII.COM> wrote:
>
>> On Jan 18, 2005, at 10:38 AM, Jon Saints wrote:
>>
>>> Hi
>>>
>>> Are then advantages/disavantages in terms of
>> features
>>> of using mapscript in python, perl, or php?
>>>
>>> Does one mapscript have more functionality than
>>> another? Is one developed more heavily?
>>>
>>> Thanks
>>> Jon
>>>
>>
>> Jon,
>>
>> The Python and Perl modules are generated from the
>> same templates with
>> a few extra useful methods that are implemented only
>> for Python:
>> enhanced imageObj constructor and image output, for
>> example.  Other
>> than that, they are equivalent.  Python benefits
>> from having many usage
>> examples within the mapscript unit tests, but any
>> Perl hacker can
>> translate the unit tests to their own scripts.
>> Python hooks up to
>> other open source GIS software like GDAL/OGR, GEOS,
>> and OpenEV better
>> than Perl or PHP, and this is a big plus.
>>
>> All the mapscript modules share a great deal of core
>> code: layer and
>> map drawing, querying, etc.  The PHP interface is,
>> however, developed
>> separately from Python and Perl's, does not benefit
>> from the other
>> mapscript unit tests, and in the past year is a bit
>> behind the
>> Python/Perl mapscript in features and rate of
>> development.  The main
>> difference is that the PHP module lacks a number of
>> methods for cloning
>> layers, classes, and styles, and for inserting and
>> deleting these from
>> their "parent" objects.  Correct me if I am wrong
>> (Daniel?), but I
>> think that the original PHP mapscript developers'
>> resources are
>> currently spent on a higher-level software product
>> instead of on the
>> lower level mapscript.  The Python (and related)
>> mapscript module has
>> undergone more rapid development because of the
>> needs of my ZMapServer
>> and Cartographic Objects for Zope software, but most
>> users will not
>> need these extra features.
>>
>> As I have said before, PHP is unrivaled for web
>> pages that have a
>> relatively small amount of logic behind them.  It is
>> fast and the
>> platform is mature and well supported.  The PHP
>> mapscript has proven
>> itself to be very useful.  For larger applications
>> that just so happen
>> to have a web interface, you'll want to consider a
>> less web-oriented
>> language that is OO and easy to profile, test, and
>> refactor.  IMO, this
>> means Python rather than Perl.
>>
>> cheers,
>> Sean
>>
>> --
>> Sean Gillies
>> sgillies at frii dot com
>> http://users.frii.com/sgillies
>>
>



More information about the MapServer-users mailing list