Kshipra Singh of Packt Publishing kindly sent me a review copy of the brand new book about CherryPy 3.0: a really nice and self contained HTTP framework.
The author of the book is Sylvain Hellegouarch and I think he did the right thing writing it. It’s perfect if you want to start with CP or want to get your feet wet not knowing anything much about web development.
Let me say that I enjoyed reading this book. It doesn’t pretend to be the bible about anything. It’s just a good introduction to CherryPy and the issues around web development as a whole. All in 250 pages. Really cool if I may say so.
The things I expected to be slightly better are fonts and layout but I can live with that.
The book is divided in two main sections: the first four chapters are all about the framework helping you start developing web apps from scratch. The second section of the book is a huge use case: the development of a photo-blog application.
The first chapter talks about the history of CherryPy (CP from now on), its community, its strengths and what’s there beyond it.
The installation chapter is a pretty thorough explanation of the many ways you can have CP working on your operating system.
The overview chapter is a list of what CP is: a web application server, an HTTP server, an easily configurable tool, an engine to publish objects. CP also has a lot of separate modules to deal with the various aspects of web development: caching, auto-reloading, character handling, test coverage, low level HTTP support, HTTP authentication, profiling, sessions (memory, file system, DBMS out of the box), serving of static resources, tidy support, WSGI, XML-RPC and more.
The last chapter of the first part goes into how CP really works: its HTTP support, multiple servers, URI dispatching, virtual hosting support, a list of tools (kinda like middlewares in Django parlance) and how to create them. It explains also clearly how to embed a WSGI application into CP and vice-versa.
The fifth chapter contains a nice introduction about three major ORM tools: SQLObject, SQLAlchemy and DejaVu. The author lets code speak for itself and the choice to develop the sample application is the latter.
The sixth chapter is a nice introduction to REST and how to properly design a web application interface. I’m not really sure though that introducing Atom Publishing Protocol is a right choice, maybe it’s too much meat for the newbie (and it’s not used later in the book anyway).
The seventh and eighth chapter are the ones I liked less. I didn’t really enjoy all the magic in the front end code. I know Ajax it’s a must on any recent book about web development but the use case is kinda diverted towards it only to give a reason to exists to the eighth chapter. There’s too much of client code I think.
The ninth chapter is all about testing your web app and that’s a must. If it’s not tested it doesn’t work, right? Ok… almost :-). Unittest, doctest, web testing, functional testing, stress testing, testing with Selenium. There’s a lot of stuff going on in this chapter. Make sure to read it before trying to develop any real world application.
The last and tenth chapter is a nice overview of deployment options.
That’s all. Before this book CP didn’t really came under my radar but I’m sure it’s a viable option to anyone starting developing web apps

