Subscribe

  • Subscribe  

Integration of Flex, Javascript, BlazeDS and DWR

Posted by Charles | October 7, 2008 .

Sven Busse of ghostBlog wrote about the integration of Flash, Javascript, BlazeDS and DWR.

Busse has been doing a project and after being through a thought process, as he said:

So we figured, it might be a good idea to look into remoting, finally (sigh). The good news is, everything in this domain is opensource now. For example on the Flash side, we have BlazeDS now, being officially developed by Adobe. On the HTML/Javascript side, we found the DWR framework to be light and easy to use.

What he ended up with are:

  • BlazeDS – An open source server-based Java remoting and web message technology from Adobe. It allow real-time communication to Flex and AIR.
  • DWR – DWR allows Javascript in a browser to interact with Java on a server and helps you manipulate web pages with the results.

Then, he spent two posts to offer the details on how he did the integration. I may not agree with the approach that mixing all the three together but the way he makes all work is very educational.

Especially his use of DWR. DWR is a very interesting piece of AJAX technology for people work with Java at client site. The important feature of DWR is reverse AJAX, which allows Java at server side call the Javascript function at the client.

DWR consists of two main parts:

  • A Java Servlet running on the server that processes requests and sends responses back to the browser.
  • JavaScript running in the browser that sends requests and can dynamically update the webpage.

DWR works by dynamically generating Javascript based on Java classes. The code does some Ajax magic to make it feel like the execution is happening on the browser, but in reality the server is executing the code and DWR is marshalling the data back and forwards.

This method of remoting functions from Java to JavaScript gives DWR users a feel much like conventional RPC mechanisms like RMI or SOAP, with the benefit that it runs over the web without requiring web-browser plug-ins.

Leave a Comment

If you would like to make a comment, please fill out the form below.


Name

Email

Website

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comments

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Related Posts

1 Comment so far
  1. mohan  May 16, 2011 10:30 pm

    hi sir,

    can you send me the flex dwr example.

    Thanks & regards

<

Direct TV Offers - usdirect has the best directtv deals