Mike 9.8.11

  • I was able to create and deploy a flex webapp on the google app engine and access it both from the web and from my phone.  This will hopefully work as a back end for our mobile application.
  • Now I need to figure out how to do what I was doing in Flex:
    • Authenticate:
      • The suggested method is OAuth 2.0 which is a pain for the user.  You construct a URL to a google authentication site specifying your application and what services you want access to.  You then open that URL for the user who enters their username and password in to googles site.  The site then displays a token string for the user to copy back in to your application which you use to make calls.
      • The oldest, easiest method is ClientLogin which is what I was using in Flex.  The user enters their information in to you application and you use it to make requests.  However, in Flex I was doing their through HTTP Requests which is much different in java.
      • I implemented an OAuth 2.0 version in about 20 minutes.  There were several good examples of how to do this in java.
      • After many hours of trying different things I was able to implement a ClientLogin version as well.  All the existing examples of ClientLogin appear to be outdated as the gdata library has under gone major changes (multiple times) since the original release.
    • List Spreadsheets
      • Once authenticated, this was (relatively) easy.  I used the gdata spreadsheet api to connect to the spreadsheet service and list the available spreadsheets for a user.  No where does it list what other jars are required dependencies so I figured it out through trial and error.  However, we can only execute very limited queries from API.
    • Queries
      • To run any kind of decent query we need another API.
      • The one I was using in Flex was the Google Query Language in the Google Visualization API but this is only available in JavaScript or via HTTP Requests.  So I will probably have to write some function that make HTTP Requests like I did in Flex.
    • gdata-java-client vs google-api-java-client
      • gdata-java-client is the “old” version of the java implementation I have been using and will probably do everything we need and won’t be deprecated for several years.  It is not mavenized, most examples are out dated and no longer work, and development has been halted.
      • google-api-java-client is the brand new version.  It is mavenized, has examples, and more APIs, and has plans for adding more but is in beta.