Monday, February 9, 2009

experience with learning Google App Engine and Python

In my endless aim to learn about the web technologies of the web, I finally came across to using Google App Engine. My motivation to start using it was its promise of development environment where I didn't have to worry about the details of deploying my application.

App Engine provides a integrated environment that allows you to build an application on your local dev box as it would work exactly on the live site. Some would find this constricting, but I just looked at as new platform where I didn't have to worry about the database setup, massive configurations files, and finding hosting for final project.

I've been working on a side project for awhile, which has gone through many iterations of development (in short I was over thinking it). One of the iterations started with me developing on Google App Engine where I got to chance to build using Python. Google uses Python internally for many things (apparently), but they also choose it because it allowed to easily create a sandbox environment.

Learning Python from a Perl and Ruby background has shown me the true meaning of there is more than one way to do it. In dynamic languages, you usually have control of how the program flows, Python follows this same convention, but doesn't provide so many avenues to do so. For example, in Ruby there are about 5 different types of eval, as far as I can find Python has one. These conventions (not restrictions) of Python make you think of your program in a different order of logical steps. Its been kind of PITA because somethings that come intuitive in Ruby just didn't come to me while working in Python.

The sandbox environment of Google App Engine is built the same on the desktop and the deployment environments. It follows the brand of WYSIWYG from a programming stance. The limitations to the sandbox is pretty much that the Python cannot run C-based libraries and access the OS for more advance I/O features.

Because only pure Python applications can run in the sandbox I had to choose a web framework that would work within it. Google App Engine comes with its own lite web framework, but it was just bits and pieces of Django patched together. Web frameworks are plentiful in the Python realm, and webpy seems to be the simplest and easiest to pick up, which instantly attracted me to it.

After working 2-3 weeks learning Python and building my application, I came to the conclusion that ran into too many limitations of my knowledge of Python. I would always wanted to do something that would always bring back to "I can do that in Rails easily".

Mid-entry UPDATE: It appears that Google is planning on supporting Java on Google App Engine. There are even early reports coming in of early Rails development using JRuby on Rails. This is some exciting stuff, which means I will certainly be revisiting App Engine in the near future.