How to develop Google Wave Extensions and Gadgets Using .Net

Google Wave has been out of sandbox for some time now. Google started its open beta pre-view with about 100,000 accounts. There has been lot of buzz in development community about Google Wave framework and writing extensions and widget to build some really useful and cool applications. And recently a lot of interesting extensions have been published.

One of the restrictions on development of extensions at this time is that these can only be hosted in Google App Engine environment. Google only supports two languages (and its derivatives) on Google App Engine, Java and Python. Google has mentioned that in future they will support more languages on their cloud computing environment, but there is no definite time line for that. That leaves .Net development community in a fix as far as Google Wave extension development goes. But as we all know, where there is a will there is a way.

If you look at communication mechanism of Google Wave, there is a way to do extension development in .Net framework and host your robot on ASP.Net web server. Google wave client communicates to robots by sending request to a URL with all the data and then wait for response and act on it. Currently this URL has to correspond to an application hosted on Google App Engine environment. If we can find a mechanism to redirect these calls from Google App Engine application to a URL hosted as ASP.Net application and send the response back to Google Wave client, our job is done. As you may have guessed it that we are talking about writing a light weight proxy to do this job. Soon you will find out that Google has already provided that proxy.

Wave Extension API

Google has provided with Java and Python API to develop wave extensions. There is a .Net port available on Google code at following location.

Google Wave Extension API For .Net

Getting started

There is nice description available at following link about how to get started with your first Hello World application. I will not go into details about that. But I will point out some of the issues that you will run into when you are writing your first wave extension. These are some of the issues I ran into personally. If you have questions, feel free to send me message and I will try to answer them.

Google App Engine Account

This is your first and foremost step in development. You need to create a Google App Engine account. It is free. You can get started by clicking on this link.

Google App Engine

After you are done creating your account, create an application in app engine dashboard. Make sure that you pick some name that is relevant to your extension. This is the name by which your extension will be known to world. Do not worry about uploading any code or anything at this point.

App Engine SDK

On the page from where you started with app engine account, there is a link on right side to down load Google App Engine SDK. Download python SDK and install it. When you install Python based app engine SDK, it will require that you have Python framework installed on your machine. Install will provide with links and everything if you do not have it installed it already.

Uploading Proxy Application

Follow the instructions from WIKI page about modifying the files to point to your ASP.Net server. Launch Google App Engine launcher application. Choose File > Add Existing Application menu option and not File > Create New Application option. If you choose the latter option, the application will add main.py file in your application folder. That file contains a plain hello world application. And the launcher application also overrides app.yaml file and make it to point to main.py instead of proxy.py file. When you will upload the application, you will notice that when you access your robot it always displays Hello World message. So remember to delete main.py file from your folder if it is there and make sure that app.yaml is pointing to correct file for its entry point.

Creating ASP.Net handler for robot

Follow the instructions from WIKI page to create your Hello World message robot. And test it out.

Adding your robot in Wave

To test your robot use the following steps

  1. From “Manage Contacts” section, add your robot extension account to the list. Your robot account is identified like myappengineappname@appspot.com. It is that simple. That’s why I mentioned earlier that make sure that you pick appropriate name for your application. It is also important that this account exists in your contact list before you add it to your waves. Yes a robot is like a real participant in a wave.
  2. From Google Wave client, click on “New Wave” button to start a new wave.
  3. Add your robot as one of the participants in the wave.
  4. You are done. Now your robot is getting event notifications from wave client like a real participant.

It could not be simpler than this. Did I mention that only hard part in this whole process is to get Google Wave account.

This was just to get you started. In next post I will discuss some details about life of a wave and event notifications.

Search

Social

Weather

-4.8 °C / 23.4 °F

weather conditions Clouds

Monthly Posts

Blog Tags