Skip to content

tudor1805/google-app-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-app-engine

This repository contains various applications designed for the Google App Engine platform.

gae-photoshare-app

This is a simple yet useful application, that demonstrates how to build a web application, and interact with App Engine through various API-s.

Some of the things you may learn by diving into it:

  • Using a HTML template to structure a website
  • Handling HTTP requests in App Engine
  • Interacting with the Datastore, for holding persistent data
  • Using the Memcache to store frequently accessed images
  • Creating an App Engine Cron task, that will display memcache statistics

Documentation

The official App Engine Documentation is probably the best place to start

The Cloud Playground is an awesome tool that allows testing various features in the browser, without the need install the SDK on your computer.

The HTML template is one adapted from the Sunflower Template

Known issues

I recommend testing directly on the App Engine backend

The PIL Library does not come bundled with the SDK, so it will not work by default on the development server. You will need to install it independently of your SDK, to get it to work locally.

Development

  1. Create a Google App Engine account

  2. Go to your Cloud Console, and create a new project

  3. Clone this repository

    $ git clone https://github.com/tudor1805/google-app-engine.git
  4. Edit the app.yaml file, and replace your-app-id, with the id of the project (you can find it in the Cloud Console of the project)

    $ cd google-app-engine
    $ sed -i 's/your-app-id/my-app-id/g' gae-photoshare-app/app.yaml
  5. Upload your application (you may need to wait a while)

    $ appcfg.py update gae-photoshare-app/
  6. Open your browser, and point it to the following address (my-app-id is the actual id of the project)

    http://my-app-id.appspot.com/

Debugging

  1. Uploading the application

    $ appcfg.py update gae-photoshare-app/
  2. Running the application (local server)

    $ dev_appserver.py gae-photoshare-app/
  3. Clean and update indexes

    $ appcfg.py vacuum_indexes gae-photoshare-app/
    $ appcfg.py update_indexes gae-photoshare-app/
  4. Open your browser

    http://localhost:8080/           -> Your deployed site
    http://localhost:8000/instances  -> Application console

Todo's

  • The current app uses a single photo album. Extend it, so that it can use an arbitrary number of photo albums. Albums could be public/private.
  • Allow the sharing of photos with other people. (Ex: generate a unique link that holds the image, and give it to other people)
  • Implement image comments
  • Maybe make it as a service, so that it can be used by mobile apps
  • Create a mobile app that takes photos and uploads them to the user's album of choice

Version

1.0

##License GPL v.2