Accessibility

Flex Article

Providing a Flex Front End to Your Struts Applications


Christophe Coenraets

Christophe Coenraets

www.macromedia.com

Table of Contents

  1. Introduction
  2. Improving the View in Your MVC Architecture
  3. A Sample Struts Application
  4. Providing a Struts Application with a Flex Front End: Approach 1—HTTP Request/Reponse Integration
  5. Providing a Struts Application with a Flex Front End: Approach 2SOAP Integration
  6. Conclusion

Struts is an open source framework that facilitates the development of web applications based on Java servlets and other related technologies. Because it provides a solution to many of the common problems developers face when building these applications, Struts has been widely adopted in a large variety of development efforts, from small projects to large-scale enterprise applications.

Although Struts greatly facilitates the task of developers, it doesn't do much to improve the end-user experience: the end-result is still an application delivered in HTML and using the traditional HTTP request/response mechanism.

Developers—and organizations in general—are increasingly looking for solutions to provide their applications with a more engaging user experience that overcomes the limitations of HTML.

Macromedia Flex is a presentation server that addresses this requirement and allows developers to build a new generation of Rich Internet Applications (RIAs) that combine the usability of desktop applications with the reach of traditional web applications.

This article describes how you can provide your Struts applications with a rich front end using Flex technology. The objective of this article is not to make a case for Rich Internet Applications. It assumes that you already understand their value. This article focuses on the Flex/Struts integration from an architectural and technical point of view.

To run the code in this article, you may want to join the Flex Beta. Flex runs on top of a J2EE Application Server such as Macromedia JRun, IBM Websphere, BEA WebLogic, or Apache Tomcat. In the future, Flex will also run on top of Microsoft .NET server. You can try or buy Macromedia JRun below:

Macromedia JRun




About the author

Christophe Coenraets worked at Powersoft—which then became part of Sybase—from 1994 to 2000. He started working with Java in 1996 and became the Technical Evangelist for the company's Java and Internet Application Division. Christophe then joined Macromedia as the Technical Evangelist for JRun, the company's J2EE application server. In this position, Christophe started working on Rich Internet Applications and on ways of integrating Flash front ends with J2EE back-ends. Christophe is currently the S enior Evangelist for Macromedia's new developer-centric Rich Internet Applications initiative. Christophe has been a regular speaker at conferences worldwide for the last 10 years.