Web 2.0 with Java and Flex – The best of Both Worlds

Posted by Swarn Dhaliwal, Ph.D.

Aug 13, 2010 12:00:00 AM Open Source, BlazeDs, Flex, Java, Web 2.0

Adobe flex provides a powerful User interface (UI) development platform which enables developing Web 2.0 style applications.  The ubiquitous availability of the Adobe Flash Player (the run time where Flex applications run) makes Flex application run virtually everywhere.  Java(TM) on the other hand provides a very powerful service development environment especially with the abundance of open source, freely available server components.   Therefore, a combination of Flex and Java for delivering powerful, responsive,  highly interactive Web 2.0 applications provides a potent alternative for traditional Web 2.0 development using HTML and various JavaScript frameworks.

So now we have a nice UI developed using Flex, packaged as SWF file and conveniently delived to the browser.  We also have powerful services developed using the J2EE platform and running on an Application server such as JBoss or Tomcat.  How do we connect the two so that the power of Java services can be delivered to the user through sophisticated, highly interactive User Interface developed using Flex. That is where BlazeDs comes in.  The BlaseDs is an open source communication framework which allows a Flex application running as a SWF in the browser to make remote calls to the Java services running in the Application Server.
 
  Out of the box, BlazeDs provides enough functionality for Flex to Java remote communication. However, using out of the box functionality becomes tedious and error-prone in a real world application where a number of services must be invoked and UI and Server part of the functionality must be developed by different people.  This tedium and susceptibility to errors can be mitigated by providing TypeSafe ActionScript remote Proxies to the Java Services. The ActionScript remote Proxies can be auto generated and compiled into the Flex application package and can be natively used by the ActionScript code in the Flex UI application in a Typesafe manner.   This process of code generation for the remote proxies can be integrated into the build process, therefore, making the process completely automated.
 
  We have used the architecture and the processes outlined above in a number of Web 2.0 applications and it has worked wonderfuly.  This has not only made our developers much more productive but also happier as they are not spending time chasing hard to find bugs that often crop up in loosely typed systems.

Posted by Swarn Dhaliwal, Ph.D.

Dr. Dhaliwal is an experienced SUN Certified Java Developer with a master's degree in Computer Science and more than 8 years of comprehensive Java implementation experience using a variety of J2EE technologies.

    

Posts by Topic

see all
Request a Complimentary Docker Consultation

An Open View

Vizuri Blog

Subscribing to our blog is a great way to stay up to date with the latest information from Vizuri, as well as our strategic partners. We focus on providing a range of content that is practically useful and relevant from both a technical and business perspective.

We promise to respect your privacy.

×