[Mapserver-users] Python mapscript users - how do you feel about the module API?

Sean Gillies sgillies at frii.com
Mon Mar 1 13:45:58 EST 2004


Howdy,

I've been working on bringing mapscript development documentation
up to date so that we have a doc equivalent to the PHP mapscript
readme file.  During this work I am *constantly* reminded that
the names of the mapscript classes are awkward.  Well, actually,
when I am in a postive state of mind, the names are awkward.  When
I'm feeling a bit negative, the class names are ****** up. :)

IMO, we should have classes named

    Map, Layer, Class, Image, Layer, Legend, ...

these are consistent with established Python style conventions.  
'Class' is probably
the only awkward name in that list.

Instead we have mapObj, LayerObj, ... after a while writing or saying

   "... mapObj object ..."

you start to feel like there's an echo in here ... here.  Additionally, 
having class
names that start with lower case fosters confusion between classes and 
instances.

Ruby mapscript has a nice feel to it because SWIGRUBY forces class names
to be capitalized.  They have MapObj, LayerObj, ... better but still 
with
the obviously redundant *Obj suffix.

What do you think about the API?  Do you feel strongly one way or the 
other about
class names?

cheers,
Sean

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




More information about the mapserver-users mailing list