Flex / Spring Mobile Test Drive: Learn the Best Way to Build Java-Backed iOS, Android and PlayBook Apps

Flex is a powerful application framework for building first-class mobile applications for iOS, Android, and the BlackBerry PlayBook using a single programming model, a single tool, and a single code base.

If you are a Java developer, the Flex programming model is also easy to master because it is syntactically very close to Java. The Flex IDE (Flash Builder) is a plugin on top of Eclipse, which means that you can write, debug, and profile your client and server code in the same development environment.

You can also easily integrate Flex applications with a Java back end using the Remoting and Messaging services provided by BlazeDS (open source) or LCDS (commercial license). For Spring developers, the integration is even easier and more powerful using the Spring/BlazeDS integration project, which makes the Flex and Spring combination the best way to build cross-platform iOS, Android, and PlayBook applications with a Java back end.

I put together a new “Flex / Spring Mobile Test Drive” to help developers get started building these applications. The Test Drive consists of a web application with BlazeDS and the “Spring/BlazeDS integration” preconfigured and ready to use. It also includes two sample mobile applications running “out-of-the-box”: An Employee Directory and a Trader Desktop. The Employee directory demonstrates how to use Remoting to access Spring services. The Mobile Trader focuses on the Messaging integration: It shows a Spring component pushing real-time market data updates to a Flex applications.

The project is hosted on GitHub: https://github.com/ccoenraets/flex-spring-mobile-testdrive

Installation

  1. Deploy flex-spring-mobile.war to your app server.
  2. Import the projects into Flash Builder: (If you don’t have Flash Builder, you can download it here)
    • File > Import > General > Existing Projects into Workspace
    • Select ccoenraets-flex-spring-mobile-testdrive as the Root directory
    • Select all the projects (EmployeeDirectoryJ, flex-spring-mobile, and MobileTraderJ)
    • Click Finish
  3. Running the EmployeeDirectory
    • Open config.xml in the src folder and modify the endpoint to match the hostname and port number of your app server
    • Right-click EmployeeDirectoryJ and select Run As > Mobile Application
    • Select a target platform (iOS, Android, or BlackBerry Tablet OS), select On desktop as the launch method and select a device to simulate
    • Click Run
  4. Running the MobileTrader Application
    • Right-click MobileTraderJ and select Run As > Mobile Application
    • Select a target platform (iOS, Android, or BlackBerry Tablet OS), select On desktop as the launch method and select a device to simulate
    • Click Run
    • The Settings view is automatically activated the first time you run the application. Enter the MessageBroker base URL, for example: http://localhost:8080/flex-spring-mobile/messagebroker (modify the endpoint to match the hostname and port number of your app server), select a Channel type, click Save Settings, and click Start Server Feed.
    • Access the Watch tab: The list should be automatically updated with the (simulated) real time updates pushed from the Spring web app.

11 Responses to Flex / Spring Mobile Test Drive: Learn the Best Way to Build Java-Backed iOS, Android and PlayBook Apps

  1. Vipin Gupta September 2, 2011 at 9:06 am #

    I am a computer engineer.I want to develope an android application using java technology.Please guide me.How can I develope it

  2. archit anand September 14, 2011 at 9:41 am #

    i am pursuing computer engineering. I was working on a project based on android. I wanted to ask how can we develop android apps using adobe flex??

  3. Saidi Reddy September 28, 2011 at 5:59 am #

    Hi Sir, i have one query could u please help me , Panel control not supported in Flex Mobile Project in Flash builder 4.5. There is any alternate control to add some data dynamically (using Actin Script). please help me thanks in advance …

  4. Saurav CN October 2, 2011 at 3:37 am #

    Dude, you are the best!!!

  5. brooklyn October 3, 2011 at 12:41 pm #

    Why does flex framework is too heavy in file size and slow?

  6. مفكرة العرب October 3, 2011 at 6:13 pm #

    Thanks, this blog is very good!!

  7. sandy January 30, 2012 at 9:54 am #

    how to create Android service continueosly running in background and continueously checking tomcat server for updates.if updates happens in server ,service shows notification in mobile eventhough your application is not open.

  8. shyam February 8, 2012 at 5:07 am #

    Hi Christophe,

    Your blog is really great.
    Can you suggest me whic of the following below are better for Java/Flex Environment.

    1) Spring Flex Integration.
    2) Parsley Frameowrk
    3) Swiz
    4) Cairngorm.

    Can you help me with the advantages ,disadvantages which is optimized and the best framework to be used for Application Development that makes Application Lighter and Powerful.

    Thanks
    Shyam

  9. Ev Yemekleri July 25, 2013 at 9:33 am #

    How can we develop android apps using adobe flex?

Trackbacks/Pingbacks

  1. Cool Stuff with the Flash Platform - 8/30/2011 | Remote Synthesis - September 1, 2011

    […] evangelist Christophe Coenraets created a Flex/Spring Mobile Test Drive sample application that is available on Github to assist Java developers in learning how to develop […]

  2. Mobile Development with Flex 4.6 and Spring - December 9, 2011

    […] Flex Spring Mobile Test Drive is hosted on GitHub and documented here. Filed Under: […]

Leave a Reply

css.php