wood burning stoves 2.0*
The moose likes Struts and the fly likes Flex with Struts; Is it good? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Flex with Struts; Is it good?" Watch "Flex with Struts; Is it good?" New topic
Author

Flex with Struts; Is it good?

Ranveer K Kumar
Ranch Hand

Joined: Sep 13, 2009
Posts: 64
Hi all,

I read in some tutorials on the web that implementing Flex on Struts is not good design pattern !!!.

Because I don't know Flex (try to learn) so unable to understand why.

Q. 1> Why is it not good design ?
Q. 2> How to implement best way Flex RIA with Struts if require?


thanks
regards.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Who says it's not good?

It might not be the way *I'd* do a Flex project, but Struts serves up data suitable for a Flex front end just as well as anything else. (Well, Struts 2 does--you don't mention which version of Struts you're using. I wouldn't recommend Struts 1.)
Ranveer K Kumar
Ranch Hand

Joined: Sep 13, 2009
Posts: 64
David Newton wrote:Who says it's not good?

It might not be the way *I'd* do a Flex project, but Struts serves up data suitable for a Flex front end just as well as anything else. (Well, Struts 2 does--you don't mention which version of Struts you're using. I wouldn't recommend Struts 1.)


I am using Struts 1.2 (or 1.3). I am very NEW to Flex so wondering about the front end.
As flex getting data as XML (other format too but for now) and struts forwarding to response(jsp) so my Q is how to forward to Flex?
As I understand (on basis of some tutorials, may be I wrong) flex getting data with struts as follows:

Action (forward)> JSP > Flex

Here JSP converting data (here as XML) for Flex. Now I want to know is it possible to not use JSP and direct send from Struts Action to Flex, if possible then is it the good way...
please suggest...

thanks
regards
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There are any number of ways to create XML.

If you're not doing anything *but* Flex, however, there are easier ways, and there are *certainly* better ways than Struts 1.
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
Flex with Struts is a pretty good design.

I have converted a Struts based Web (html front-end) application to one with a Flex front-end.
We simply wrote new set of JSP pages which started returning XML instead of HTML, and in struts config file we forwarded to these pages. So, the server side we had a good solution whereby we could return HTML or XML!

Other good things:
1. Flex has a Flex IDE (now called Flash IDE), which is created out of Eclipse IDE.
2. Flex uses ActionScript as programming language; which is very similar to Java.

So, for Java Programmers, Flex and Struts are a very good combination.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Flex with Struts; Is it good?
 
Similar Threads
* Welcome Satish Kore
Struts 1 or 2?? or JSF?
AJAX or Flex which one is better for front end in Struts project any Why ?
about struts with flex itegration
Making the case for Flex - one question