Archive for January, 2010|Monthly archive page

.NET Successors to VBA IDE and DOCELL are Needed

ArcGIS 10.0 (formerly known as 9.4) will be the last release to support VBA. Expect to be told to simply download Visual Studio Express for free, and create assemblies containing extensions, commands etc. that can be installed without touching the registry.

Still, I find it nice to have code that travels with the mxd. Since compilers are part of the .NET framework, it should be possible for ESRI to offer an IDE that compiles code stored in the mxd and runs it within the ArcMap (or ArcCatalog) process.

But Why Stop There?
It should also be possible to to generate MSIL for languages other than just C# and VB.NET. What would those languages look like? I suggest ESRI should provide small tightly focused languages that address specific problems – domain specific languages (DSLs) in other words. The System.Reflection.Emit or Expression Trees available in .NET could be leveraged to do this.

Take DOCELL, for example. This was a language introduced in ArcGrid (at 6.0.1?), and is nearing the end of its supported life. When ArcGIS was introduced, ESRI suggested that DOCELL scripts be replaced with ArcObjects code. A few lines of DOCELL code that could be interactively tested now require many lines of .NET code that must be compiled. A DSL would be an appropriate replacement for DOCELL.

In addition to DOCELL, DSL’s that operate on map topologies would be interesting. A lot of topology tasks involve trees. XPath is a good example of a DSL that finds nodes in trees based on patters. Suppose I have a water distribution network, and I’d like to find all valves on 6 inch pipes down stream from pumps with a particular capacity. This really isn’t much different from an XPath query. If there were an XPath equivalent for working with trees grown from map topologies, writing searches like this would be much easier. The details of recursion could be hidden.

Lex/Yacc for GeoCompilers
Maybe something similar to lex/yacc could be provided. A lex-like program would scan a geometric network (or topology) to produce tokens that a yacc-like program could use to create compilers. These compilers, in turn, would be used to compile programs written in a language specific to the geodatabase. Take the NHD geodatabase for example. Writing ArcObjects programs against this data model is a bit tricky for most ecologists whose primary skill is ecology – and not programming. Imagine a having different programming languages available specific to the NHD. This would make the ecologists’ job would be much easier. Compilers would live within the geodatabase where they would be updated when schema changes occur.