Welcome to Ananth's Blog!

Developing a Rich Internet Google App Engine Application using Adobe Flex

Print the article

This entry was posted on 4/26/2009 11:18 PM and is filed under Adobe Integrated Runtime,Flex Builder,cloud computing,AIR,Google App Engine,Adobe Flex,SOA.

Google App Engine (GAE) is a Cloud Computing platform where a developer can build a cloud application and host it on Google servers. GAE at this point of writing supports Python and Java programming models and offers a set of services.The Getting Started documentation of GAE provides several examples to build a GAE application. However these applications are HTML based and do not provide details of building a Adobe Flex based Rich Internet Application client. Hence my intent in this series of posts is to discuss the details of building a GAE application with Flex as the client application providing a number of examples. In this post let us examine the key concepts behind building a Flex based RIA for Google App Engine.

I will discuss the examples using Python as the backend programming language and will assume Windows XP or Vista client machine.

Let us consider a simple problem as below:

1. In the server side logic we will authenticate a user with Google Accounts
2. Depending on success or failure of authentication we will display a suitable message in the Flex application

To implement the solution to this problem, we will:

1. Develop the server code in Python that performs some function using the Services offered by GAE SDK
2. Develop the client code in MXML using Adobe Flex Builder 3.0
3. Test the application using the localhost server, bundled with GAE SDK
4. On successful local testing, deploy the application (both client side and server side) on GAE
5. Test the final deployed application

As a first step, set up the development environment as below:

1. Obtain a GAE application ID by signing up - see http://code.google.com/appengine/
2. Download the GAE SDK for Python
3. Make sure you already have Python 2.5. If not download from http://python.org/ Since GAE supports Python 2.5, it is better to download the same version though higher versions may be available from http://python.org site
4. Make sure you have the Flex Biulder 3.0 installed in your system. If you do not have one, you can download a trial version from Adobe web site. For students Flex Biulder is free.

Before we begin, it is useful to review how Flex connects to a server application.

The earlier generations of Web applications were server centric. The business logic (in this example, "Authentication") executed on server and in addition to this, the presentation content was also generated in the server. You may review the examples provided under Getting Started section of GAE where this point becomes very obvious.

We may note that the sample code in Google Getting Started documentation has a get method that emits the necessary HTTP headers and also the HTML content for the display. This is in line with typical HTML based applications that often have a page based metaphor than an application metaphor.

Since the Flex applications run on the client and are responsible for handling the presentation, they do not require HTML to be generated from the server. Instead, Flex applications just need the data from the server and they can render the data and manage them on the client. Flex applications interact with the server through well defined, standard SOA model. Broadly, three major protocols are supported:

1. SOAP/WSDL based web services
2. REST based services
3. Remote Object protocol that uses Adobe's AMF binary format

In my next post, I will show how to build the client and server applications for Flex/GAE.

 

What did you think of this article?




Trackbacks
Trackback specific URL for this entry
  • No trackbacks exist for this entry.
Comments

    • 6/22/2009 12:56 AM Jorge wrote:
      Ananth, I was desperately looking for someone to write a tutorial like this one. I need to make an AIR Desktop app to exchange data with GAE, and I am an experienced programmer, but this is the first webapp that I have to develop. Please keep up the good work and if you could possibly write a tutorial that could be understand by beguinners like me would be fantastic. Also, could you explain the advantages of using Python rather than Java?

      -Jorge
      Reply to this
    • 6/29/2009 12:12 AM Markus wrote:
      Are you going to follow this post with new tutorials on Flex and Gae?
      Reply to this
    • 8/5/2009 12:42 PM Chinmay wrote:
      I have a sample POC on integration of Flex + GAE. I have made a small AFCS app for it. u can visit it @ http://chinmayguest.appspot.com/
      Reply to this
    • 10/17/2009 11:48 AM Stanley wrote:
      Tell us more. Where is the next post in this series?
      Reply to this
    • 10/23/2009 6:45 PM software developer wrote:
      Cool,

      This is great advice to help
      Develop a Rich Internet Google App

      Thanks
      Reply to this
    • 1/4/2010 2:54 AM eduardo wrote:
      Hello, when i try to use a "POST" HttpService woth a python backend, gae always responds as if it were a GET request. Have u try this before???
      Reply to this
    • 4/2/2010 9:09 PM Boni wrote:
      In my search in the internet needs is very important for me, especially related to broadband, which is important in accessing the internet. one here who can solve my problems in the selection of a broadband. I thought it was a good article
      Reply to this
    • 4/13/2010 11:29 AM IT Support Melbourne wrote:
      This is really interesting. I am still trying to wrap my brain around not having to have HTML generated from the server. Looking forward to your next installment. Thanks for taking time to post this.
      Reply to this
    Leave a comment

    Submitted comments will be subject to moderation before being displayed.

     Enter the above security code (required)

     Name

     Email (will not be published)

     Website

    Your comment is 0 characters limited to 3000 characters.