Thursday, January 18, 2007

marshall... law and order

Hi there, I was curious to find out if COM compliant components in ArcObjects still exists in 9.2. Since the release of ArcGIS 8.x, COM has been the technology driving ArcObjects to run on Windows. ArcGIS Desktop needs this to run the Windows app. So with the advent of 9.2 and all the accompanying dotNET classes, I thought that COM is replaced. But not so... I found out.

The programming functionality of ArcObjects can now be accessed using 4 APIs: COM, .NET, Java and C++. The choice of which API to choose is not a simple one... it depends on a number of factors actually... the ArcGIS product that you are developing with, the end user functionality and development experience.

As I mentioned before, code running under the .NET Framework control is called managed code (read my blog on JIT). COM is a fine example of unmanaged code. So how does ArcObjects's COM object speak to .NET based application... well... its via a technology called COM Interop. For COM Interop to work, the Common Language Runtime (CLR) requires metadata for all the COM types. This means that the COM type definitions normally stored in type libraries need to be converted to .NET metadata. Once the metadata is available .NET clients can seamlessly create instances of COM types as though they were native .NET instances. ESRI provides primary interop assemblies for all the ArcObjects type libraries that are implemented with COM. The Interop API provides Runtime Callable Wrappers (RCW) to use COM Objects in .NET

Let me give an example in C#:
ESRI.ArcGIS.Geometry.Point pt = new ESRI.ArcGIS.Geometry.Point()

What happens when this code runs?? A Runtime Callable Wrapper object is defined instead of the actual COM object itself. When the object is instantiated (using the NEW keyword), the wrapper object creates the appropriate COM object. When you call the members of the object in .NET, the parameters of the method will be marshalled from the .NET process to COM process and the return value will be marshaled back. This is what happens behind the scenes in ArcObject ... for now.

Sounds complex?? Many times ArcObjects programmers don't realise this but when performance issues hits the roof we need to know why the memory allocation screws up sometimes. This could also explain why ArcGIS desktop is kinda slow for certain GIS processes. However, this is minimal impact considering the vast advantages of using ArcObjects and .NET programming to create cool and exciting apps.

Labels:

Thursday, January 04, 2007

Tech Transfer 2007 - ESRI South Asia - 11 January 2007 - Malaysia

Next week on the 11th ... Thursday I believe... we are having the ArcGIS 9.2 Rollout technical sessions. Many of you have already received the ArcGIS 9.2 DVDs and wondering... What's New?? Well there are a lot of changes... super major changes.

Basically over the last 4 years ESRI has been developing this 9.2 version in 3 major areas:
1. Cartographics Representation
2. Geodatabase
3. ArcGIS GUI and User Experience

Cartography has been an area no GIS vendor dare venture... but now ESRI is the first to develop a cartographic product for the commercial GIS industry. This has always been the final map production development headache for many GIS organisations. ESRI has another product called PLTS to do cartography before but with 9.2... cartography in GIS is complete.

There is a totally new Geodatabase in 9.2!!! High Precision geodatabase and new formats with better performance is provided in this version. Geodatabase has come a long way and now with this new geodatabase many users will be VERY happy to know there is no more cursing... over domains, extents, precisions, performance and tolerances etc.

From the feedback ESRI received from users, their own staff as well as projects all over the world.. the software now has incorporated many new cool tools, GUI features, shortcuts and ease of use. This is due to the ever increasing demand among users for better productivity when using any of the ArcGIS software range. Very cool.

Its free .. so come and see for yourself.

Labels: