Thursday, June 13, 2013

[Gd] Building Google Apps Extensions running on Google Cloud Platform

| More

Cloud Platform Blog: Building Google Apps Extensions running on Google Cloud Platform

Today’s post is from Alex Kennberg, VP of Engineering at Synergyse. In this post, Alex describes how their company uses Google Cloud Platform to build their training solutions for Google Apps.



Synergyse chose to focus on enhancing training for Google Apps because of the continuous innovation it brings to the enterprise and education spaces. We built Synergyse Training for Google Apps, a fully interactive, measurable and scalable training solution that has been deployed throughout organizations and educational institutions globally.



We chose Google Cloud Platform and Google Chrome Extension as our technology stack. Going with Google App Engine is a perfect fit for us, because as a cloud service we don’t have to worry about IT issues with our servers and we get automatic scaling. At an early stage of development and deployment it might be especially hard to predict what the next year of usage is going to be like. App Engine allows us to focus on our product and not worry about fine details of operating the backend as much. App Engine also seamlessly connects to other Google services.







It’s a pleasure to be able to import a new service by simply importing the right official library. In matter of hours, I was able to drop in authentication (OpenID), database (Google Cloud SQL), storage and OAuth. Everything worked as expected. Since the libraries handle most of the hard work, our backend code is very lean and allows most things to be done by the client-side Javascript.



Pro Tip: Before deploying the latest code to App Engine, change the version in “appengine-web.xml” file. Next, go to the App Engine Dashboard and select your app. Choose Versions in the menu. From here you can choose who gets what version of your backend. Default version is served to everyone, while traffic splitting lets you test new versions on a smaller set of users first. For staging, we force our extension to access a specific version of the backend by pointing it to ..appspot.com.



In order to overlay our user interface (player, menu, etc) on top of Google Apps we built a Chrome Extension. The extension is written in Javascript, using standard browser APIs, jQuery and Google Closure. Specifically, our templates for the HTML parts are using Closure Templates and Javascript is compiled with Closure Compiler.









Google Closure Templates are well designed in that they have short-form commands and discourage me from adding complexity into the views. They also translate into readable Javascript and work well with the compiler. I use the compiler to help catch bugs, minify and obfuscate our code. There are compiler extern files that declare Chrome Extension and jQuery APIs here. To watch for code changes and automatically re-compile the templates and Javascript, I made this open source project.



Synergyse Training for Google Apps uses Google Cloud Platform and Google Chrome Extension to deliver its training to people around the world. With Google App Engine we get security, reliability and automatic scaling out of the box, which lets us focus on core product development. Google Chrome is a perfect vehicle for overlaying Synergyse user interface on top of Google Apps using the latest standard web technologies, and makes for an easy deployment process to our customers.



- Contributed by Alex Kennberg, Vice President, Synergyse





URL: http://googlecloudplatform.blogspot.com/2013/06/building-google-apps-extensions-running-on-google-cloud-platform.html

No comments: