CherryPy Essentials guides you through learning CherryPy from beginning to end. The first three chapters of the book offer the basics of working with CherryPy (from inception, to install, to basic usage). A nice plus, which I think more books should do, occurs at the beginning of Chapter 3 where a functional web application is presented. Although short and to the point, the application does give a since of what is possible with CherryPy in a "Rapid" development perspective.
Another good point about the book is that it does give a wide overview of what is "possible" with CherryPy from Templating, to Web Services, and even Testing.
The book is well organized and can serve as a an excellent resource for anyone looking to give CherryPy a look for their web development projects.
PROS
* Well laid out and easy to follow
* Explains an assortment of useful tools for CherryPy
* Helps to get started quickly with the framework
* Includes excellent online resource
CONS
* Would like to have seen either a Web 2.0 application to be built or an enterprise level application built (even though a Photo album was presented for much of the second half of the book)
* Doesnt focus on a lot of the internals of CherryPy
OVERALL
Overall, this is one of the best books I have ever read. Very easy to get through. If you are new to CherryPy or web application development, this book is an excellent choice.
Author(s): Sylvain Hellegouarch
Publisher: Packt Publishing
Year: 2007
Language: English
Pages: 270
CherryPy Essentials......Page 1
Table of Contents......Page 8
Preface......Page 14
Overview......Page 20
History of CherryPy......Page 21
The Community......Page 22
CherryPy Project Strengths......Page 23
Through the Book......Page 24
Summary......Page 25
Requirements......Page 26
Overview......Page 27
Installation from a Tarball......Page 29
Installation through Easy Install......Page 31
Installation from Subversion......Page 33
Keeping CherryPy Up to Date......Page 36
Summary......Page 37
Vocabulary......Page 38
Basic Example......Page 39
Internal Engine......Page 45
Configuration......Page 46
Object Publisher Engine......Page 49
Library......Page 51
The Coverage Module......Page 52
The Profiler Module......Page 53
The Sessions Module......Page 54
The XML-RPC Module......Page 55
Tools......Page 56
Error and Exception Handling......Page 57
Summary......Page 62
HTTP Compliance......Page 64
Multiple HTTP Servers......Page 65
Multi-Threaded Application Server......Page 67
HTTP Method Dispatcher......Page 68
Routes Dispatcher......Page 70
Virtual Host Dispatcher......Page 71
Hook into CherryPy's Core Engine......Page 72
CherryPy Toolbox......Page 74
Basic Authentication Tool......Page 75
Caching Tool......Page 76
Decoding Tool......Page 77
Digest Authentication Tool......Page 78
Encode Tool......Page 79
Etag Tool......Page 80
Ignore Headers Tool......Page 82
Log Headers Tool......Page 83
Log Tracebacks Tool......Page 84
Proxy Tool......Page 85
Referer Tool......Page 86
Response Headers Tool......Page 87
Trailing Slash Tool......Page 88
XML-RPC Tool......Page 89
Creating a Tool......Page 90
Using the Staticfile Tool to Serve a Single File......Page 94
Using the Staticdir Tool to Serve a Complete Directory......Page 96
Bypassing Static Tools to Serve Static Content......Page 98
WSGI Support......Page 99
Hosting a WSGI Application within the CherryPy WSGI Server......Page 100
Hosting a CherryPy WSGI Application within a Third-Party WSGI Server......Page 102
Summary......Page 103
A Photoblog Application......Page 104
Photoblog Entities......Page 105
Vocabulary......Page 107
Relational Database Management System (RDBMS)......Page 108
Object-Oriented Database Management System (OODBMS)......Page 109
Object-Relational Mapping......Page 110
Python Object-Relational Mappers......Page 111
Photoblog Application Entity Modeling......Page 121
Mapping Entities......Page 122
Units and UnitProperties......Page 124
The Sandbox Interface......Page 125
Querying Units......Page 126
Extending the Data Access Layer......Page 127
Summary......Page 130
Traditional Web Development......Page 132
Separation of Concerns......Page 134
REST......Page 135
Uniform Resource Identifier......Page 136
HTTP Methods......Page 137
Putting it Together......Page 141
REST Interface through CherryPy......Page 143
Atom Publishing Protocol......Page 144
Atom XML-Document Format......Page 145
APP Implementation......Page 147
Summary......Page 149
HTML......Page 150
XHTML......Page 151
CSS......Page 152
DHTML......Page 154
Overview......Page 155
Conditional Statement......Page 157
Looping Mechanism......Page 158
Extensibility......Page 159
Targetting the User Agent......Page 160
Global Design Goals......Page 161
CherryPy—Encapsulating the Template Rendering Process......Page 162
Basic Structure......Page 164
Mochikit......Page 169
HTML Code......Page 170
Handling the End-User Actions......Page 171
Amending the CSS......Page 172
Let's be More Flexible.........Page 173
Summary......Page 174
Rise of the Rich-Client Applications......Page 176
Ajax......Page 177
Ajax—Advantages and Drawbacks......Page 178
Behind the Scene: XMLHttpRequest......Page 179
Performing a GET Request......Page 180
Performing a Content-Negotiated GET Request ......Page 181
Performing a POST Request......Page 182
Authentication using Digest or Basic Schemes......Page 183
JSON......Page 189
Defining the Required Namespaces......Page 191
Adding Methods to the Classes......Page 192
Method to Create a New Album......Page 196
Method to Delete an Existing Album......Page 203
Summary......Page 204
Why Testing......Page 206
Planning a Test......Page 207
Unit Testing......Page 208
unittest......Page 209
doctest......Page 214
Unit Testing Web Applications......Page 218
Performance and Load Testing......Page 226
Functional Testing......Page 231
Application under Test......Page 232
Selenium Core......Page 235
Selenium IDE......Page 240
Selenium Remote Control......Page 244
Summary......Page 246
CherryPy—Web and Engine Configuration System......Page 248
Photoblog Application Configuration System......Page 251
Deployment......Page 253
Apache with mod_rewrite Module......Page 254
Lighttpd with mod_proxy Module......Page 256
Apache with mod_python Module......Page 257
SSL......Page 259
Creating a Certificate and a Private Key......Page 260
Using the CherryPy SSL Support......Page 261
Using the lighttpd SSL Support......Page 263
Summary......Page 264
Index......Page 266