2. About speaker
Speaker: NAGA ROHIT S
COnTACT: snagarohit@gmail.com
education: Final Year Under Graudate,
Department of CSE,
Indian Institute of Technology Guwahati
Experience: The speaker has explored about an year
developing applications on Google App
Engine.
3. What we will learn today
• Why Cloud ?
• Platform as a Service
• Who are in the race ?
• Why Google App Engine is the Ge3k’s choice ?
• Languages Supported
• Getting Started
• Hello World App
• Frameworks
• Webapp Framework
• Users API
• Handling GET & POST
• Guest Book App
• What’s Next ?
• BigTable
• GQL (Not SQL)
INTRODUCTION
• Static Content
• Templates & Stuff
• Creating & Uploading Your Application
• Problems with IITG Proxy
• Problems Patched
4. Why cloud ?
• Scalability
• Redundancy
• Security
• High Initial Investment
• Pay As You Grow
• Pay only for What You Use
•…
• Cloud is the future of Internet
8. Getting started
• Minimum Requirements
• Python 2.5+
• Linux (Windows Fan? Sorry, You are alone )
•Download App Engine SDK
https://developers.google.com/appengine/downloads
[Google App Engine SDK for Python]
• Extract SDK
• cd to google_appengine
• Lock and Load!
9. Hello world app
• Inside the google_appengine directory, create a
directory with the name helloworld
• Create a file named helloworld.py inside
helloworld directory.
google_appengine/helloworld/helloworld.py:
HTTP Header.
Never mind! Just accept that you
need to write this line when you want
to print to the client’s browser
This actually goes to the browser
10. Hello world app
• App engine application has a configuration file
called app.yaml which tells the app engine
about the application being developed and its
configuration.
• Create a file app.yaml in the helloworld
directory.
• Wait! What is YAML ?
• YAML Ain’t Markup Language
• Yet Another Markup Language
In short, it’s a more human readable form of
data storage.
11. Hello world app
google_appengine/helloworld/app.yaml:
Application Identifier
Version of the Application you are building
Python/Java/Go/whatever
Google API version that this application
is built on. Basically this is for supporting
legacy applications in case APIs change
Handles every request of
http://localhost/<AnyJunkHere>
The script which needs to be run for
the above handle match
12. Hello world app
• Summarizing,
google_appengine/helloworld/
• helloworld.py
• app.yaml
• Now, RUN!
$ ~/google_appengine/dev_appserver.py helloworld/
Starts the server by default on Folder in which the app.yaml
port 8080. Can be changed by file for helloworld application resides
command line options
17. USERS API
• Users API uses Google Accounts Sign-In
google_appengine/helloworld/helloworld.py:
Import users module
If user signs himself using Google Accounts
to your web site, do the following
Otherwise, redirect to Sign-In/Sign-Up powered by Google Accounts
19. Guest book app (hadnling forms)
google_appengine/helloworld/helloworld.py:
Good Ol’ HTTP Form that POSTs to
http://localhost:8080/sign page
http://localhost:8080/sign
is handled by Guestbook class
21. What’s next ?
• Using DataStore
• Using GQL
Explore!
• Using Templates
• Using Static Files in App Engine
• Uploading Your Application
22. Uploading application
• We use appcfg.py for application deploying
• Create and Manage your application at
https://appengine.google.com/
• Click “Create Application”
• Follow the instructions and create an Application
ID
• Application ID is unique throughout App Engine!
23. Uploading application
• Edit app.yaml file from your helloworld directory
and change the value of “application:” setting
from “helloworld” to your registered ID
• Now, RUN!
$ ~/google_appengine/appcfg.py update helloworld/
• If you setup a free *.appspot.com domain name,
the URL of your application begins with the
application ID.
http://your_app_id.appspot.com