Changes between Version 17 and Version 18 of MapGuideArchitecture


Ignore:
Timestamp:
11/23/12 10:23:37 (12 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideArchitecture

    v17 v18  
    1010||1.0||November 24, 2008||Bruce Dechant||Updated various sections||
    1111||1.0||February 12, 2010||Jackie Ng||Described Shared Components||
     12||1.0||November 24, 2012||Jackie Ng||Described Web Tier Components||
    1213
    1314[[PageOutline(2-4,Table of Contents,inline)]]
     
    6162
    6263==== MAESTRO ====
    63 TBD
     64See [wiki:maestro] for an overview
    6465
    6566==== SITE ADMINISTRATOR ====
     
    8485The following components under MgDev\Common are shared and reused across the entire MapGuide source tree, and can be used outside of MapGuide.
    8586
     87[http://mg-desktop.googlecode.com mg-desktop] and [http://www.georest.org GeoREST] are examples of applications using these shared MapGuide components.
     88
    8689=== !MgFoundation ===
    8790
     
    119122Source: MgDev\Common\PlatformBase
    120123
    121 Defines the base platform API. Extended in MapGuide as MgMapGuideCommon.dll. Extended in AutoCAD Map as the Geospatial Platform API. Extended on the MapGuide Server side as MgServer*.dll
     124Defines the base platform API. Extended in MapGuide as MgMapGuideCommon.dll. Extended in AutoCAD Map as the Geospatial Platform API. Extended on the MapGuide Server side as MgServer*.dll. Extended also in [http://mg-desktop.googlecode.com mg-desktop]. Code that operates on classes defined in this library can generally work across these various implementations.
    122125
    123126=== !MgRenderers ===
     
    174177 * FDO Property Definitions (Object and XML representation)
    175178 * Coordinate Systems
     179
     180Invalidation of cached FDO information is generally triggered on saving of any related Feature Source documents.
     181
     182Invalidation of Tile Caches is triggered on saving of the Map Definition or any of its upstream dependent resources. This is generally acknowledged as a [http://osgeo-org.1560.n6.nabble.com/Avoiding-unnecessary-Tile-Cache-invalidation-Trac-Ticket-1332-td4211581.html overly aggressive measure] that could definitely use with some refinement.
    176183
    177184==== Windows ====
     
    253260The following table describes the session object properties that will be associated with each connection.
    254261
     262TBD
     263
    255264== Web Tier Component Architecture ==
    256265||[[Image(image3.jpg)]]||
     
    259268TBD
    260269
     270=== Language Binding Generation ===
     271
     272MapGuide's core and API is all C++. To make the MapGuide API available to higher level languages, the following set of tools are used to generate the necessary bindings in .net/Java/PHP:
     273
     274 * A modified version of [http://www.swig.org SWIG]
     275 * [http://trac.osgeo.org/mapguide/browser/trunk/MgDev/BuildTools/WebTools/IMake IMake.exe]
     276
     277You can see the design of the C++ classes in the MapGuide API mostly being a convention-based lowest common denominator approach to facilitate the ease of language binding generation to the 3 platforms. The C++ classes in the MapGuide API do not use C++ features that may not be expressible or convertible to the target language. Some examples include:
     278
     279 * enums (not supported by PHP)
     280 * const correctness (not supported and/or expressible in .net/Java/PHP)
     281 * Pass-by-reference (not supported and/or expressible in PHP/Java). Where possible, C++ classes employ "boxing" to work around this (see [wiki:MapGuideRfc44] for an example
     282
     283==== Build process ====
     284||[[Image(SWIG build process.png)]]||
     285||Figure ? - SWIG build process for generating PHP/Java/.net wrappers for the MapGuide API||
     286
     287IMake.exe reads from 2 XML files:
     288
     289 * Constants.xml (for .net this is split into 5 different files due to [wiki:MapGuideRfc68], but the same principle applies)
     290 * MapGuideApiGen.xml (for .net this is split into 5 different files due to [wiki:MapGuideRfc68], but the same principle applies)
     291
     292These two files mainly define:
     293
     294 * The paths of the header files of the MapGuide public API
     295 * SWIG input file generation options
     296
     297IMake.exe takes these 2 files and produces the following:
     298
     299 * A set of source files in the target language, defining the various constants in the MapGuide API
     300 * A SWIG input file containing a "sanitized" class definition from each header file
     301
     302IMake.exe looks for special #define'd markers in the header files:
     303
     304 * `PUBLISHED_API`: Members under here are included in the sanitized class definition and represent the public API
     305 * `INTERNAL_API`: Members under here are excluded from the sanitized class definition
     306 * `EXTERNAL_API`: Members under here are included in the sanitized class definition and represent undocumented public APIs that are not for general use (but nothing stops a MapGuide application developer from using them)
     307
     308Because C++ does not expose the concept of internal visibility, this IMake build system in conjunction with the above markers approximates this type of desired encapsulation.
     309
     310Once the SWIG input file is generated, it is then fed to SWIG which will do the following:
     311
     312 * Generate the source code for the managed-native interop glue library
     313 * Generate the MapGuide API proxy classes that call into this managed-native interop glue library
     314
     315SWIG will use whatever supported native interop mechanism that is provided by the target language:
     316
     317 * For Java, this is [http://en.wikipedia.org/wiki/Java_Native_Interface JNI]
     318 * For .net, this is [http://en.wikipedia.org/wiki/Platform_Invocation_Services P/Invoke]
     319
     320Once SWIG has generated the files, MSVC/gcc is used to compile the glue library while csc/javac is used to compile the proxy classes into a matching assemblies/jar file. These two binary outputs, combined with the [http://trac.osgeo.org/mapguide/wiki/MapGuideArchitecture#SharedComponentOverview shared component binaries and its dependencies] comprises the final set of binaries needed to build a MapGuide application
     321
     322==== .net binding specifics ====
     323
     324IMake.exe has special behavior for .net. You may see markers like these throughout the MapGuide headers:
     325
     326 * `__get`
     327 * `__set`
     328
     329In addition, you may see files [http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/DotNetUnmanagedApi/Foundation/FoundationCustom liek this]
     330
     331These files and markers serve as hints to IMake to do the following:
     332
     333 * Generate a read-only property for any method with a `__get` marker. Generate a regular property for a method if a `__get` and `__set` marker. Such methods follow a convention of being applied to any method of the form Get<Name>. So IMake will generate an equivalent property named <Name>
     334 * Apply .net exception serialization info for each file
     335
     336=== mapagent ===
     337
     338TBD
     339
     340=== AJAX Viewer ===
     341
     342TBD
     343
    261344== Configuration Settings ==
    262345