Use Go to Implement your Android Backends


A couple weeks ago I wrote a library that simplifies the interaction between Go-based application servers and Google Cloud Messaging servers. I plan on covering GCM (both the application-side and server-side aspects) in more detail in a future blog post, but for now I will just leave a link to the library to encourage more people to write their GCM application servers using the Go Programming Language (Google App Engine, hint hint).

…but why Go?

I’m glad you asked. There are several reasons:

  • Go is modern. Programming languages like C, C++, and Java are old, designed before the advent of multicore machines, networking, and web application development. Go was designed to be suitable for writing large Google programs such as web servers.

  • Go is concise, yet familiar. Tasks that require 40+ lines of code in Java (i.e. setting up HTTP servers and parsing JSON responses) can be done in 1 or 2 lines. Go significantly reduces the amount of work required to write simple programs, and yet the language’s syntax is not too radical, still resembling the most common procedural languages.

  • Go is easy to learn. Learn the language in a day: A Tour of Go and Effective Go.

  • Go was invented at Google. Enough said. :)

That’s all for now… but expect a lot more on GCM, Google App Engine, and Golang later! The comments are open as always, and don’t forget to +1 this post!

+1 this blog!

Android Design Patterns is a website for developers who wish to better understand the Android application framework. The tutorials here emphasize proper code design and project maintainability.

Find a typo?

Submit a pull request! The code powering this site is open-source and available on GitHub. Corrections are appreciated and encouraged! Click here for instructions.

Apps by me

2048++ is hands down the cleanest, sleekest, most responsive 2048 app for Android! Play Store