Under the hood of Dekho 3.2′s Main GUI

May 18, 2011   //   by Dan V   //   Other  //  3 Comments
Not UsefulUseful (No Ratings Yet)
Loading ... Loading ...

There have been some changes to workflows, general improvements and bug fixes but overall the Dekho 3.2 release looks and feels the same as the previous version. However under the hood it’s a different story, that’s where most of the effort, blood, sweat and tears took place.

We need to start making use of the new ESRI Flex API 2.x functionality but to do this we first had to upgrade from Adobe’s Flex SDK version 3.5.0 (halo) to version 4.5.0 (spark). Although the ‘spark’ platform can use the older ‘halo’ components (meaning less work for us to do in Dekho) we decided to upgrade everything to use the new ‘spark’ components (meaning more work for us to do in Dekho). All display objects in Dekho were upgraded and for the most part it was an easy, but time consuming process. For components like the Legend it was a different story. Although the legend looks simple it’s actually quite complex and as a result there have been issues in earlier releases. Instead of simply upgrading the legend this was a good time to rebuild it from the ground up. The legend still looks the same (which was one of the goals) but now it’s more stable and the issues with its predecessor have been addressed.

The next phase of Dekho 3.2 was upgrading to the new ESRI Flex API 2.2 library. This was an easy process until we hit graphic objects like redlines. Transferring graphics between the server and client is required functionality but with the upgrade it no longer worked. This is because communication between the server and client is done with Remote Object Web Services which relies on BlazeDS technology. It was at the BlazeDS level where the problem occurred and specifically had to do with changes in the new ESRI Flex API’s geometry classes. After some team discussions it was decided to build a utility class to simplify graphics into a format compatible for BlazeDS, allowing for their transfer between server and client. Besides converting the ESRI Flex API graphics to generic graphics the new utility class also converts the generic graphics back to ESRI Flex API graphics.

The unfortunate side effect of the new generic graphics is that existing graphics saved on the Dekho Sever (i.e. bookmarks) now require upgrading. Don’t worry, we’ve created a tool to aid in this process and details can be found in the Dekho 3.2 Upgrade Guide.

Finally you should know that custom tools will need to be recompiled against Adobe Flex SDK 4.5.0 and use the ESRI Flex API 2.2 library if required. The new ‘mixed mode’ compiler switch cannot be used with the ESRI Flex API 2.2 library. As already mentioned the older ‘halo’ components are still valid with Adobe Flex SDK 4.5.0 so the amount of upgrade work can be done on a sliding scale. However if the custom tool uses ESRI Flex API graphics in conjunction with the Dekho web server methods it will need to handle the graphic conversions to and from the new format used by Dekho. The new graphic conversion utility class has been included in the upgraded custom tool simulator project to aid with this process. The CallDekhoUsingBlazeDS, CustomRedlineTools, DrawRedlinePoint and SaveSelectionAsRedlines tools all use the new graphics conversion utility class and can be used as examples.

The following links are a good place to start with the process of upgrading from Flex 3 to Flex 4:
Differences between Flex 3 and Flex 4
Adobe’s Flex 4 Migration Guide

3 Comments

  • Hi

    Will all the existing methods from 3.1 work. We use the

    drawRedlines method from the session service to load waypoints as redlines?

    See the DekhoBlog Article.

    http://www.dekho.com.au/waypoint-to-redline-tool/

    • Yes all the existing methods from 3.1 still work. I haven’t seen the code for your custom tool but if it creates ESRI Flex API Graphics from the waypoints then you will need to convert them using the new GrahpicUtilities class before calling the drawRedlines method. This should be a one liner where you simply pass the redline waypoints as an array into the GrahpicUtilities.convertESRIGraphicsToDekhoGraphics method which returns a new array of graphics that can be used by Dekho.

      The sample custom tool SaveSelectionAsRedlines uses the drawRedlines method and can be used as an example.

  • Great to see a post on the ‘Under the Hood’ work thats been put in to 3.2. Definitely helps to understand to the inner workings of Dekho and aids with site specific customisations. Thanks.

Leave a comment


− one = 3