2008/06/30

Create New Applications Through a Script

The GAEO project provides an useful script -- bin/gaeo.py. This python script helps you create an blank(but includes the necessary files) Google App Engine application. The usage of this script is very simple, just type this command in your console:

# python $GAEO_HOME/bin/gaeo.py foo

then, the script will generate a directory whose name is `foo` and the application files are included.

After generating the project, start up the dev_appserver under the generated project directory and you will get

on http://localhost:8080 .

If you use Eclipse and PyDev as your IDE, you may add a -eclipse option while using the generation script.

# $GAEO_HOME/bin/gaeo.py --eclipse foo

Then, the script will additionally generate the project files needed by Eclipse and PyDev.

The script has been committed into the latest repository or you may download the nightly built archive from the project site. Just use it!

2008/06/25

Never Set template_values Again!

Since Google App Engine uses django's template system, once you call the template rendering method, you have to set a template_values (or context) dict first and send it to the template.render method so that the template may use the variables. If you forgot to set some necessary variable in this dict, you will get errors from template rendering if you use it.

GAEO, now, automatically send the all instance variables of the controller's instance. That means if you write


self.msg = 'abcd'
self.foo = 'bar'


in your action (controller's method), and you can use msg and foo variable without setting the template_values. It's a cool feature, isn't it?

2008/06/19

Why we need a framework on App Engine?

Google App Engine has provided a webapp framework, however, the webapp framework is pretty simple and lack of many useful helper methods (functions) for processing web data (requests). Google App Engine Oil (GAEO) tries to enhance such a framework and provides more useful helpers.

The GAEO project is opened and hosted on Google Code. It is a very young project and we are hard working on it. If you have any idea or suggestion, please let us know. You may leave issues on the project home or messages on our discussion group. We listen to you to make this project much better.