Flex Test-Drive for Java Developers. By Christophe Coenraets Last update: September 6th, 2006 UPDATE (1/12/2007): I put together a Tomcat-based Test Drive Server that includes these samples running out-of-the box. Read this post for more info. The objective of this test-drive is to give you, in a very short amount of time, an understanding of how Flex works and what it can do. This test-drive consists of a series of samples kept as concise as possible (typically between 10 and 50 lines of code) to clearly expose features of interest. The samples focus primarily on using Flex with a Java back-end. The intended audience is Java developers with no prior knowledge of Flex.
A few things to know before you start... The Flex programming model is made of: MXML, an XML language used to declaratively lay out the user interface of your application. There are different ways you can use the Flex compiler (mxmlc): You typically don't use the web compiler in a production environment. Installing the Test Drive Files Run the sample: More info: Connecting Flex and Java using HTTP Service. « Me oN_Tech,Life and Bakar…… Finally I am writing my first post On Flex And Java. There is a saying that tomorrow never comes, and that was what kept me away from doing this post .But today I promised myself that I will post my first pure techy article on flex and java, so I am doing it finally.
Initially I had a kick ass time integrating flex with java but finally it was done. Ya, its not that there aren’t enough material on Google Baba(That’s what I call google)the thing is I wasn’t intelligent enough to understand them at the first go, but once I did I enjoyed making flex and java apps more than someone would have enjoyed having Beeeeeep…. With someone of the opposite gender ya even the same gender for some people..you never know.Ok ok lot of Bakwaas, now lets start ….. IDE info: For JAVA I am using NetBeans-my personal favourite you can do it with eclipse too or shoot me a query if you face any difficulty .For FLEX I am using FlexBuilder-3. Step-1 Here’s the code: Form1.mxml layout=”absolute”> method=”POST” Step-2:
Intégration de Flex 3, BlazeDS et Spring sous Flex Builder 3. Dans ce tutoriel, nous allons mettre en place une application RIA composée d'un client riche Flex 3 s'exécutant au sein d'un navigateur web via le plugin Flash Player et d'un serveur d'application JEE exploitant Spring et BlazeDS. Dans cette architecture, le client Flex réalise des appels de service s'exécutant au sein du serveur d'application JEE.
Pour cela, j'ai décidé d'utiliser les appels de type RPC (Remote Procedure Call), et plus spécifiquement le composant RemoteObject de Flex, permettant d'invoquer des services Java, sans avoir à se soucier de la sérialisation/désérialisation des objets échangés entre Flex et Java. BlazeDS est une brique open-source, fournit par Adobe, supportant les appels RPC via RemoteObject. En pratique, il s'agit d'une servlet responsable, entre autres, de : localiser et invoquer les services Java désérialiser les données Flex reçues en instances d'objets Java et vice-versa Dans notre architecture, Spring est utilisé comme container IoC. II-a. Sélectionnez <? BlazeDS, and Java Together – A Simple Tutorial « Raajasoft’s Weblog.
Steps for Using Flex With Java 1. Note my development system setup. If your system setup is different then you’ll need to adjust these instructions. a. Windows XPb. Tomat 6.0 installed in C:\Program Files\Apache Software Foundation\Tomcat 6.0\ referred to as [tomcat-home]c. Tomat server running on port 8080d. 2. A. 3. A. D. I. Ii. Iii. Iv. 4. Package example;public class HelloWorld {public HelloWorld() {}public String getHelloWorld() {return “Hello From Java!”
Compile the Java source file into a class file (HelloWorld.class). A. 5. <source>example.HelloWorld</source> 6. 7. A. 8. 9. 10. Trouble-shooting Tips If you change the HelloWorld Java file then you’ll need to copy the new class file into the [tomcat-home]\webapps\blazeds\WEB-INF\classes folder in the correct package.
If you change the remote-config.xml file, you’ll need to stop and restart Tomcat. Summary: Up next – sending information from Flex to a Java class.