Saturday, January 9, 2010

Revision 0.0

Today I sat down to finish up some styling, clean up some code, and publish this test run tracking program to the Google App Engine to see what will happen.  Exciting day!

First I worked on a bit of styling.  If you know me, you know this isn't a strength of mine, but I wanted to at least line things up, give it some color and some font love.  Played CSS for a few hours making the table and forms "presentable".  Still far from a nice looking application, but it will do for now.

Then some code cleanup.  Removed a ton of code that I thought I needed, but turned out I didn't.  It always makes you feel good to remove stuff that was causing bugs anyway.  Then you really feel you have a good clean foundation to start with.  Note a few items.

  1. There is no error checking in this version.  The goal was to learn how to go from zero to something that persists data on the Google Application Engine.  Error checking is next :-)
  2. No Delete function. That is coming next, before the other next thing.
  3. Form fields are just text, no number validation or minutes conversion.
  4. Avatars are supported by Gravatar, not the Google profile avatar.  Not sure why Google isn't using their own profile, but I didn't see anyway to get to the Google profile avatar, so I used Gravatar.

Probably a million other items, but those are what is on my list now.  I don't really have a list, this blog is it so I will probably post thoughts on missing pieces as they come up.

So I cleaned up the code, styled it a bit, and it seems ready to go.  Now to get it up on the Google App Engine.  It is a simple procedure really, you register for an app account.  You only get 10 applications, so don't go crazy registering apps.  You give your app a name, and that is it.

Put the application name in your app.yaml file.  appl.yaml needs to live in the root directory of your project, this is what you use to configure you application.  Add your application name here, my app name is "pyruntracker"


application: pyruntracker
version: 1
runtime: python
api_version: 1


Then you use appcfg.py to deploy your project out to Google.  This is the cool part.  Just use the following command line to deploy, appcfg.py is in the app engine SDK.

appcfg.py update directory

Enter your Google email address/password, and off it goes!  It runs a test to see that it is up and running, and that is it.  Super easy, worked perfectly.  Here is the URL to my app

http://pyruntracker.appspot.com/

I am going to post the code too, I just have to figure out a nice way to do that on a blog.  Suggestions are welcome.  Maybe I will create a blog post per file, so I can describe what I did.  There isn't that much code.

No comments:

Post a Comment