[mapguide-users] PHP to ASP
Thomas M. Tuerke
thomas.m.tuerke at autodesk.com
Fri Mar 24 18:17:26 EST 2006
Hi Randy,
I'd have to agree with Alain here. Classic ASP is all COM-based, so
while the script logic might port fairly easily, the barrier would be
communication between ASP and the outside world.
You would have to either write your own marshalling code for custom
interfaces, or do some very clever IDispatch work. For anything but the
most trivial access to the interfaces, this is a big chunk of work.
Fortunately, as SWIG shows, it can be automated.
A head-start might be found in the .NET "COM-Callable Wrapper"
facilities. That gives you a COM interface to a .NET component; it's
been a while since I've looked at that, but applying that to the .NET
APIs might help you get some IDL, and maybe some "unmanaged" C++ code
with some of the marshalling in place.
Things to Google for more information include COM Callable Wrapper, CCW,
Runtime Callable Wrapper, RCW, and TLBIMP.exe.
- Thomas
_____
From: Alain Lebatard
Sent: Friday, March 24, 2006 2:34 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] PHP to ASP
Randy,
I'm not an expert on ASP, but I think the PHP scripts would not be
difficult to rewrite in ASP. However there is a big problem beyond
porting the script code. The scripts make an extensive use of the
MapGuide API, which is a C++ class library. We have provided wrappers to
this C++ API so you can instantiate a C++ class and call methods on it
from PHP, JSP or ASP.NET. Because wrapping manually the whole API for
our 3 target platforms is a huge work, we used an open source tool named
SWIG which automates that task. We modified SWIG to add the capabilities
that were needed for our API.
Correct me if I'm wrong but I think the way to call C++ code from ASP is
like for VB through COM interfaces. If that is true you need to
implement a COM wrapper for each MapGuide API class. It's probably
something you could do manually but it is a lot of work. I'm not sure if
there are tools around that can help you with this the way SWIG helped
us. In any event, I'd say it's a difficult task.
Alain
_____
From: Randy Glen Johnson [mailto:rjohnson at maintenanceconnection.com]
Sent: Friday, March 24, 2006 2:06 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] PHP to ASP
I don't want asp.net... I am looking for asp.
Best Regards,
Randy Glen Johnson
Programmer Analyst
Maintenance Connection, Inc.
1-888-567-3434 ext 800
http://www.maintenanceconnection.com
<http://www.maintenanceconnection.com/>
-----Original Message-----
From: Robert Bray [mailto:robert.bray at autodesk.com]
Sent: Friday, March 24, 2006 2:01 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] PHP to ASP
Randy,
Which PHP pages are you referring to? Everything but the Admin tool is
available in PHP, ASP.NET, and Java. PHP and ASP.NET can co-exist, so
what's the issue?
Bob
_____
From: Randy Glen Johnson [mailto:rjohnson at maintenanceconnection.com]
Sent: Friday, March 24, 2006 1:26 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] PHP to ASP
I have a need to be in ASP. Would it be possible to re-write the PHP
pages in ASP? Is there stuff being done in the PHP that only PHP can
do? Or would it be too much work?
Just looking at some of the pages it looks possible but I would rather
ask first....
Best Regards,
Randy Glen Johnson
Programmer Analyst
Maintenance Connection, Inc.
1-888-567-3434 ext 800
http://www.maintenanceconnection.com
<http://www.maintenanceconnection.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060324/f801b878/attachment.html
More information about the Mapguide_users
mailing list