Monday, August 15, 2011

Python3 Web Development Beginner's Guide

A call went out to the PyAtl mailing list asking for reviewers for Packt Publishing's newest Python3 Web Dev book.  Being that I work in the Web and do Web Dev on the side, I volunteered to read the book and write a review. Luckily, I'm also a beginner to Python, but not Web Development.
The book started off well enough, I had high hopes that this would explain things in a clear, plain manner that was easy for anyone to understand.  Then the author started talking code. Organization was a big issue with this book. It was first evident when the author began talking about opening accompanying code for Chapter 2, there was no code that I was aware of, so I went to Packt's site and found the companion code. It wasn't until a few pages into Chapter 2 that a handy 'Did You Know' box appeared and let me know about the code that accompanies the book and where to go download it. This should have been in Chapter 1, or at least in the side bar of the page where the author begins talking about looking at said code. These sorts of missteps were prevalent throughout the book, at times making it hard to understand what exactly was going on. Speaking of organization, the code samples were just placed into the book without thought, I know this because some code starts at the last line on one page and runs into the next page. Some code, however begins on one page, is split up in the middle and then continues on the other page, with multiple lines highlighted and the author is explaining each line sometimes before, sometimes after the code excerpt. Some times you have to look at all the bold lines to decipher which line he's actually talking about. It's truly a mess, at times. to be honest.
Aside from editorial/design/layout issues, how was the actual material in the book? It was OK. The author uses CherryPy as his framework, which is a fine choice, however not something that I would use with Python3. If we're going to be using the bleeding edge Python implementation, we should probably use a framework that isn't years out of date. Also, I was expecting more coding on my part, however all of the code was provided, walked through in the disorganized fashion as stated earlier, and then forgotten about.  On occasion the author invites the reader to try and manipulate his code to include other functionality into the code, but it seems that he falls into the trap that most authors do, when trying to explain programming...they give a very vague exercise and expect the reader to understand small, underwritten ideals/functionality that they can't possibly know about in order to implement the exercise.
To be fair, I wasn't able to complete the book and all the exercises. I did give it a good try, however. I feel that I read and tried to complete all exercises that I came across in the book to the best of my ability. However, to be honest, I think there are better books out there if you're looking to use Python in web development. While it's not Python3, the Django framework book (free online) explains python better than even the python tuts have done. Which brings us to the Python docs, if you want to learn the language from the horse's mouth, so to speak.
I still can't understand why CherryPy was chosen to showcase python3 and web development. But maybe I just don't know enough about Python to fully understand why CherryPy was chosen.  All that I do know is that I recently ran across an article which was talking about the new wave of web development utilizing Python, and CherryPy wasn't on that list. With all of that being said, it seems that the book was more a how-to for CherryPy than a how-to for using Python3 for web development. I hate to say it, but I'm just not sure that this book could explain anything that the Django book, or the Python docs can't when it comes to web development with Python. Unless you want to learn CherryPy, in which case, this is the book for you!

No comments:

Post a Comment