GOOD NEWS

GOOD NEWS
Ask For The Truth...

Monday, July 30, 2012

Using Flex and the ArcGIS for Flex API to write once and deploy everywhere

Using Flex and the ArcGIS for Flex API to write once and deploy everywhere:
We developed a map application for one of our clients recently that needed to run in a web browser and also as a stand-alone windows application on a kiosk machine. After tossing a few different ideas around, we quickly settled on Adobe Flex and the ArcGIS for Flex API since the Flash player would allow the application to run in a browser, and Adobe AIR would allow the same application to function as an installed desktop application.
While the applications are 95% similar, there were some key differences. For example, on the kiosk version, the UI elements needed to be larger (e.g. touch screen friendly) and we wanted to be able to print directly to the thermal kiosk printer without displaying a print dialog. This lead to a decision to utilize a shared library to contain much of the business logic, web service delegates, and presentation logic while creating distinct target-specific application projects which would override or extend the shared library code when necessary.
With the advent of Mobile AIR, this concept can be taken one step further. I gave a talk at the 2012 ESRI Mid Atlantic User Group which expands on this concept to utilize a shared code base to power web, desktop, iPhone, and Android clients. In the video below, notice how the web application displays identify results in an Info Window, but the mobile application displays the results as a new view in the view stack – yet, they use the same code to retrieve the data from the server, store that data on the client tier, and render that data on screen.
If you want to dive further into this concept, feel free to fork this application on GitHub.


No comments:

Post a Comment