Jim Lawless' Blog


Book Review : Using Google App Engine

Originally published on: Sat, 10 Oct 2009 01:37:47 +0000

Book title: Using Google App Engine Edition: First Edition ( May 2009 ) Author: Charles Severance Publisher: O'Reilly | Google Press Cover Price: $29.99 ( U.S. )

I've been interested to try out some of the free Cloud Computing offerings that are rising into vogue. The one that looked to have the lowest barrier-to-entry, was the Google App Engine (GAE).

I downloaded the local GAE development environment ( the Python flavor, not the Java edition ) and walked through the series of examples in Google's tutorial. Through the tutorial, I received a little exposure to the Datastore service and the Django-compatible templating mechanism. It was a nice enough introduction, but I wanted to know more.

I searched for some GAE books and found some good reviews of this text. I ordered a copy.

What I Skimmed

The book is a nice enough introduction to web programming in general. It contains chapters covering the mechanics of web transactions, the history of HTML and CSS, and a 30-page introduction to programming in Python ( 2.5 ).

I skimmed through these chapters as I suspect a fair number of web developers would do. I did briefly go through the Python tutorial and found it to be concise and informative. Actually, it begins as an introduction to general programming using Python.

A guess-the-number game is provided which serves as a reference model for some of the concepts. If they haven't already, they should snip this section out as a PDF and give it away.

The tutorial manages to introduce control-flow, strings, functions, lists, dictionaries and objects in a short span of pages.

I completely skipped the chapters that describe how to install the GAE development environment on various platforms. The author covers installation on Windows XP, Windows Vista, Mac OS, and Linux. No specific Linux distribution is cited. The installation instructions are probably similar for most distributions.

The Good Stuff

The book does a good job in leveraging the Django-compatible templating mechanism. I had seen some of these templates before, but was not overly impressed with the mechanism until I saw them use a convention that I wasn't used to.

In normal templating systems that I'm used to, it's common to leverage an include directive to pull in common snippets of HTML and/or other template code for common headers, footers, and such. The convention that the author used for the Django templates was different.

In the template scheme he used, a baseline template is defined with a "body" section. All other templates refer to this baseline template and override the content of the body section; they contain only the changes to that section.

In a way, this is kind of like an object-oriented document system that observes the inheritance property of OOP. If one wants to make look-and-feel changes, they would likely only have to change the baseline template.

Later examples illustrate how to override multiple blocks of text in the baseline template.

The author takes the reader through some pretty fair examples. He builds a web equivalent to the guess-the-number game to show the reader how a desktop console application and a web application differ in code and execution. He does a good job introducing the reader to CGI programming.

He then builds a real-time chat application leveraging JQuery for a smooth AJAX interface to the web app. He proceeds to build a functioning, multi-user web chat system.

We are introduced to the Datastore, the memory cache (memcached) interface, and the logging mechanism.

I enjoyed seeing some of the administrative console features. One can view the logs and can also invoke Python code interactively, which I find to be quite liberating. It's nice to have a REPL ( read-evaluate-print-loop ) that will let you interact with the same back-end objects that your web code is using.

Please note that I have yet to actually try out any of this code. I assume that it works properly. I also assume that any errors in the code are corrected in an errata section somewhere on the web.

What I Didn't Care For

The author spent some time building a session mechanism based on the memcached interface. This mechanism did not seem to be backed up by persistent writes to the Datastore as memcached is a volatile cache. The author admitted that the cache could end up removing the cached session info.

It's my understanding that GAE provides a users class that provides a login mechanism and ( I would hope ) a persistent session object. I don't know much about this, but it shows up in the Google helloworld.py application on the Google tutorial. It would have been nice to see how this works in the printed text.

The author mentions the HTTP form-file upload, but never mentions how the GAE framework can be made to process file uploads. It's not really essential to the book, but I'm kind of curious as to why it was referenced in the first place, unless he wanted to describe the mechanics used to publish one's Python code and supporting files to the GAE cloud.

Closing Thoughts

Overall, I would recommend ( and have recommended ) the book to friends. It's a nice intro that has some diverse foundational information that would seem to make the book accessible to quite a broad audience.

Unless otherwise noted, all code and text entries are Copyright ©2009 by James K. Lawless



Views expressed in this blog are those of the author and do not necessary reflect those of the author's employer. Views expressed in the comments are those of the responding individual.

stumbleupon Save to StumbleUpon
digg Digg it
reddit Save to Reddit
facebook Share on Facebook
twitter Share on Twitter
aolfav More bookmarks


Previous post: Auto Save Images from the Clipboard
Next post:TAP : A Command Processor Library


About Jim ...


Click **here**
to try out MailWrench;
a command-line SMTP /
SMTPS (Google Gmail)
mailer for Windows.


Follow me on Twitter

http://twitter.com/lawlessGuy


Recent Posts

A JavaScript REPL for Android Devices

MailSend is Free

My Blog Engine

The October 10th Bug

A Review of Kevin Mitnick's Book Ghost in the Wires

Spellbound by Web Programming

Backlinks to my Blog Posts

Play MP3 Files with Python on Windows


Random Posts

Flirting with Forth

A TCP Command Line Interface in Rhino JavaScript

Hiding Batch File Console Windows

Site Tracking with Perl

Taking Shape

FIF Isn't Forth

My Blog Engine

A DSL in JavaScript

We've Moved!

Extracting URL Addresses from Text in C


Full List of Posts

http://www.mailsend-online.com/bloglist.htm


Recent Posts from my Other Blog

Remembering Dr. San Guinary

Why Some Web Sites will go Dark on Jan 18th

SNL Superhero Skit

More Ruby Games

My Ruby Game Challenge Entry

Steal this Bookmarklet

Nerd Toys

Learn New Jargon, You Must

Spot the Wiebe

Tech Magazine Glory Days

Book Review : Paull Allen - Idea Man

A 90's Experiment in Online Systems - The U.S. West CommunityLink Service