Source

go-meetup / speaker-notes.txt

Why AppEngine?
==============

"It's all fun and games until you have a scaling issue."
    - Me, just now

What you get
* Scaling (doh!)
* Deploy without downtime
* Versioning
* Data store (GQL)
* Users
* Memcached
* Mail
* Task Queue
* XMPP
* Logging
* Admin console
* ...

What you loose
* Freedom to use whatever you want
* Money (arguably)

Getting Started
===============
* Download the SDK from https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go
* Unpack somewhere


The App
=======
We're going to build a URL shortener (like bit.ly)

We'll cover
* Serving HTTP
* Templates
* Users
* Data store
* Memcached
* Task Queue

Parts
=====

1-hello-appengine
-----------------
app.yaml
    - Note about versioning

shortie.go
    - No main

./run-local.sh
    - Do a change a show it picks it up
    - http://localhost:8080/_ah/admin

2-template
----------
html.go
    - Can use html files uploaded

3-user
------
shortie.go
    - appengine.Context
    - Login/Logout URL
    - defer idiom

html.go
    - Using params

4-counter
---------
shortie.go
    - counter
    - urlCount

html.go

5-short
-------
shortie.go
    - base62 encode
    - newShortUrl

html.go
    - Adding short url

6-redirect
----------