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

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
----------
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.