Data Centric Rapid Application Development one of the star-strickers in the Flash Builder 09 BETA league ensures seemless connectivity between Flex client and Java back-end. Said so, it promises literally “ZERO” Flex code to build a Rich Internet Application.It also provides kick-ass support for client-side Data Management and Paging.
Let us build a sample Inventory application which displays all the mobile phones available in a mall.
Pre-requisites:
a) Downloadand install Flash Builder 4 BETA from http://labs.adobe.com/technologies/flashbuilder4/
b) Download the latest BlazeDS release build from http://opensource.adobe.com/wiki/display/blazeds/Downloads
FYI, BlazeDS is the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Adobe® Flex™ and Adobe AIR™ applications for more responsive rich Internet application (RIA) experiences. In short, a bunch of libraries to connect ColdFusion or Java back-ends to Flex.
c)Basic knowledge in Java Programming.
d)ZERO knowledge in Flex Programming
BlazeDS Set-Up:
BlazeDS comes bundled with Tomcat, but one may also deploy it on other servers like Apache,JBOSS etc.In this post i would assume the BlazeDS sits on in-built tomcat.
a) Go to tomcat\webapps\blazeds\WEB-INF and uncomment the servlet definition and mapping for “RDSDispatchServlet” and set the <param-value> as ‘false’.
b) Kindly set up your data base as mentioned here
c)Add the following class files from Files
and place it under tomcat\webapps\blazeds\WEB-INF\classes\com\random.
d)Open remote-config.xml from tomcat\webapps\blazeds\WEB-INF\flex and add the following mapping:
<destination id=”MyService”>
<properties> <source>com.random.Inventory</source> </properties>
<adapter ref=”java-object”/>
</destination>
e) Add the mysql jdbc jar file “mysql-connector-java-5.1.7-bin” to tomcat\webapps\blazeds\WEB-INF\lib.
Your BlazeDS set-up is now complete, GOTO tomcat\bin and start the server.
Here are the step-by-step instructions to achieve the workflow:
a) Launch Flash Builder and create a Flex-BlazeDS project as shown in the image below:

Project Creation

Server Configuration
Click NEXT from “Project Creation” wizard and set the
server configuration based on the BlazeDS installation directory,click “Validate Configuration” and FINISH.
b) Goto Data->Connect to BlazeDS..
c) An authentication dialog will pop-up, select “No password” check-box and click OK
d)In the Import BlazeDS/LCDS service wizard, enter the service name as “MyDestination”, select the destination and FINISH.

e) Click on J2EEProject.mxml and switch to the design view.
f) Go to Components->Data Controls, select Data Grid and drag-drop onto the design view

g) Now drag-drop getAllItems functions onto the Data Grid. The preview is shown above.
h)Context click on project and select ‘Run Application’ . All the values in the data base gets populated in the data grid launched in the browser.
Similarly all the CRUD operations can be performed including client-side Data Management and Paging without any Flex code.
Wanna know what’s the magic ?? Hoping to get back soon with the MAYA “behind the scenes”
Now how many of us agree that Java Developers can tie KNOT with Flex for their RIA development ???
Thank you for this. It’s really imformative stuff.
I enjoy to read balajisridhar.wordpress.com.
sarasota teeth whitening
Hi…sorry for the inconvinience…
Now have updated the link.
Please follow the cookbook and provide your feedback
Thanks,
Balaji
Suresh,
Thanks for your feedback!
What file are you expecting? Is it the database schema(dump) or the java file which calls the database?
Now I get that Suresh!
Firstly JAVA files get converted to the .class files(the one i have attached).
I shall mail you the JAVA files which i have used, try editing those to meet your requirements.
You may just need to change your DB credentials, table/database names.
Next you need to compile those JAVA files and then place it under classes folder under the blazeds/classes.
Please revert back if you face any issues
Suresh,
I have sent them over mail.
Please let me know if you encounter further issues.
Thanks,
Balaji
Hello Brian,
I have mailed across the files to you