views:

1529

answers:

4

I have an old (around 5 years) enterprise application that I manage. Recently we got a go ahead for sprucing up the UI with flex. Keeping in mind that we want to utilize the current code base in struts (it's a fairly big application) , as I see it , I have three options:

  1. Flex BlazeDS
  2. Flex Tag Library
  3. FxStruts

BlazeDS is an open source and very efficient option when our entire application is in flex and we use our backend application just to provide service. But since the application is big , it's difficult to convert everything to flex.

Flex Tag Library is also an open source but was only developed for Flex 2 and no upgrade has been provided for Flex 3. And also it can create some performance issue if not used properly (or so I've read)

FxStruts is also an open source and can be used with any flex version. The biggest advantage is we don't have to change our server part and we can still utilize rich flex UI and we can still maintains our traditional UI for external clients where we may not use flex. It is basically a combination flex http service and blazeds serialization.

Which one might be better? Are there any other approaches? Eventually , we would also want to move towards spring/mvc or other framework. I do not want to get bitten by making an incorrect choice here.

Thanks.

+1  A: 

I think you want to use Flex as a UI in ur existing application.

I am working on flex since last 1.5 year and from my experience so far i can give u a suggestion to proceed with BlazeDs. You dont need to convert ur whole application to the flex. You can still keep ur html/JSP part along with flex.

may be you can use Cairngorm framework in flex as its an MVC implementation in Flex. You wont be find more difficulty if you are switching only ur "View" part to Flex.

suggestion: try merapi a cool interface between java n flex

Chinmay
+2  A: 

With BlazeDS, you can easily expose your existing java services to the Flex client by configuring an xml file on the server. You can send and receive strongly typed objects (from ActionsScript to Java and vice versa) via both RMI and JMS. Just make sure your AS and Java classes have the same property names and types, register a class alias on the client and the Flash Player will do the rest.

Working with Flex and BlazeDS is even simpler when you use the Spring BlazeDS Integration, assuming you are using Spring.

You can also use the Spring ActionScript framework for dependency injection and an MVCS architecture in the Flex client. More info: http://www.herrodius.com/blog/160 (shameless plug)

Christophe Herreman
+1  A: 

Go with Flex-BlazeDS option. Simpify the architecture by removing Action servlet, action class and JSP that returns the presentation with a simple POJO that just returns the data to be displayed in those Wen pages that you'll decided to turn into Flex (it doesn't have to be all-or-nothing - you can keep most of our app as you have now, gradually introducing Flex pieces to it).

Things to pay attention to:

  1. Scalability. If your app has more than 500 concurrent users, you will need to go through some advance coding to keep the server up.

  2. Think of changing the app design to keep the state on the client for all portions that you'll re-write in Flex.

  3. Think of the ways to exchange the server-side user session info between the old (JSP) and new (Flex-BlazeDS) modules.

Yakov Fain
+1  A: 

It depends on what your server side implementation is. If you have a Struts implementation, I would not venture to re-implement that, as moving to Flex would improve the user experience by switching the view in a traditional MVC. Since struts is a MVC framework, you can easily replace the view with Flex. See this blog post for integrating flex, Struts 2.0 using maven as the build tool and the XSL result type in Struts 2.0 framework.

Flex Integration with Struts 2.0

Hope this helps.

Thank you

Krishna