Sunday, September 10, 2006

KML needs an AJAX style upgrade

The cranky older programmer is back for another session detailing the failings of today's "best of breed" applications. Take AJAX, the acronym for a simple concept that has brought about a new excitement to web development, dubbed "Web 2.0." I've read so many excited articles and posts about how great this new capability is and how it is going to bring about a resurgence of the dot com boom. That may be the case, but let me say something about the underlying technology of AJAX.

Cutting away all the marketing hype, the two keys to the whole thing are 1) the ability for a script to download data asynchronously and receive a callback when it has arrived. 2) the ability to change the contents of a web page without the entire page refreshing. Of course there are a lot of third party packages springing up around these capabilities but they all rely on these foundations. From the perspective of a programmer, my question is: what took the web browsers so long? Gee, let's let them specify their own download URLs and process them with a scripting language rather than forcing static urls and the fixed processing of interface elements by the web browser itself. Guess what else follows that outdated content model, yep, it's KML and Google Earth. At least the first few halting steps are being taken in the web development world thanks to Javascript and XMLDom.

Now, why is KML lame? For a simple example, you can write a KML file to show a set of georeferenced data points. That's great, but what if you have a set of points with different attributes that you want to publish and view, but not all at once. Perhaps you want to enable some selection criterion for the data points, such as earthquakes during an arbitrary time frame? A hokey solution could perhaps be ginned up using the network link and having a separate server script parse the link and return the appropriate data. However, how are you going to provide an interface for them to make the arbitrary selection? With KML? At least HTML has Javascript and GUI elements, KML and Google Earth have no easy client side data capture or processing capabilities that aren't hard coded into GE itself. Please correct me if I'm wrong and I'll eat a heapin' helpin' o' crow.

I look at the spectrum of software development going on in various industries right now and am somewhat stunned by the isolation each has. The game industry is doing some fantastic work, the best in the industry, but the GIS field doesn't seem to pay any attention. Web development is a huge chunk of the market but is completely isolated by the web browser. Everyone has web browsers but writing a plugin for all browsers is a hurculean task. I heard that the Opera web browser will include a BitTorrent client. Hurrah, someone is getting it!

I must say again that I think that Google Earth is the best earth explorer out there right now. However there really needs to be some serious innovation and insight done in the software industry in general. I've taken a look at many open source projects out there and am shocked by how many are written in C. Of those that are written in C++ (the only language for serious library and application development work) fewer still incorporate the STL libraries. I've only come across two that use the boost libraries, yikes! I realize it takes a lot of time and effort to keep up with the state of the art and evolve along with the other industry segment's innovations. Perhaps the corporations putting out software today are just unwilling to support the continuing education of their primary product creation assets, the programmers. The programmers themselves need to take responsibility for their own continuing education during non-work hours if they want the be marketable in the future. Finally product and project managers need to have some real programming experience (at least 5-7 years) to be considered competent in my opinion. It's too easy for an inexperienced programmer to bamboozle someone who doesn't know about development work, it is also too easy for a forceful manager to impose unrealistic expectations on a development team.

Let's all celebrate the advent of AJAX, the ability for client side control of what to download and how to process and display it. It only took a decade, at least it's a start. Google does it with Google Maps, think guys.

2 comments:

Gregor J. Rothfuss said...

Well, ideally they would converge Google Maps and Google Earth at some point. With things like canvas 3d and Collada or unity it might be possible to bring web scriptability to KML / Earth without having to reinvent the web.

Tony Parisi said...

Also take a look at X3D (way richer feature set than Collada at a smaller footprint) and Ajax3D (www.ajax3d.org)

We're adding Geospatial visualization features to our Flux X3D Player over the next small number of months... with that, someone could actually build and script their own Google Earth :-)