Doing IT the App Engine Way

Using Google's App Engine, you can develop Web applications in Python or Java and deploy them on Google's infrastructure for free—until you hit five million page views per month.

The Admin Interface

App Engine includes an administrator interface to your webapp that
can be accessed via the Web. To see it, point your browser at
http://localhost:8080/_ah/admin. Figure 4 shows the interface to the
datastore entries I created. The interface lets you
inspect and edit each of your entries in the datastore (as well as create
new ones). Each entry has been assigned
a unique Key and ID value by the datastore automatically. These values are often used
to retrieve a specific entry from the datastore.

Figure 4. The App Engine Admin Interface

Deployment

With your testing complete, you're ready for deployment. To do this,
follow the deployment instructions on the App Engine Web
site. This involves signing up for a Google ID (you already have one
if you use Gmail or Wave), selecting a unique name for your webapp
and requesting a seven-digit Google App Engine Code (which you need to
activate your webapp and which is sent by SMS to your cell phone). With
all of that in place, upload your code to Google's cloud from your HOME
directory using this command:

google_appengin/appcfg.py update myapp/

Learning More

Of course, it doesn't end there. App Engine has so much more, including
integration with Google's user management and login system, security
enhancements, memcached integration and validation technologies, among other things.
I recommend reading Using Google App
Engine and Programming Google App Engine, both from O'Reilly
Media (see Resources). The former is an extended tutorial introduction to
App Engine using Python, and the latter is a reference that targets both
the Python and Java APIs. At the time of this writing, the other technical
publishers have App Engine books at an advanced stage of development
(most notably Manning). Apress also has a series of Google books. Another
project worth keeping an eye out for is the upcoming Google App Engine
video tutorials (again) from O'Reilly Media.

Is App Engine Really Free?

As I mentioned earlier, Google lets you get started with
App Engine for free. When your site becomes popular, Google asks you to pay
for the hosting services it provides. The busier your site, the more you
pay, and costs are pretty much in line with what you'd expect from a
reasonable-size ISP. If your site traffic remains
modest, you may never have to pay for App Engine's hosting service. But,
do you pay in other ways? Consider the following: once your code is
uploaded to App Engine, you can't retrieve it. You can update it,
but you had better keep a local copy as your own backup should you wish
to transfer the business logic you've embedded in your webapp to
another platform. Then, there's your data. It lives in the Google
cloud, and what that means really depends on whom you ask. App Engine keeps your data away from others, but you
are trusting Google to mind it for you.

App Engine is built on top of open-source Linux, with Python
and Java APIs, which also are both open technologies.
But, these facts alone do not make App Engine open. Far from it, this is
as vertically closed a system as Apple's iPad. Be aware of what
you are giving up when you decide to develop for this particular
“free” Google platform.
If you're okay with vendor lock-in, and if you trust Google with
your data and your application, Google App Engine may be for you.

Paul Barry (paul.barry@itcarlow.ie) lectures at The Institute of
Technology, Carlow in Ireland. He recently completed Head First
Programming, which he cowrote with David Griffiths. As he's
a sucker for punishment, he's now working on Head First
Python,
to be published by O'Reilly Media in late 2010.

Comment viewing options

This has to be one of the two best intro-level tutorials on appengine. Thanks so much for writing it and putting the time into the explanations. It all works, makes sense, and your efforts are very much appreciated!

Sponsored by:

Geek Guides

Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.