Flex Application Builder - Web Application Development for the Non-Developer

I have long been impressed with some of the whizzy web applications built by Esri Inc and my colleagues in Esri UK but, being a GIS user and not a developer, I have always struggled to build something pretty and functional quickly.  Historically, I had to resort to using the Web Mapping Application bundled with ArcGIS Server Manager, but the look and feel of this has not changed in several years and it’s starting to look tired.

The introduction of the Flex Viewer was good for me as it meant I could now take a copy of a pre-built web application and then (in theory) I just had to tweak a little bit of xml to make it work against my own services.  However, opening the various config.xml files was a bit like opening a novel in a foreign language; it just doesn’t make much sense.  Try as I might, a quick tweak of some xml soon became half a day of trying to get it to work because I’d put a comma or <> in the wrong place; sooner or later I’d either give up or ask someone else to help me.

I was, therefore, very pleased when the Flex Application Builder was released.  If you have not looked at this yet, I recommend you give it a go.  It provides a simple GUI for selecting the services and functions you want to include in your web application as well as altering the style and design.  It even allows you to preview it before you deploy it to check it works. 

One thing I’ve found very useful is the ability to add a geoprocessing tool by simply pointing it to my geoprocessing service (that I’ve created from a desktop model) and it will automatically build the appropriate dialogue for the end user.  I even get the choice of how to display the results on screen.  Now I can create complex web applications such as find my nearest available resource by drivetime without any coding!

The release of these Application Builders all sounded a bit too good to be true and to be honest, when I first used the Flex Application Builder, I found it to be a little hit and miss.  The builder did not give me access to the full range of widgets included in the Flex Viewer and it was not intuitive how to set the various options.  Furthermore, once a site was built, you couldn’t always go back in and edit your site.

Things have improved though.  More recently, I have been using the ArcGIS Viewer for Flex Application Builder (v.3) to build a variety of demonstrations and I must say I am genuinely impressed with what I can achieve without any development.  The build and edit environment seems to have been greatly enhanced and stabilised and I can happily go back to sites I have created time and time again to make edits.

For me a really simple (but useful) benefit is the ability to add the same widget multiple times (e.g. the query widget) but change the icon and service it works against which allows me to create simple yet powerful web applications.  For example in the screenshot below I have used the Query widget twice (once for Incidents and once for CCTV camera locations) and chosen appropriate icons to make the user experience easy.  


Another useful thing I’ve discovered about the ArcGIS Viewer is that more and more free widgets are being developed and shared that you can easily add to your application.  Again, in the past this would have meant getting into development code, but now with Flex Viewer 3, it is easy to add custom widgets to the application builder through a Manage Custom Widgets tool.

In summary; I can now do (most) of the web application development I want/need to without ever opening an xml file, which has got to be good!

Useful links for you to get started

Information on Flex Viewer Application Builder:

Download for Flex Viewer Application Builder:

How to build your first site:

Where to find sample widgets for Flex


Running Flex apps on iPhone/iPad and Android

The ArcGIS web APIs are a powerful way to create mapping applications using JavaScript, Flex or Silverlight. However, many mobile devices do not support Flex or Silverlight, and JavaScript apps have drawbacks: they don't always behave the same way across different browsers, they do not work well without an active network connection, and they generally have less functionality than Flex or Silverlight apps (simpler UI, inability to access as much hardware, etc).

Of course, mobile technologies evolve rapidly, and it's likely that these criticisms of JavaScript will seem outdated and unfair before very long. Still, we were excited earlier this year when Adobe released Flash Builder 4.5, a development tool that allows cross-platform Flex apps, including GIS apps built with Esri's ArcGIS API for Flex, to be deployed to iOS devices (iPhone, iPad, iPod Touch), Android devices (phones and tablets), and the BlackBerry PlayBook tablet.

On Android and BlackBerry PlayBook, Flex mobile apps run on AIR, a runtime developed by Adobe. AIR is pre-installed on PlayBook, and can be downloaded for free on Android. Since iOS apps distributed through the Apple App Store are not permitted to execute on third-party runtimes, Flex apps for iOS are normally compiled to native ARM assembly so they can be executed directly on the CPU.

The ArcGIS API for Flex 2.4 includes two mobile Flex samples to help developers get started. Since the API is now capable of recognising multi-touch gestures, Flex is a viable way to develop cross-platform mobile GIS apps. Quite a few of the Flex API code samples originally designed for the web can also be compiled without modification and run on mobile devices. For example, the following screenshot shows the Switching Basemaps web sample running on an iPhone 4. However, although the app may work without modification, sometimes the UI should be redesigned to take into account a smaller screen or lack of a physical keyboard.

AIR can access the GPS, accelerometer, microphone and camera on most mobile devices, although not the gyroscope or compass, so if you need these then you will have to use native code (i.e. Objective-C for iOS, Java for Android). The new AIR 3 runtime has support for Native Extensions, which allows native code modules to be linked with Flex apps.

Free ArcGIS apps written using Flex include MuniTracker, a public transport information app for San Francisco, and ArcGIS Viewer, a lightweight GIS viewer modelled on the ArcGIS Viewer for Flex, although it uses a different codebase because iOS devices do not support apps with a modular architecture like the Flex Viewer. You can download these apps through the App Store/Android Market. Flex apps seem to run quite well on mobile platforms, but runtime performance and battery use need to be considered. For example, MuniTracker disables animated transitions when a user zooms in and out on the map in order to conserve resources, although this behaviour may look a bit odd to users who are accustomed to seeing smooth zoom-level transitions.

More information about designing, building and deploying Flex mobile apps can be found in this guide: Developing Mobile Applications with Adobe Flex and Adobe Flash Builder.

A beginner's guide to extending ArcGIS Viewer for Flex

If you're a non-developer looking to get started with building Flex Viewer widgets, you might find the following document useful:

A Beginner's Guide to extending the ArcGIS Viewer for Flex

When I started at Esri UK, I had a fair amount of development experience but I was completely new to Flex. I ended up taking a lot of notes while I was learning my way around the Viewer, which were eventually turned into a beginner's guide aimed at non-developers.

The guide is a high-level overview of the widget development process and the various technologies involved. For more detailed step-by-step instructions, ArcGIS.com has lots of helpful resources.

Any comments and suggestions are welcome, and we really hope you find it useful!