Using Google App Engine

Book description

Build exciting, scalable web applications quickly and confidentlyusing Google App Engine and this book, even if you have little orno experience in programming or web development.App Engine is perhaps the most appealing web technology to appearin the last year, providing an easy-to-use application frameworkwith basic web tools. While Google's own tutorial assumessignificant experience, Using Google App Engine will helpanyone get started with this platform. By the end of this book,you'll know how to build complete, interactive applications anddeploy them to the cloud using the same servers that power Googleapplications.With this book, you will:

  • Get an overview of the technologies necessary to use Google AppEngine

  • Learn how to use Python, HTML, Cascading Style Sheets (CSS),HTTP, and DataStore, App Engine's database

  • Grasp the technical aspects necessary to create sophisticated,dynamic web applications

  • Understand what's required to deploy your applications

  • Using Google App Engine is also an excellent resourcefor experienced programmers who want to acquire working knowledgeof web technologies. Building web applications used to be forexperts only, but with Google App Engine-and this book-anyone cancreate a dynamic web presence.

    Publisher resources

    View/Submit Errata

    Table of contents

    1. Preface
      1. Who Should Read This Book?
      2. What’s in This Book?
      3. Teaching with This Book
      4. Conventions Used in This Book
      5. Using Code Examples
      6. Safari® Books Online
      7. Comments and Questions
      8. Acknowledgments
    2. 1. Programming on the Web
      1. The Request/Response Cycle
      2. What Is Google App Engine?
      3. What Is a “Cloud”?
      4. Why Did Google Build App Engine and Give It Away for Free?
      5. What Is the Google Infrastructure Cloud?
      6. Enter the Application Engine
      7. Your Application Must Be a Good Citizen in the Google Cloud
      8. How the Cloud Runs Your Application
      9. Why You Really Want to Run in the Cloud
      10. The Simplest App Engine Application
      11. Summary
      12. Exercises
    3. 2. HTML and CSS
      1. A Brief History of HTML and CSS
      2. HyperText Markup Language (HTML)
      3. A Well-Formed HTML Document
      4. Validating Your HTML
      5. HyperText Links (Anchor Tags)
      6. Multiple Files
      7. Lists in HTML
      8. Specifying Styles Using CSS
        1. Styling Tags with CSS
      9. Exerting More Control over Markup
        1. Validating CSS
        2. Tools to Help You Work with CSS
      10. Building the Navigation Menu
        1. The CSS Box Model
        2. Adding Navigation Hints for Users
      11. Summary
      12. Exercises
    4. 3. Python
      1. What Is Programming?
      2. About Python
        1. Installing Python
      3. The Essence of Programming
        1. Input, Processing, and Output
      4. Conditional Steps: A Number-Guessing Web Application
        1. Variables and Expressions
        2. Naming Variables
        3. Constants
        4. Handling Text Data Using Strings
        5. Using the String Library
        6. Types and Conversion
        7. Variables with Many Values at the Same Time: Lists
        8. Repeated Code: Loops
        9. Python’s Backpack: Dictionaries
        10. Looping Through a Dictionary
        11. Stored and Reused Code: Python Functions
        12. Turning Traceback to Our Advantage Using Try and Except
      5. Object-Oriented Python
        1. Comments in Python
      6. The Tao of Programming
      7. Summary
      8. Exercises
    5. 4. Sending Data to Your Application
      1. Making an HTTP Request
      2. Hacking the HTTP Protocol
      3. The HTTP Protocol Standards
      4. Watching HTTP in Action
      5. HTML: Building a Form
      6. Sending Form Data to the Server Using POST
      7. Handling Form Data in the App Engine Server
      8. Sending Form Data to the Server Using GET
      9. App Engine Log
      10. Looking at All the Data Available on an HTTP Request
      11. Advanced: Multipart POST Data with File Upload
      12. Summary
      13. Exercises
    6. 5. The App Engine webapp Framework
      1. A Trivial App Engine Application
      2. An Equivalent Trivial webapp Application
      3. The Handler Callback Pattern
      4. Looking at the Handler Code
      5. What Is “self” and Why Is It There?
      6. Number Guessing Using the webapp Framework
      7. Web Server Logs
      8. Summary
      9. Exercises
    7. 6. Templates
      1. Template Syntax
      2. Using the Templates from Python
      3. The Number-Guessing Game Using Templates
      4. Abstraction and Separation of Concerns: “Model View Controller”
      5. Building a Multiscreen Application
      6. Static Files in App Engine
        1. Referencing Static Files
      7. Generalizing Template Lookup with Multiple Templates
      8. Extending Base Templates
      9. Conditional Processing Templates
        1. Replacing More Than One Block in the Base Template
      10. Extending Our Application
      11. Syntax Errors
      12. More on Templates
      13. Summary
      14. Exercises
    8. 7. Cookies and Sessions
      1. HTTP Cookies
      2. Logging In and Logging Out Using Sessions
      3. Installing the Simple Session Utility
      4. Using the Session to Mark Login and Logout
      5. Changing the User Interface for a Logged-In User
      6. Summary
      7. Exercises
    9. 8. App Engine Datastore
      1. The Model-View-Controller Pattern
        1. Defining Models
        2. Adding a New Account Form
        3. Adding a User Account
      2. Looking Through the Datastore
        1. Logging In and Checking Accounts and Passwords
        2. Retrieving and Displaying Many Objects
      3. Terminology: Different Types of Keys
      4. References Between Data Models
        1. Interactions Between Models
        2. Putting the Primary Key into Session
        3. Adding the Chat Feature
      5. Summary
      6. Exercises
    10. 9. JavaScript, jQuery, and AJAX
      1. jQuery
      2. Create a View of the Chat Messages in HTML
      3. Asynchronously Updating a <div> Using AJAX
      4. Summary
      5. Exercises
    11. 10. Running Your Application on the Google Infrastructure
      1. Application Engine Accounts
      2. Creating an Application on App Engine
        1. Uploading Your Application
        2. Testing Your Application
      3. Logs, Statistics, and Other Features
        1. Uploading New Versions
      4. Collaboration on Applications
      5. Summary
      6. Exercises
    12. 11. Memory Cache
      1. The Rules of Memory Cache
      2. Using the Memory Cache
      3. Using the Application Console to Examine Memory Cache
      4. Using a Memory Cache in Your Application
      5. Building a Session Store Using Memory Cache
      6. Sessions and Memory Cache
      7. Summary
      8. Exercises
    13. A. Installing and Running Google App Engine on Windows XP
      1. Download and Install
      2. Making Your First Application
      3. Dealing with Errors
      4. Shutting Down the Server
    14. B. Installing and Running Google App Engine on Windows Vista
      1. Download and Install
      2. Making Your First Application
      3. Dealing with Errors
      4. Shutting Down the Server
    15. C. Installing and Running Google App Engine on a Macintosh System
      1. Download and Install
      2. Making Your First Application
      3. Dealing with Errors
      4. Shutting Down the Server
    16. D. Installing and Running Google App Engine on a Linux System
      1. Checking for Python
      2. Download and Install
      3. Making Your First Application
      4. Dealing with Errors
      5. Shutting Down the Server
    17. Index
    18. Colophon
    19. Copyright

    Product information

    • Title: Using Google App Engine
    • Author(s): Charles Severance
    • Release date: May 2009
    • Publisher(s): O'Reilly Media, Inc.
    • ISBN: 9780596800697