YOUR FEEDBACK
Immo Huneke wrote: A well written article, an ingenious solution to a real problem often encountere...


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
MXDJ TOP LINKS YOU MUST CLICK ON !


Real-World Adobe Flex Tips, Tricks and Techniques
Tips, Tricks and Techniques From Adobe's Intrepid Senior Evangelist For Rich Internet Applications

(July 14, 2006) - Some people take the dog for a walk, others go play a round of golf. Not Christophe Coenraets. His idea of a good time is to illustrate Flex 2 / JMS integration by extending a simple "realtime feed" application that he built a while back! Web Developer's & Designer's Journal is proud to bring you each month two of the month's best tips from Adobe's intrepid Flex Hero.

Flex and JMS: Real Time Market Data Application
The Message Service at the core of the Flex Data Services (http://labs.adobe.com/technologies/flexdata_services2/) is one of the important new features in Flex 2. (see Figure 1)

Unlike JMS, the Flex Message Service provides an actual implementation of a publish/subscribe messaging system, not just an API. It might be all you need for simple, self contained use cases where you just want to exchange messages between Flex clients. In Enterprise integration scenarios, the Flex message service integrates with, and extends existing messaging systems to allow thin clients to publish and subscribe to topics these systems manage. Flex integrates with existing messaging systems through an adapter architecture. Using the JMS adapter available out-of-the box, you can map Flex destinations to JMS topics. For example, the snippet below (added to flex-message-service.xml) defines a destination called "stock-feed", and maps it to a JMS topic called "FlexTopic".

<destination id="stock-feed">
   <properties>
     <server>
     <durable>false</durable>
       <durable-store-manager>flex.messaging.durability.FileStoreManager</durable-store-manager>
     </server>
     <jms>
       <destination-type>Topic</destination-type>
       <message-type>javax.jms.TextMessage</message-type>
       <connection-factory>jms/flex/TopicConnectionFactory</connection-factory>
       <destination-jndi-name>jms/topic/flex/simpletopic</destination-jndi-name>
       <destination-name>FlexTopic</destination-name>
       <durable-consumers>false</durable-consumers>
       <delivery-mode>NON_PERSISTENT</delivery-mode>
       <message-priority>DEFAULT_PRIORITY</message-priority>
       <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
       <transacted-sessions>false</transacted-sessions>
     </jms>
   </properties>
   <channels>
     <channel ref="my-rtmp"/>
   </channels>
   <adapter ref="jms"/>
</destination>

This mapping allows Flex clients to publish and subscribe to the JMS topic. For example, the following line of code is all you need in your Flex client to subscribe to the "stock-feed" destination:

<mx:Consumer id="consumer" destination="stock-feed" message="messageHandler(event)"/>

To illustrate the Flex and JMS integration, I recently spent some time extending the simple "realtime feed" application that I built a while back as a sample shipping with the Flex Data Services. This new version looks more like a real trading application: A Java application publishes simulated real time market data to a JMS topic. The Flex client subscribes to that topic and displays the data in a DataGrid and in a Line Chart that are updated in real time.

Action Points

Flex and AJAX: Google Maps Collaboration
As an example of AJAX/Flex integration, I built a simple collaboration module that you could add on top of any AJAX (or Flex) application. In this example, I chose to add it on top of Google Maps. (see Figure 2)

The Flex module adds the following collaboration features to Google Maps:

  1. Map sharing: Maps are kept in sync (in real time) between users involved in a collaboration session.
  2. Videoconferencing (Webcam sharing and VOIP): You can share your Webcam and microphone to add video and audio to your collaboration session.
  3. Whiteboarding: Collaborating users can draw on the map. For example you could draw potential directions, etc. The users' whiteboards are kept in sync in real time.
  4. Cursor sharing: When you move your mouse, other users see the movements of your mouse and what you are pointing at.
The Flex features used in this example include:
  1. Publish/subscribe messaging and support for real-time communication
  2. Drawing API
  3. Support for Webcam/voice capture and streaming (Flash Media Server is required for streaming).
Action PointsThis application requires the Flex Data Services for pub/sub messaging, and the Flash Media Server for media streaming.

About Christophe Coenraets
Christophe Coenraets currently works as a Senior Technical Evangelist at Adobe. Before joining Adobe, Christophe was an evangelist at Macromedia, focusing on Rich Internet Applications and Enterprise integration. Prior to Macromedia, Christophe was the head of Java and J2EE Technical Evangelism at Sybase, where he started working on Java Enterprise projects in 1996. Before joining Sybase in the US, Christophe held different positions at Powersoft in Belgium, including Principal Consultant for PowerBuilder, and Manager of the Professional Services organization. Before joining Powersoft, Christophe worked as a developer and architect on several retail and BPM projects. Christophe has been a regular speaker at conferences worldwide for the last 10 years.

YOUR FEEDBACK
Roelof wrote: Nice post, but could you please fix the examples. Both links give a 404 error! Cheers
Anupam wrote: I got an 404 error while clicking on the link :( Please update it! Cheers! Anupam
Abhishek wrote: The links for the examples(both JMS and Maps) are not accessible ....
Web Developer's & Designer's Journal wrote: Some people take the dog for a walk, others go play a round of golf. Not Christophe Coenraets. His idea of a good time is to illustrate Flex 2 / JMS integration by extending a simple 'realtime feed' application that he built a while back! Web Developer's & Designer's Journal is proud to bring you each month two of the month's best tips from Adobe's intrepid Flex Hero.
Web Developer's & Designer's Journal wrote: Some people take the dog for a walk, others go play a round of golf. Not Christophe Coenraets. His idea of a good time is to illustrate Flex 2 / JMS integration by extending a simple 'realtime feed' application that he built a while back! Web Developer's & Designer's Journal is proud to bring you each month two of the month's best tips from Adobe's intrepid Flex Hero.
LATEST FLEX STORIES & POSTS
Curl announced the release of Curl Data Kit Data Services (CDK-DS) for enterprise developers building new applications using Adobe Flex or Flash, as well as developers upgrading existing Curl applications. This addition to the Curl Rich Internet Application (RIA) Platform is an impleme...
Adobe and Intel plan to collaborate on porting Adobe’s Flash widgetry to Intel’s Media Processor CE 3100, a way to put Flash-enhanced web content and rich Flash applications on television. The chip is bound for cable set-top boxes, Blu-ray Disc players, digital TVs and retail-conne...
Across Systems, the provider of the Across Language Server, and IAI (Institute for Applied Information Science at Saarland University) have expanded their relationship and broadened the integration of their two technologies. The direct connection of the Controlled Language Authoring To...
Cocomo adds to the existing technology in the Flash Platform and provides further choice in terms of how you build and deploy collaborative applications - it does not replace the approach provided by BlazeDS/LCDS. Whilst the Cocomo service removes the complexity associated with deploym...
Until recently Flex developers had the option of using the free, open source SDK (together with a text editor of choice) or purchasing Flex Builder, Adobe’s Eclipse-based IDE for building, debugging, profiling and deploying Flex applications. Whilst Silverlight will remain an obvious...
Adobe’s AIR for Linux, the runtime engine that supports rich Internet apps (RIAs), has caught up with its Windows and Mac siblings. The company has released AIR 1.5 for Linux, the first time the Linux desktop variant has made it as a production-grade, Adobe-supported release. And now...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

Click Here

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE