PHP/MapScript or CSharp/MapScript?

Tamas Szekeres szekerest at GMAIL.COM
Fri Jun 2 07:04:09 PDT 2006


Hi Zhonghai,

First of all PHP mapscript and C# mapscript (as part of the SWIG line)
are standing for a completely different implementation, however the
functionality is almost the same.

If you want to utilize and enhance the extensive functionality of
mapserver you might want to use the C# mapscript as you can use the
other language bindings as well.

The C# mapscript interface is known stable, and uses the .NET platform
invoke mechanism for the communication between the C and the C# parts
(mapscript.dll and mapscript_csharp.dll on windows for example). You
can use the object model of the C# interface (contained in the
mapscript_csharp.dll assembly) to achieve the required functionality
for your .NET application.

When using the mapscript C# API you have to take care of the threading
model of the host
process invoking the API. You have to compile mapserver with thread
support and avoid using the thread unsafe libraries. For more details:
http://mapserver.gis.umn.edu/docs/faq/thread_safety
Passing mapscript object between multiple threads is also unsupported.

The interface is tested mostly under MS .NET framework 1.1 and MONO.
Using with .NET FW 2.0 you must compile the code with Visual Studio
2005. For the C# specific compilation issues visit:
http://mapserver.gis.umn.edu/docs/howto/mapscriptcscompile

So the C# interface is sufficient mostly with those applications the
threading model is controlled by the programmer. For example for
writing desktop applications is ideal.
For WEB applications you might want to use the MONO ASP.NET implementation.
The threading model of IIS is more sophisticated, so creating C#
mapscript WEB applications for IIS is not impossible but requires much
care.


Best Regards,

Tamas Szekeres


2006/6/2, Zhonghai Wang <zhonghaiw at gmail.com>:
> Hi guys,
>
> after developing a MapServer Demo application based on CGI mode, I realized
> that MapServer may be the best option for open source WebGIS development.
> Now I am trying to improve my demo with mapscript, since mapscript provides
> more powerful things for web GIS application. I noticed that there are
> different mapscript packages available for MapServer, such as PHP/MapScript
> and CSharp/MapSscript. Theorically CSharp MapScript may be the best option
> for me, because I am good at .NET thing, but I am not sure if the CSharp
> MapScript package is stable enough. I've searched a lot in Internet, and
> also in the MapServer user list achieves, it seems that most people are
> using PHP MapScript package for their web mapping application, does this
> mean that the PHP MapScript package is more stable than any other MapScript
> packages?
>
> I'd like your suggestions for my next step. PHP/MapScript or CSharp
> MapScript?
>
> thanks in advance.
>
>
> zhonghai
>
> 02.06.2006



More information about the MapServer-users mailing list