[mapguide-users] MgByteReader and XmlSerializer question

Maksim Sestic max at geoinova.com
Fri Oct 12 08:56:01 EDT 2007


Hi Kenneth,

You're right, still it would be such a pain to maintain custom .NET wrapper
:-) What I've done in past few days is, I created a small .NET library
exposing ready-made collections of resources, e.g. Maps, Layers, etc. in
their "native" form (MgMapCollection, etc). XML parsing is used sparely,
only for global resources enumeration (to certain level). There's an
abstract class relying on singleton structure to share certain data -
UserInformation, Connection, Session... to other classes inheriting it.
Works for now.

What I had to do was to separate, so to speak, external developers and MGE
API. So they don't have direct access to, say, features - but still can
perform certain oprations over them. On the other hand, they don't rely on
resource library structure since it changes frequently. Basic access
restrictions are still implied through MG.

Regards,
Maksim Sestic



Kenneth, GEOGRAF A/S wrote:
> 
> The .Net wrapper that is built from the MapGuide OS is very simple and 
> only passes messages onto
> the native Dll files. This means that a wrapper can use either 
> Enterprise or Open Source, depending on what
> native Dll's are present.
> 
> This means that you may use a custom Open Source wrapper for the 
> Enterprise API.
> 
> If you want to be restrictive, there are user administration avalible 
> within the MapGuide Server.
> 
> Regards, Kenneth, GEOGRAF A/S
> 
> 
> 
> Maksim Sestic skrev:
>> Kenneth, I'm stuck with commercial version of MGE... So, basically, What
>> I
>> See Is What I Get :-)
>>
>> My intention was to build a small .NET wrapper to offer some neatly
>> picked
>> functionality to 3rd party developers leaning on present MGE
>> implementation.
>> I can't let them browse data repositories as they will since I need to
>> keep
>> certain data "locked" on server side and actually never let the client
>> developer persist a full dataset copy with them. This .NET wrapper was
>> supposed to serve as an additional layer of protection between MGE API
>> and
>> potential 3rd party APIs/implementations. But it's purpose is not
>> restrictive in nature, it would also enable MGE administrators create and
>> modify maps/layers/etc. apart from external solutions depending on it.
>>
>> I'm currently working on exposing my .NET wrapper's methods to PHP users
>> via
>> COM interop. Present PHP's function for direct connecting to .NET objects
>> is
>> not working as expected. 
>>
>> As you may already guessed what's it all about - it's a city GIS used by
>> dozens of both municipal and infrastructure departments regionwide.
>>
>> Regards,
>> Maksim Sestic
>>
>>
>>
>> Kenneth, GEOGRAF A/S wrote:
>>   
>>> :D yes, that would be one way of coping with it.
>>>
>>> If you are up to the task, you can compile the mapguide server on your 
>>> own machine.
>>> After compilation, it will create the .cs files required for the
>>> wrapper.
>>> You can modify those to work as you want, but be aware that you will 
>>> need to keep your modifications up to date yourself.
>>>
>>> I am working on an alternate API, that uses Xml serialization to load 
>>> and save the objects, but its still needs some work.
>>>
>>> Regards, Kenneth, GEOGRAF A/S
>>>
>>>
>>>
>>> Maksim Sestic skrev:
>>>     
>>>> Hi Kenneth,
>>>>
>>>> Thanks for the tip, it saved me hours of trying. This also means that
>>>> we
>>>> need to write our own .NET wrappers over existing .NET wrappers to
>>>> include
>>>> proper object de/serialization... :-)
>>>>
>>>> Regards,
>>>> Maksim Sestic
>>>>
>>>>
>>>> Kenneth, GEOGRAF A/S wrote:
>>>>   
>>>>       
>>>>> Yes, you are missing a few key pieces of information.
>>>>>
>>>>>     
>>>>>         
>>>>   
>>>>       
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>>>     
>>
>>   
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/MgByteReader-and-XmlSerializer-question-tf4587994s16610.html#a13174213
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list