Wednesday, 4 February 2009

Web Map Clients: Flex vs AJAX

Without being aware of it, ESRI recently gave us an interesting point of comparison between to interesting technologies for web map clients. Indeed, on its ‘community’ website ( the Redlands company released  nearly at the same time two web map client code samples that everybody can upload and test

Flex client:

Javascript (AJAX):

Unfortunately, I didn't manage to find online working demos, but I tested in on my 'localhost', and I can tell you that they are very similar in terms of user experience!

They look exactly the same, and behave also in a very similar way (try for example to add the earthquake GeoRSS,  or to draw your own vectors) … but behind the scenes, technology is drastically different!

So what to choose if you need a Web Map client technology? I would clearly advice AJAX because:

  • Flex is a proprietary technology (it is a kind of ‘new branding’ for the great old Flash, owned by Adobe), and runs in compiled mode (.swf files are binary) so it is very bad for Open Source projects;
  • AJAX is a technology that has been built to provide interaction with underlying web services (or any form of XML or JSON based communication), while Flex is initially a vector drawing technology;
  • You can develop in AJAX using any Text editor. If you need more elaborated IDE, several open source software are available (like Eclipse with the Aptana plugin). In contrary, advanced Flex development requires Flex Builder (215 euro on Adobe online shop).
  • As a consequence of the previous point (and a lot more important than a simple license pricing issue), AJAX is supported by a huge community of developers while Flex remains more confidential. Many AJAX open source projects like OpenLayers, MapFish or ka-map are available, with a lot of code samples, forums, etc. that really improves productivity of developers using them.

Among those Open Source web map client technologies, MapFish ( is one of the most promising projects, I think. It puts together a Javascipt library dedicated to web mapping (OpenLayers) and a library efficient GUI design, and powerful AJAX request management (ExtJS). As a consequence, it is very powerful in terms of built-in OGC support (WMS, WMC WFS-T, KML, GeoRSS, etc.) and mapping features (deal with projections, map caches, Google maps layers, zoom, pan, vector drawings, etc.), as well as in terms of client-server communication and capacity of building without effort nice looking web user interfaces.

Also of interest, the beta client developed by ESRI (them again!) with the Geoportal Toolkit 9.3: (the ‘LAUNCH MAP VIEWER’ link is on the upper right). But even if based on AJAX, this is a proprietary technology, so definitely not a solution that cannot fit to any project.


No comments:

Post a Comment