File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Flex and the fly likes Flex3 with Java - Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Flex3 with Java - Questions" Watch "Flex3 with Java - Questions" New topic
Author

Flex3 with Java - Questions

Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Hi Satish,

Nice to see the book and the work you had done. Congratulations first of all.

I have a few questions related to the context. Kindly bear with me if some of them sound very trivial/silly.

1. How exactly Flex and Java interact? Is there any specific protocol to bind the two technologies?

2. Apart from RIA, does Flex has something significant to offer?

3. One of the points in TOC (Table of contents) say that "Develop Flex applications to communicate with JSP and process data sent by the server in your Flex application.". It is confusing? I was under an impression that Flex is/may be a replacement for the other thin clients (like JSP, HTML etc.,).

4. How different Flex is from Swing?

5. I could get to know that Flex is well integrated with Actionscripting. Having said that Java has one called JavaFX. What does Flex have to do compete/beat the race?

6. You have mentioned about BlazeDS (an open source messaging engine and server for hosting flex based java applications). If I don't have a messaging component / requirement in my application, still should I need to use BlazeDS only?

7. How easily I can deploy my Java-Flex application on the regular containers like Tomcat, GlassFish etc?

8. To what extent Flex addresses the cross browser compatability? Should we have to download any plugins for running Flex based applications?

9. Ideally speaking, soon after hearing the word 'RIA' one word comes to my mind is 'heavy nature' for its thick client nature. What extent, Flex leverages this?

Thanks in advance.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Satish Kore
Author
Ranch Hand

Joined: Feb 10, 2004
Posts: 43
Hi Raghavan,



1. How exactly Flex and Java interact? Is there any specific protocol to bind the two technologies?

A. Flex as in front end framework resides on client machine so to interact with Java server you need to use one of Flex’s RPC methods such as HttpService, WebService or RemoteObject to invoke Java Servlet/JSP. After this point everything works traditionally on request and response model. You need to use BlazeDS or LCDS server side frameworks if your application uses AMF based method to communicate with Java i.e. RemoteObject etc.

2. Apart from RIA, does Flex has something significant to offer?

A. I suggest you to read http://www.adobe.com/products/flex/features/flex3/ for more information on features.

3. One of the points in TOC (Table of contents) say that "Develop Flex applications to communicate with JSP and process data sent by the server in your Flex application.". It is confusing? I was under an impression that Flex is/may be a replacement for the other thin clients (like JSP, HTML etc.,).

A. JSPs are end of the day Servlets so they are not only used for laying our UIs but they can also be used for implementing business logics. I have used JSP in my examples for the sake of simplicity since I did not wanted to cover Servlets and its lifecycle, mapping configuration and deployment in this book since it was out of scope. So in my example JSPs are used as an medium to retrieving data from backend and sending response back to Flex application. On other saying that Flex is replacement of JSP/HTML may not be accurate statement since both the technologies and their terminology and usage is different.

4. How different Flex is from Swing?

A. I don’t think you can compare these two technologies completely, since Swing is used for developing desktop based applications where Flex is still runs inside browser along with your HTML/JavaScript etc and integrates with variety of server technologies seamlessly and it is cross platform/browser.

5. I could get to know that Flex is well integrated with Actionscripting. Having said that Java has one called JavaFX. What does Flex have to do compete/beat the race?

A. JavaFX is very new and not matured enough at this point to compare it with Flex, JavaFX is still not able to run inside browser. So it would be difficult to comment on JavaFX. Again the platform that provides ubiquity of being on all platforms/devices/browsers has high number of developer adaption so in those terms Flex is leading at this point.

6. You have mentioned about BlazeDS (an open source messaging engine and server for hosting flex based java applications). If I don't have a messaging component / requirement in my application, still should I need to use BlazeDS only?

A. If you do not use messaging, push or anything related to AMF then you do not need BlazeDS or LCDS. You can still develop Flex application having RESTful request and response mechanism without the need of BlazeDS. See http://www.coderanch.com/t/469392/Other-Languages/Flex-Java-without-BlazeDS

7. How easily I can deploy my Java-Flex application on the regular containers like Tomcat, GlassFish etc?

A. Flex can be deployed on any J2EE supported servers, you can bundle Flex application as web archive .war as well.

8. To what extent Flex addresses the cross browser compatability? Should we have to download any plugins for running Flex based applications?

A. Flex runs on Flash Player plug-in of your browser and it supports all the browsers as long as it has compatible Flash Player plug-in. 90% of the browsers have Flash Player installed.

9. Ideally speaking, soon after hearing the word 'RIA' one word comes to my mind is 'heavy nature' for its thick client nature. What extent, Flex leverages this?

A. I am not sure I understand this correctly, but Flex UI framework provides you thousands of great looking built in components that are better than their desktop based component counterparts and also you can develop your own custom components to mimic desktop based application look and feel.


Thanks,

Satish Kore
"Flex 3 with Java" @ packtpub.com and amazon.com
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Satish Kore wrote:
9. Ideally speaking, soon after hearing the word 'RIA' one word comes to my mind is 'heavy nature' for its thick client nature. What extent, Flex leverages this?

A. I am not sure I understand this correctly, but Flex UI framework provides you thousands of great looking built in components that are better than their desktop based component counterparts and also you can develop your own custom components to mimic desktop based application look and feel.


Thanks,


Thank you very much for having answered the queries Satish. I shall look at the URLs you have given.

What I meant to ask was, how does Flex leverages the 'heavy nature' of applications ? Would not it be heavy in nature thereby offering slow responses ?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


What I meant to ask was, how does Flex leverages the 'heavy nature' of applications ? Would not it be heavy in nature thereby offering slow responses

Not sure I understand your thinking - why would a thick client offer slow responses? Is more likely to be slow to download since you down load an application as a whole rather than request it bit by bit (as you would in a normal web application). Thereafter responses should be quicker, since it can hold on to state.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Thanks Paul. But I thought the heavy weight components would take a longer time to get loaded onto the page before they are ready to serve the user. Is nt it?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Yes. Once there they could be cached. Also, a SWF can load other SWFs, so it is possible to componentise your application to reduce the initial download.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

Paul Sturrock wrote:Yes. Once there they could be cached. Also, a SWF can load other SWFs, so it is possible to componentise your application to reduce the initial download.


Thats great. I am not aware of this feature. Thanks Paul
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
Hi Satish, can you tell me from where i can download your book of flex and jsp.

Regards
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Links for places to get Satish's book are in his signature.
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
Thanks Paul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Flex3 with Java - Questions