Flylib.com

Books Software

 
 
 

Section 4.3. Performance Considerations


4.3. Performance Considerations

When I mentioned that you would be using MapPoint 2004 COM interoperable assemblies from your managed code, you may have been worried about performance. There is reason to worry, mainly because the COM interoperable assemblies add a layer of abstraction that necessitates marshalling across the process boundaries and type conversion between the managed and unmanaged types.

The good news is that you can avoid (or at least minimize) these issues by using:

  • Add-Ins to minimize the marshalling across the process boundaries

  • Visual C++ (with or without Managed Extensions) to write your client applications, minimizing type conversions

If you are curious about performance gains, here are my findings: when I ran performance tests for SQL data imported from the North Wind database using the C# import process and using the Add-Ins, the Add-Ins method ran 25% faster than the direct application programming with MapPoint types. That's considerable performance improvement.

Along the same lines, using Visual C++ (with or without managed extensions) can improve the speed and reduce memory requirements of your application.



4.4. Where Are We?

In this chapter, you have learned how to interface with a GPS device using MapPoint 2004 and how to write Add-Ins. We also discussed how to integrate and improve performance using Add-Ins in your applications.

MapPoint 2004 provides a rich set of APIs to develop windows applications that can work as standalone applications or as Add-Ins that can be integrated into the MapPoint 2004 UI. Yet, we have seen only Windows applications (which could be command line executables as well). So, what are our options if you want to develop applications of other kinds, such as applications for the Web or for other platforms, such as the Pocket PC or SmartPhone? If you are looking to use one of these platforms or application types to develop location-based applications, look at MapPoint Web Service in the next chapter.



Part II: MapPoint Web Service

Chapter 5: Language Basics

Chapter 6: Types

Chapter 7: Literals

Chapter 8: Type Conversions




Chapter 5. Programming MapPoint Web Service

MapPoint 2004 offers extensive capabilities for building location applications, but you can only develop Windows desktop applications using MapPoint 2004 APIs. Moreover, map data must be available locally for MapPoint 2004 applications to work. If you want to develop applications for web or mobile devices, MapPoint 2004 is obviously not an option. However, if you want to develop location-based applications for web and mobile devices, you are not out of luckthat's where MapPoint Web Service comes in.

The MapPoint Web Service is a Microsoft-hosted XML web service that is fully compliant with SOAP. The MapPoint Web Service APIs are exposed via the standard Web Service Description Language (WSDL) that can be used to develop applications using any SOAP/XML-aware programming language. Because of that, MapPoint Web Service transcends traditional boundaries to become a platform- agnostic programming tool with which you can develop a variety of location-based applications.

In this chapter, I will explain how the MapPoint Web Service works and how to get started with your development environment. Since the MapPoint Web Service is SOAP protocol-compliant, it is inherently communication protocol-agnostic (working across HTTP, FTP, etc.); however, in this chapter, as well as Chapters 68, I will be using the HTTP protocol as the medium of communication.

Finally, before we get into the full details of MapPoint Web Service programming, I want to remind you that the MapPoint Web Service is a subscription-based web service, which means that you will be charged for the usage of the MapPoint Web Service APIs. I strongly recommend reading the end user license agreement (EULA) for more details on the tarrif and details on how the API calls are charged. Don't panicaccessing MapPoint Web Service in the staging environment is absolutely free, so you do not need to pay for accessing the APIs.