MapServer / MapServer-import

3 stars 2 forks source link

Unification of SWIG and PHP mapscript API #574

Closed tbonfort closed 12 years ago

tbonfort commented 12 years ago

Reporter: sgillies@frii.com Date: 2004/02/19 - 15:37

Goal: Bring the SWIG and PHP mapscript APIs near enough to where it's useful
to merge the documentation.

Here are some differences that need to be worked out:

Class Names
-----------

SWIG mapscript has classes which are named after the structs in map.h like
'pointObj', etc.  The PHP README contains classes like 'PointObj', 'pointObj',
'pointObject'.  I don't know whether PHP is case insensitive or not, but the
SWIG modules are, and we'll need to settle on unified class names.

While we are at it, what about renaming the classes to remove the superfluous
'Obj' suffix and capitalize the names?  In most OO languages the convention
is that classes have capitalized names.   Instead of mapscript.layerObj we
would have mapscript.Layer which is better.

(another aside: we should really rename a merged API to 'mapserver' instead of
'mapscript')

Function/Method Names
---------------------

I've been following the original SWIG mapscript style which is camel case.
The PHP README has some camel case, some completely lower case function names.

Function Arguments
------------------

I am currently refactoring many constructors to take optional arguments.  You
can see this with colorObj and rectObj.  Is this feasible with PHP?  Yes, I
have assumed.

Any other issues that you see?
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2004/05/29 - 00:59

All the action has been in bug 575.  I'll move some of this stuff to the wiki.