= !MapGuide RFC 68 - Refactoring Web .NET API into Common DLLs = This page contains an change request (RFC) for the !MapGuide Open Source project. More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. == Status == ||RFC Template Version||(1.0)|| ||Submission Date||June 23, 2009|| ||Last Modified||Leaf Li [[Timestamp]]|| ||Author||Leaf Li|| ||RFC Status||adopted|| ||Implementation Status||under development|| ||Proposed Milestone||2.2|| ||Assigned PSC guide(s)||Bruce Dechant|| ||'''Voting History'''||July 6, 2009|| ||+1||Andy, Bruce, Kenneth, Tom|| ||+0||Jason, Paul|| ||-0|||| ||-1|||| ||no vote||Bob, Haris|| == Overview == This proposal is to refactor MapGuide Web .NET API to some common dlls. == Motivation == Currently all MapGuide Web .NET API is in one single dll !MapGuieDotNetApi.dll, which includes Foundation, Geometry, !PlatformBase, !MapGuideCommon, !WebApp and !HttpHandler components. It is nearly impossible for users to reuse some of functionality outside of MapGuide because MapGuide .NET Web API depends on MapGuide enviroment. For example, users can't use coordinate system transformation functionality outside MapGuide. So the key motivation of this RFC is to make MapGuide Web .NET API more reusable so that more projects or products can get benifits from MapGuide. == Proposed Solution == In order to make backward compatible with the existing MapGuide applications, the old assembly!MapGuieDotNetApi.dll still exists. However, it contains some TypeForwardedTo attributes only. TypeForwardedTo attribute allows you to move a type to another assembly without having to recompile applications that use the original assembly. This is solution that Microsoft recommend to keep backward compatibility of .NET API. You can get more information about TypeForwardedTo attribute from MSDN. http://msdn.microsoft.com/en-us/library/ms404275.aspx (a) Create the following new assemblies. * OSGeo.!MapGuide.Foundation.dll: contains API in Foundation component. * OSGeo.!MapGuide.Geometry.dll: contains API in Geometry compoent. * OSGeo.!MapGuide.!PlatformBase.dll: contains API in !PlatformBase component. * OSGeo.!MapGuide.!MapGuideCommon.dll: contains API in !MapGuideCommon compoent. * OSGeo.!MapGuide.Web.dll: contains API in !WebApp and !HttpHandler components. (b) Create the following assembly by adding the reference to five assemblies above and some TypeForwardedTo attribute. For example, [assembly: TpeForwardedTo(typeof(OSGeo.MapGuide.MgFeatureService))]. * !MapGuideDotNetApi.dll == Implications == Currently, there is no enough resources and funding to refator PHP and Java API. They may be implemented if resources and funding can be obtained in the future. == Test Plan == Run the existing unit tests. No need to add new unit tests. == Funding/Resources == Supplied by Autodesk. == Addendum, Sept. 09, 2009 ==