Great book: Advanced PHP Programming

by Derek Sivers

Related link: http://www.isbn.nu/0672325616



This book just got me excited about PHP again: Advanced PHP Programming by George Schlossnagle.

I've been programming in PHP full-time for 5 years now. I remember when I was first learning, how all the books felt a little over my head, in a good way. Very slowly I understood things that didn't make sense before. And then very slowly I'd start to incorporate those things into my day-to-day programming.

After 2 years or so, I missed that feeling. I'd check out new PHP books and flip through every chapter saying, "Yeah yeah yeah...". I realized I had become an expert.

I was honestly impressed looking at the table of contents of this book. This is NOT your usual PHP book! That's obvious right away. So I ordered it. And it just arrived yesterday. I was up all night reading it, and again today. This is the most amazing PHP book for experienced PHP programmers I've ever seen. (Wait - this is the ONLY book for experienced PHP programmers I've ever seen!)

The author really knows his stuff, and uses best-practices, throughout. Really well thought-out code with a lot to learn from.

It's written entirely in PHP5 with things I had never heard about, like MySQL's new Prepared Statements and Bound Parameters. (More on that subject later.) Great chapters on benchmarking and profiling. Really nice to see him using the PHP5 style OOP, marking all methods and attributes as public, private, or protected. A great way to get to know the new object approach to PHP5: to see it in real-world examples, so that after a few hours with this book it's second-nature.

For the first time in three years, I feel wonderfully over-my-head with a LOT to learn here in this one amazing book. Thanks George!

7 Comments

hakkikt
2004-06-14 13:50:37
errata?
Hi Derek,


I started reading "Advanced PHP Programming" on your recommendation, but I am disappointed at the errors that I find in the first few chapters, and am wondering about all the rest! Can I trust it? I tried to find an errata on the web, but without success.


Examples:


p38: "a class constructor should be named __constructor()," then he uses __construct().
p44: "polymorphism. This is derived from Latin..."
p46: ' " . mysql_escape... (missing closing quote)
p65: "that changes it's API..."


It's hard enough as it is, considering I have zero OOP experience, I'd like to be able to trust what I'm reading. Granted, none of the above are earth-shattering, but are they the tip of the iceberg and am I picking up only them because I don't already master the subject?


Cheers,


Pierre

dereksivers
2004-06-14 15:26:23
errata?
Yeah I noticed at least a DOZEN different errors in even a first read. But the overall point was so good I didn't mind a few typos.


In fact, I liked how it kept me on my toes, catching all of them.

hakkikt
2004-06-15 13:35:42
errata?
> In fact, I liked how it kept me on my toes, catching all of them.


Eh, that's a way to look at it...


Pierre

Vernon_T_Bludgeon
2004-10-15 07:42:05
errata?
I'd love to find out where the errata page is for this book. Been googling for minutes with no luck.


There's something odd (it seems to me) in Chapter 12 about database access patterns. I have trouble seeing the fundamental difference between the Active Record and the Integrated Mapper pattern examples. Maybe I'm just dense.


Otherwise, yes, this is truly an extraordinary PHP book. For me in particular -- at the risk of sounding melodramatic -- it could be life-changing. As a self-taught demigeek with a perfectly respectable non-tech day job, I develop in PHP primarily for fun and only secondarily for profit. I wrote a very substantial PHP/MySQL app for use in my place of employment and have since learned so much, although my app works (yay!), it also sucks (disorganized, spaghetti)and I want to rewrite it from the ground up. But the challenges and complexities are considerable. Now comes "Advanced PHP Programmng" to save the day. It is exactly what I need.

jamie007
2005-03-30 17:12:34
Integrated Mapper Pattern
At first glance you can see that the so called "Integrated Mapper Pattern" is different to the Active Record by the construct mapping the appropriate fields to their member variables. However, this to me is still an Active Record??


I think I must be missing something also. If he was implementing some kind of mapper array in the contructor then I could understand the name but otherwise Active Record?


If someone could explain this to me I would be grateful. Glad to see I'm not the only one with the question though.


Anyway, amazing book never the less.

Heinzzz
2006-05-15 03:55:41
errata?
Errata (pdf)


http://www.samspublishing.com/content/images/0672325616/Errata/0672325616errata.pdf

Pablo Impallari
2007-11-18 05:58:49
I guess you are reading this book again 3 years later :)
Congrats !!!!