Similar a Developing Online / Offline Mapping Applications using Adobe AIR and ArcGIS Server API for Flex - Blue Raster Esri Developer Summit 2012 Presentation
Similar a Developing Online / Offline Mapping Applications using Adobe AIR and ArcGIS Server API for Flex - Blue Raster Esri Developer Summit 2012 Presentation (20)
Developing Online / Offline Mapping Applications using Adobe AIR and ArcGIS Server API for Flex - Blue Raster Esri Developer Summit 2012 Presentation
1. 2012 ESRI Developer Summit:
Developing Online / Offline Mapping
Applications using Adobe AIR and
ArcGIS Server API for Flex.
Blue Raster Brendan Collins
@blueraster @brendancol
blueraster.com/blog bcdcspatial.blogspot.com
6. OFFLINE
CONSIDERATIONS
• Which features to support…
• How to capture remote dependencies…
• How to store dependencies locally...
• How to extend application code function
offline…
7. CAPTURING
DEPENDENCIES
REMOTE
DEPENDENCIES
• Any asset which is not
accessible locally on
the user’s machine
and is required for an
application feature.
• Map Tiles
• Geometry / Attributes
• Non-geographic assets
8. CAPTURING
DEPENDENCIES
IDENTIFYING
REMOTE
• Monitor traffic using
DEPENDENCIES HTTP Proxy
(e.g. Charles, Firebug)
• Is the dependence
dynamically generated
or already sitting on
disk?
9. How do I store / retrieve
these assets locally?
10. STORING
DEPENDENCIES
General Strategy
– Keep track of asset urls
– Keep storage simple…
– No normalization of response data
11. STORING
DEPENDENCIES
Local File System
– AIR File API
– Easy to implement
– Problematic as number of assets increase
– Idea: Name files the MD5 of their URL
12. STORING
DEPENDENCIES
SQLite
– Scales better than File System
– Power of SQL for attribute queries
– Simple Data Model
– IDEA: Store AMF directly as Base64 Encoded
Text
13. STORING
DEPENDENCIES
Tile Packages (10.1)
– No need to “roll our own” tile storage
strategy
– Creation from within ArcGIS Desktop
– IDEA: Check out TPKLayer for Flex API
(Thank You Mansour!)
28. • AIR Captive Runtime
(Desktop)
–Windows (.exe)
–Mac (.dmg)
–No need to install AIR
Runtime separately
29. • Provide an AIR Installer (.air)
–Cross platform installer
–Encapsulates data
–Requires separate AIR
runtime installation
30. • Compile for Mobile
–iOS (.ipa): App Store or
register devices for limited-
distribution
–Android (.apk):Google Play
(Android Market) or
distribute yourself.
31. Thank You!
visit blueraster.com/blog
for additional information
Blue Raster Brendan Collins
@blueraster @brendancol
blueraster.com/blog bcdcspatial.blogspot.com
Notas del editor
TODO: Change Blue Raster Logo
-Web version of application-highly configurable-straight forward data modelView detailed information on sawmills. -See the progress different logging concession have in developing and implementing required forest management plans.-View mining permits-View the national origin of primary investors in logging companies operating in the Republic.
-Desktop version-
We at Blue Raster helped WRI tell their story of Forest Management throughout Central Africa. But that story was still not able to reach staff and collaborators while in the field. Allowing the data to be accessed and explore offline brought this experience to important actors, those working and living in-country.
ESRI Flex API works great. Easily take an existing flex application and convert it to function for desktop or mobile.
Identify the key features of the application to bring offlineCapture all remote dependencies for those featuresDevelop a strategy of local data storageRetro-fit web api to function seamlessly offline-This is not a linear process, but rather an iterative process in which the answer to one consideration influences other. For example, if you are unable to locally store data required for a feature to function offline, then the you must re-evaluate which features of the online application will be available when disconnected.
When converting an online application to function offline, you need to convert remote dependencies to LOCAL dependencies, or disable features with require them. Most likely you will favor making the assets accessible locally, but disabling features is sometimes inevitable depending on the scope, available-time and budget of the project. Example: Share with Facebook and Twitter. I’m not going to specifically discuss the process of disabling features within the application, but I will say that this is where having a loosely coupled architecture pays off. One way to Dependency injection is also very very important. I’m not talking about using a formal Dependency Injection Framework, but rather that you provide your classes and components the assets they require, instead of letting them go out and find them. In Model-View-Controller terms, a view should not be making URLRequests to access data, instead it should be given a model containing data to represent visually.
For each of the dependencies you identify, you need to know where it’s feasible within the context of the project to store and access locally. One example of a dependency which I found too challenging to bring offline was a exportMap request from ArcGIS Server.
Quick: MD5 is a cryptographic hash function which produces a unique hex-decimal string for any input. THIS IS A ONE WAY TICKET; No coming back; You can’t for example take the MD5 hash and convert it back to the original string value;
Quick: MD5 is a cryptographic hash function which produces a unique hex-decimal string for any input. THIS IS A ONE WAY TICKET; No coming back; You can’t for example take the MD5 hash and convert it back to the original string value;
Ok so now that we’ve identified the dependencies, we need to download..When implementing a strategy for storing content, I found it helpful to step away from AIR and use python. I think python is more productive for implementing data models even data models for storing content it can be very helpful to step away from AIR. AIR is robust by nature as technology for the mobile and desktop.
Ok so now that we’ve identified the dependencies, we need to download..When implementing a strategy for storing content, I found it helpful to step away from AIR and use python. I think python is more productive for implementing data models even data models for storing content it can be very helpful to step away from AIR. AIR is robust by nature as technology for the mobile and desktop.
Ok so now that we’ve identified the dependencies, we need to download..When implementing a strategy for storing content, I found it helpful to step away from AIR and use python. I think python is more productive for implementing data models even data models for storing content it can be very helpful to step away from AIR. AIR is robust by nature as technology for the mobile and desktop.
Ok so now that we’ve identified the dependencies, we need to download..When implementing a strategy for storing content, I found it helpful to step away from AIR and use python. I think python is more productive for implementing data models even data models for storing content it can be very helpful to step away from AIR. AIR is robust by nature as technology for the mobile and desktop.
Ok so now that we’ve identified the dependencies, we need to download..When implementing a strategy for storing content, I found it helpful to step away from AIR and use python. I think python is more productive for implementing data models even data models for storing content it can be very helpful to step away from AIR. AIR is robust by nature as technology for the mobile and desktop.
Key Point: You need a windows environmentto compile an exe / mac environment to compile .dmg