[Twisted-Python] Twisted book(s)?

Andrew Francis andrewfr_ice at yahoo.com
Wed Jun 3 13:36:20 EDT 2009


Hi David:

Message: 5
Date: Wed, 03 Jun 2009 14:55:23 +1200
From: David Conradie <dave.conradie at googlemail.com>
Subject: [Twisted-Python] Twisted book(s)?
To: twisted-python at twistedmatrix.com
Message-ID: <4A25E61B.5050900 at googlemail.com>
Content-Type: text/plain; charset="iso-8859-1"

>I'm fairly new to Python and very new to Twisted.   I find I learn new
>material best from a book, so although I know there's lots of great
>documentation and examples on twistedmatrix.com, I was considering
>getting O'Reilly's Twisted book ('Twisted Network Programming
>Essentials' by Abe Fettig).  But that book dates back to Oct 2005 so I
>was wondering if it's still a worthwhile purchase - I'd guess Twisted
>has moved a good bit since the book was written.  Any opinions?

Well the Abe Fettig book got me over the initial hump at a critical time, so I am grateful the book was out there. Also I really enjoyed the introduction by Glyph. 

>From what I recall, the Python involved in the examples isn't 
complex(it is 2005 so I don't believe you are going to be 
seeing more exotic Python language constructs: i.e., generators, 
comprehensions, decorators). I found Fettig's explanations of HTTP 
client, server, resources, and the other protocols adequate. It is 
really important to run and modify the examples to get a feel for what 
is happening. Again, from what I recall, the main place I think 
Fettig's book falls flat is its explanation of creating a new protocol. Attending Steve Holden's legendary "Teach Me Twisted" pycon 2008 talk gave me a better clue (one of these days I should write a protocol).


If I had to provide Fettig with advice on a second edition, my recommendations:

1) Show an example with a nested call, for example a HTTP Request Handler making a client.getPage() call, processing it, and returning the result. This is a common idiom and it would get more into depth about how deferreds work.

1B) Get more into the relationship between protocols and the reactor: I was really confused over why some protocols used a return, others returned a deferred, and some returned None. 

1C) Use more Twisted idioms, i.e., using inner functions for defining callbacks.

2) Use class relationship diagrammes to show the relationship between various Twisted objects.

3) Show Twisted control flow. I tried to do this in my Pycon 2008 talk (which I need to rewrite one of these days).

4) Use WAY MORE DIAGRAMMES!!!!

Cheers,
Andrew












      




More information about the Twisted-Python mailing list