2. Agenda...
• Dekho Architecture
• Custom Tools Overview
• Communication & Working with the Esri Flex
API
• Working with the Dekho Web Services API
• Consideration and Best Practices
7. The Basics
• A way of customising Dekho
• Built as a .swf file which runs alongside Dekho
Parent Application
Dekho Custom
Tool
Flash Runtime
8. The process
• Write (SWF)
• Deploy (Application Server i.e. Tomcat)
• Add a button (Dekho Studio)
9. Start-Up sequence
Client Browser Application Server
Dekho Server URL
Dekho Page
Dekho swf
Dekho UI
Tool ‘A’ click (URL to swf on server)
Tool A
Tool ‘A’ swf
Tool B
Tool C
10. In memory… now what?
Client Browser Application Server
Dekho Page Option 1:
Do you thing… clean up and
Dekho UI destruct
Dekho UI
Option 2:
Tool A Persist and clean up on Tool A
- Dialogue close or… Tool B
- Second click or…
- App shut down Tool C
11. Second click – unload…
Client Browser Application Server
Dekho Page
Dekho UI Dekho UI
Tool A Tool A
Tool B
Tool C
12. What can you use a custom tool for?
• Launching another browser application
• Launching another client side desktop
application
• Creating a custom workflow
• Change layers, extent, selection…
• Loading WMS layers
13. Deploy…..
• Deploying your tool means making it available
within the application server i.e. tomcat
• Common practice to add your custom too to
the root of the same domain as Dekho
December 10 // www.esriaustralia.com.au
14. Add…..
• Add tool to Dekho via Dekho Studio
• Complete Tool Wizard
December 10 // www.esriaustralia.com.au
15. Use….
• Custom tool available on main Dekho Interface
December 10 // www.esriaustralia.com.au
18. How does my custom tool interact
with Dekho?
• Broadcast out to the parent application i.e.
browser
• Receive messages from Dekho
• Send messages to Dekho
• Communicate with Dekho via the Services API
• Communicate with any web services
19. Broadcast out to the parent
application
• Parent application can control Dekho
• Parent application can receive messages from
Dekho
JavaScript or C# client
stubs provided
20. Working with the Dekho application
• Listening to messages
• API methods made public by Dekho SWF
21. Intercepting messages from Dekho
• messageFromDekho Function.
Dekho broadcasts the event as E.g:
<eventtype>,<sessionid> Session, 125482993879
26. Using Dekho Services API
Parent Application
Dekho Custom
Tool
Flash Runtime
Dekho Services API
27. The Process
• Create channel and remote object
• Get Session Information from
parentApplication
• Use session information to call Dekho Web
Services API
28. Example: Saving selection as a redline
Client Browser Application Server
Dekho Page Establish AMF Channel
Dekho UI
DrawRedlines
Get SessionIn
Refresh Map
ClearSelection
SaveBookmark
Tool A
29. Using the Dekho Services API
You are responsible for creating and opening a channel.
Your responsible for creating a remote object to the correct service i.e.
“SessionService”
Finally make the call to the Dekho Services and specify the response handlers
31. Custom Tool Summary
• Dekho’s client extensibility model.
• Ways to communicate with Dekho and the
parent application:
– Broadcast out to the parent application
– Dekho Flex API + Receive & Send messages
– Communicate with the Dekho Services API
• Your custom tool can use the Esri Flex API
• Your custom tool can use the Dekho Web
Services API
35. The Dekho Simulator & Debugging
• Simulator is a test harness for custom tools
• Please refer to documentation
• Don’t forget:
– Server Address URL and Tool URL
– Map Service Address
• Simulator is limited – mock as necessary
36. Handling web services
• Tell the user when you’re waiting
• Chose the right channel (for performance and
environment)
• Assign fault handler functions for service calls
37. Security
• Security
– Cross Domain – understanding if your tool needs
to pull data from another source
38. Maintenance & Deployment
• Maintenance
– Make your tool portable, configure external Web
Services URL address
– Flex SDK version
– Esri Flex API version
• Deploying into a scaled environment