Post Format

App Engine: first notes

Google makes it possible to run own web applications on their servers. I tried out their offer. Here are my first notes:

Requirement is the programming language Python. There is an SDK, which let you run your applications on your own computer before uploading. An there is also a tutorial.

I installed the SDK in version 1.1 and checked out the tutorial.

The SDK comes with its own webserver. You start the server with

$ helloworld

In the directory there must be a configuration file in the format Yaml. This file matches URLs to Python files or to images, etc . If the file does not exist, or it does not contain the required information, an exception is thrown.

Some files will be automatically created, and you can forget them easily:

a configuration file of the SDK in your userdir in file “.appcfg_nag” and a data store (practically the database) in userdir \ temp \ dev_appserver.datastore

Included is a small framework called WebApp.

It separates the Python code from HTML code. There is a template engine with Django-compatible syntax.

I had a problem with the templates, the XML header ()

at the beginning caused my browser not not display the result.

The template language itself uses curly brackets. This is quite compact. Unfortunately, the template can leed quickly to degenerated HTML code, you can non verify the template itself in the browser.

The Web application uses neither the otherwise ubiquitous SQL databases nor the file system to save data. Instead there is a special storage. Ver nice is: you can simply inherit a class from “db.Model”, and you can read and write complete objects to the data store. You do not take care of the instance variables, and you also do not declare any database tables. An SQL-like query language is also available, but apparently this is more “syntactic sugar” than real SQL.

Author: Karsten Meier

Weil ich gerne Probleme löse bin ich Informatiker geworden. Ich berate und Konzeptionieren und entwickle mit fast allem, was einen Prozessor hat.

Leave a Reply