Since last week, I’ve been immersed in coding and development education about various cloud applications.
Google Wave

First there were a couple of meetups about the Google Wave product that gave me a overview of some of the capabilities and requirements for developing applications around the Wave product. Google Wave is an interesting piece of social media that is a bit like chat and MediaWiki combined with WebEx.

The first talk on Monday, was about the federation server, which is the open source implementation of Google Wave. The idea is that you could have a Wave server inside your firewall that could protect your data, while also allowing for communication and interaction with other federated servers. The code is so new, that it is actually using a different protocol than the Google Wave servers are using.

This is a very early prototype, but the idea is that it will use standard XMPP servers to communicate between domains, and use typical certificate based trust mechanisms to authenticate between domains. The internal server could be implemented with rules to (for example) prevent patient data from being sent outside of the firewall in a conversation between a medical team and a provider at another institution.

The next talk on Wednesday was about writing extensions for Google Wave. These extensions are UI widgets (called Gadgets), and Robots, which add capability to Google Wave.

A Gadget is basically an HTML and JavaScript snippet that does something useful when added to a Wave. A Robot is a bit of code that interacts with the Wave as if it were one of the collaborators in the wave. The Robot can add participants, Gadgets and edit the contents of the Wave.

As an example, you could have a voting Gadget, that allows the collaborators to vote. A Robot could add the Gadget to the Wave,  tally the results, and write them out to a database.

A Robot can also do interesting things like watch the wave for keywords and make changes or respond. Some of the examples are a grammar checker that corrects grammar as you type, a code formatting and highlighting robot, and the classic Eliza conversational robot.

Next was the weekend long GTUG Campout at the Googleplex. This was a heads down coding adventure where the idea was to get a workable Google application up and running in 48 hours. I signed up for the campout a while back, with the intent of learning how to work with Google Wave.

I had signed up for a Wave sandbox account when it was first announced at the Google I/O conference, so I was able to play with it a bit, but hadn’t really had time to get started with developing anything. After the talk on Wednesday, I had a pretty good overview of how to get set up, so at least I had all the bits installed to parcipate.

So Friday came and I returned to Google once again. The idea was that we form teams to develop applications using the Wave extensions, so the first task was to come up with ideas and pitch them. After the 50+ people got through with their 5 minute pitches, we networked for another hour forming teams. There were many ideas that were very similar, and for the most part these groups joined up into a combined team.

After the teams were formed, the Google team gave another talk about developing Wave extensions, which was a great review and contained some things that aren’t really documented elsewhere (since the API is still changing). The slides from that talk became my guide to building my first robot, an experience that I’ll talk about in another post about the GTUG Campout 2009.

I use Google Reader to follow industry blogs about things like PHP and Java. One of the nice things that Google Reader does, is to automagically translate the page into English when the post is in a different language.

This is very helpful especially with blogs in subjects like these, especially since the international community is very active. Reader will give you a brief translated version of the feed, and when you click the link to go to the page, it typically forwards you through http://translate.google.com so you can read the page. For the most part, this yields a very understandable page that represents the subject the author was trying to convey very well.

To set this up in Google Reader, you just set the feed to automatically translate the page by clicking on the “Feed settings” button:

Translate_check_item

Notice that with the “Translate into my Language” checked, you’ll see “Translated by Google”  at the top of the page. The link to go to the post is now run through the http://translate.google.com with the appropriate languages so that you can read it, and if you click the “View original” link, you’ll see the summary in the original language.

In the above example, the feed looks like this, when I choose original language:

German feed

Clicking on the link for this post takes me to http://feeds.feedburner.com/~r/cakephp/~3/521947537/ which ends up at the blog for CakePHP & DIEVOLUTION, which looks like:

untranslated

Going back to the translated version, if I click on the link to go the the page, I get redirected to http://translate.google.com/translate?sl=auto&tl=en&u=http%3A%2F%2Ffeeds.feedburner.com%2F~r%2Fcakephp%2F~3%2F521947537%2F , which gives me the nicely translated page (below).

translated

So this got me to thinking: it should be a relatively simple thing to add a link to your page to send it to Google translate, to allow somebody to translate into their language, since it’s basically just an HTTP GET with parameters of the page, source language and destination language.

So I figured I’d try it with my blog first. I know the URL is http://blog.accuweaver.com, and my language source is EN (English). So to translate into German for instance, I need to create a URL that starts with http://translate.google.com/translate, and includes those two elements, and the language I want it translated to.

The parameters for the link are as follows:

parameter Used for value
u URL of page http://blog.accuweaver.com
sl Source language (English) en
tl Translate to language (German) de

So by putting these together, I get a link that looks like: http://translate.google.com/translate?u=http://blog.accuweaver.com&sl=en&tl=de, which when clicked will give me a German translation of my page.

Google also has a JavaScript widget that you can use to allow anybody to translate your page, which effectively builds the same sorts of URL’s for each language. You simply post some JavaScript code in your page which does some magic and places a little “translate tool” on your page (see http://translate.google.com/translate_tools?hl=en) and looks like the widget below: