SlideShare a Scribd company logo
Web app prototypes with
the App Engine Python SDK
Vlad Filippov - PyCon Canada 2012
@vladikoff
github.com/vladikoff
The Goals
● Build unique applications and features
● Quickly create experiences
● Well-defined and structured data store
● Epic test coverage
The Problem
● Development time
● Repetitive tasks
● User experience, interface and interaction
● Setting up datastores, local development
● Developer teams, different projects
Prototype an application - gather.at example
From https://gather.at
● Adding Entities
● Layout Views
● Filters
● Refresh UI
● ...
What is App Engine?
How can it help?
Google App Engine and the Python SDK
● Ability to build and host web applications
● Preview in 2008, out of preview 2011
○ latest release v. 1.7.3 - October 23, 2012
● Supports Python (2.5, 2.7)
● Usage:
○ Pay for instance hours, bandwidth, storage, etc
○ Free quotas (usage limits per day)
● Over 20 built-in APIs
○ Channel (Sockets), Blobstore, Memcache ....
● Datastore
○ App Engine Datastore - NoSQL schema-less object store
○ Google Cloud SQL - relational SQL DB
○ Google Cloud Storage - storage for large objects
Prototyping with App Engine
● Try out application ideas
● Prepare for large projects
● Benefits of App Engine:
○ Datastore
○ Deployment - local test server & deployment server
○ User API - use Google Accounts as login
○ Saves time during setup and development
● Testing - get a head start!
● Give more time and realistic scenarios for UX
Web App Prototypes with Google App Engine
Web App Prototypes with Google App Engine
Web App Prototypes with Google App Engine
Basic Datastore
db.get([...])
db.delete([...])
db.put_async([...])
db.get_async([...])
Web App Prototypes with Google App Engine
Things that will help you
● webapp2
○ routing, controllers, templating ( jinja2 support )
● appengine-rest-server
● Google Cloud Endpoints
● Import bulk data (CSV, based on your models)
● Use Google Accounts / OAuth2
● Task Queues (background tasks)
● Appstats
● Development server
○ simulates App Engine
○ development console
appengine-rest-server
● Exposes your data model via a REST API
● Supports:
○ JSON (JSONP) & XML
○ individual properties /entity/<key>/property )
○ basic filtering
○ limits results
○ metadata browsing ( /metadata/entity/ )
● Open source!
● Great starting point
Web App Prototypes with Google App Engine
Web App Prototypes with Google App Engine
appengine-rest-server
Cloud Endpoints
● Allows you to build REST and RPC APIs
● Same infrastructure as Google APIs
○ Translate, Places, goo.gl and other APIs
● Supports OAuth2
● Includes an API explorer
● * Ability to generate client libraries
○ JavaScript, iOS & Android
● * Tester only preview at the moment
Web App Prototypes with Google App Engine
Cloud Endpoints - Define an API Server
Define API Handlers / URLs (app.yaml)
Web App Prototypes with Google App Engine
Web App Prototypes with Google App Engine
Prototype - Tests
Prototype - Sample Data
To conclude...
● Invest time into unique features
● Choose a workflow, optimize it
● Record the time you spend on repetitive tasks
● Reuse as much as possible in future projects
● App Engine
○ Easy to setup, great for exploring ideas!
○ Write API & UI tests, re-use
○ Basic data models, populate sample data
○ Gives the front-end team more time
○ * Helps you get into web apps & services
Thank you!
git.io/dCeP9w
@vladikoff github.com/vladikoff

More Related Content

Web App Prototypes with Google App Engine

  • 1. Web app prototypes with the App Engine Python SDK Vlad Filippov - PyCon Canada 2012
  • 3. The Goals ● Build unique applications and features ● Quickly create experiences ● Well-defined and structured data store ● Epic test coverage The Problem ● Development time ● Repetitive tasks ● User experience, interface and interaction ● Setting up datastores, local development ● Developer teams, different projects
  • 4. Prototype an application - gather.at example From https://gather.at ● Adding Entities ● Layout Views ● Filters ● Refresh UI ● ...
  • 5. What is App Engine? How can it help?
  • 6. Google App Engine and the Python SDK ● Ability to build and host web applications ● Preview in 2008, out of preview 2011 ○ latest release v. 1.7.3 - October 23, 2012 ● Supports Python (2.5, 2.7) ● Usage: ○ Pay for instance hours, bandwidth, storage, etc ○ Free quotas (usage limits per day) ● Over 20 built-in APIs ○ Channel (Sockets), Blobstore, Memcache .... ● Datastore ○ App Engine Datastore - NoSQL schema-less object store ○ Google Cloud SQL - relational SQL DB ○ Google Cloud Storage - storage for large objects
  • 7. Prototyping with App Engine ● Try out application ideas ● Prepare for large projects ● Benefits of App Engine: ○ Datastore ○ Deployment - local test server & deployment server ○ User API - use Google Accounts as login ○ Saves time during setup and development ● Testing - get a head start! ● Give more time and realistic scenarios for UX
  • 13. Things that will help you ● webapp2 ○ routing, controllers, templating ( jinja2 support ) ● appengine-rest-server ● Google Cloud Endpoints ● Import bulk data (CSV, based on your models) ● Use Google Accounts / OAuth2 ● Task Queues (background tasks) ● Appstats ● Development server ○ simulates App Engine ○ development console
  • 14. appengine-rest-server ● Exposes your data model via a REST API ● Supports: ○ JSON (JSONP) & XML ○ individual properties /entity/<key>/property ) ○ basic filtering ○ limits results ○ metadata browsing ( /metadata/entity/ ) ● Open source! ● Great starting point
  • 18. Cloud Endpoints ● Allows you to build REST and RPC APIs ● Same infrastructure as Google APIs ○ Translate, Places, goo.gl and other APIs ● Supports OAuth2 ● Includes an API explorer ● * Ability to generate client libraries ○ JavaScript, iOS & Android ● * Tester only preview at the moment
  • 20. Cloud Endpoints - Define an API Server Define API Handlers / URLs (app.yaml)
  • 25. To conclude... ● Invest time into unique features ● Choose a workflow, optimize it ● Record the time you spend on repetitive tasks ● Reuse as much as possible in future projects ● App Engine ○ Easy to setup, great for exploring ideas! ○ Write API & UI tests, re-use ○ Basic data models, populate sample data ○ Gives the front-end team more time ○ * Helps you get into web apps & services