CherryPy Essentials: Rapid Python Web Application Development
Содержание
- Overview
History of CherryPy
- The Community
CherryPy Project Strengths
Beyond CherryPy
- Through the Book
- Summary
- Requirements
- Overview
- Installation from a Tarball
- Installation through Easy Install
- Installation from Subversion
- Testing your Installation
Keeping CherryPy Up to Date
- Summary
- Vocabulary
- Basic Example
- Built-In HTTP Server
- Internal Engine
- Confguration
- Object Publisher Engine
- Library
- The Autoreload Feature
- The Caching Module
- The Coverage Module
- The Encoding/Decoding Module
- The HTTP Module
- The Httpauth Module
- The Profler Module
- The Sessions Module
- The Static Module
- The Tidy Module
- The Wsgiapp Module
- The XML-RPC Module
- Tools
- Error and Exception Handling
- Summary
- HTTP Compliance
- Multiple HTTP Servers
- Multi-Threaded Application Server
- URI Dispatching
- HTTP Method Dispatcher
- Routes Dispatcher
- Virtual Host Dispatcher
Hook into CherryPy's Core Engine
CherryPy Toolbox
- Basic Authentication Tool
- Caching Tool
- Decoding Tool
- Digest Authentication Tool
- Encode Tool
- Error Redirect Tool
- Etag Tool
- Gzip Tool
- Ignore Headers Tool
- Log Headers Tool
- Log Tracebacks Tool
- Proxy Tool
- Referer Tool
- Response Headers Tool
- Trailing Slash Tool
- XML-RPC Tool
- Toolbox
- Creating a Tool
- Static Resource Serving
- Using the Staticfle Tool to Serve a Single File
- Using the Staticdir Tool to Serve a Complete Directory
- Bypassing Static Tools to Serve Static Content
- WSGI Support
Hosting a WSGI Application within the CherryPy WSGI Server
Hosting a CherryPy WSGI Application within a Third-Party WSGI Server
- Summary
- A Photoblog Application
- Photoblog Entities
- Vocabulary
- DBMSes Overview
- Relational Database Management System (RDBMS)
- Object-Oriented Database Management System (OODBMS)
- XML Database Management System (XMLDBMS)
- Object-Relational Mapping
- Python Object-Relational Mappers
- Photoblog Application Entity Modeling
- Mapping Entities
Units and UnitProperties
- Associating Units
- The Sandbox Interface
- Querying Units
- Extending the Data Access Layer
- Summary
- Traditional Web Development
- Separation of Concerns
- REST
- Uniform Resource Identifer
- HTTP Methods
- Putting it Together
REST Interface through CherryPy
- Atom Publishing Protocol
- Atom XML-Document Format
- APP Implementation
- Summary
- HTML
- XML
- XHTML
- CSS
- DHTML
- Templating
- Kid—The Templating Engine
- Overview
- Kid's Attributes
- XML-Based Templating Language
- Variable Substitution
- Conditional Statement
- Looping Mechanism
- Extensibility
- Other Attributes
- Photoblog Design Preparation
- Targetting the User Agent
- Tools
- Global Design Goals
- Design Directory Layout
CherryPy—Encapsulating the Template Rendering Process
- Photoblog Design in Detail
- Basic Structure
- Mochikit
- Developing the Photoblog Design
- HTML Code
- Adding a Link
- Handling the End-User Actions
- Amending the Template
- Amending the CSS
- Let's be More Flexible...
- Summary
- Rise of the Rich-Client Applications
- Ajax
- Ajax—Advantages and Drawbacks
- Behind the Scene: XMLHttpRequest
- Performing a GET Request
- Performing a Content-Negotiated GET Request
- Performing a POST Request
- Performing PUT, HEAD, or DELETE Requests
- Cookies
- Authentication using Digest or Basic Schemes
- JSON
- Applying Ajax to our Application
- Defning the Required Namespaces
- Implementing Namespaces
- Adding Methods to the Classes
- Method to Create a New Album
- Method to Update an Existing Album
- Method to Delete an Existing Album
- Summary
- Why Testing
- Planning a Test
- Common Testing Approach
- Unit Testing
- unittest
- doctest
- Unit Testing Web Applications
- Performance and Load Testing
- Functional Testing
- Application under Test
- Selenium Core
- Selenium IDE
- Selenium Remote Control
- Summary
- Confguration
CherryPy—Web and Engine Confguration System
- Photoblog Application Confguration System
- Deployment
- Apache with mod_rewrite Module
- Lighttpd with mod_proxy Module
- Apache with mod_python Module
- mod_python with WSGI Application
- SSL
- Creating a Certifcate and a Private Key
Using the CherryPy SSL Support
- Using the lighttpd SSL Support
- Using the Apache mod_ssl Support
- Summary