[Mapserver-dev] Modularizing mapserver

Frank Warmerdam warmerdam at pobox.com
Thu Sep 16 11:34:22 EDT 2004


Sean Gillies wrote:
> I'm building mapserver on a new platform today and am reminded
> that mapserver needs some reorganization of its source.
> 
> Currently, every file is lumped under mapserver/ and every file
> is a build target that may or may not have an #ifdef bracketing
> its code.  Wouldn't it be better to handle conditional compilation
> of packages (such as PDF, iamgemap, SWF) in the makefile than in
> the source?

Sean,

In fact, I think I prefer to control this within the source itself rather
than in the makefile.  It means makefiles are not so complicated, and the
key is to just get the right USE_ defines somewhere.

Others may disagree, but so far I don't see any compelling reason to
reorganize the source and it smells like "churn" to me.

I don't want to be too anti-progress, but the benefits seem murky at
best, but the downside of disruption does seem clear.  I have yet to
wrap my mind around the breaking down of mapscript.i into sub modules.
I have gone into mapscript.i several times searching for the map object
and failed to find it only to realize later that it had been moved
into a submodule in a different directory.

I think the mapscript.i reorganization was useful but even that small
step was hard for my ossified old mind.

 > Speaking of conditional compilation: some files like mapimagemap.c
 > and mapmygis.c that are clearly (IMO) non-core code are compiled
 > whether the user wants them or not.  Would the developers of these
 > files be willing to work with me to start on a source reorganization?

I'm not sure why you say that mapimagemap.c is non-core.  It provides somewhat
esoteric capabilities, but doesn't depend on any external libraries.  It isn't
terribly large.  Why not always build it in?  At least it is one less thing
for people to always ask for a custom build in order to get it included.

The mapmygis.c seems to be bracketed in a use USE_MYGIS ifdef like the
other providers (ogr, postgis, oracle, etc).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-dev mailing list