Post a Comment
PHP Objects Patterns and Practice, which is the perfect book to shunt your PHP newbie up into some more grown up techniques. It includes OO, some useful core patterns, and basic introductions to things like source control, unit testing and build tools.
http://tinyurl.com/ezcqp (amazon.co.uk)
I agree. I read this book and found it pleasantly surprising and easy to understand. It also covers utilities "that help you document, manage, test, and build your PHP applications, including Phing, PHPUnit2, phpDocumentor, PEAR, and CVS." (from the back cover)
Here is more information:
Title: PHP 5 Objects, Patterns, and Practice
Author: Matt Zandstra
Publisher: Apress
ISBN: 1-59059-380-4
Check it out if you are serious. I highly recommend this book if you want to move from procedural programming in PHP4 to the object oriented programming afforded in PHP5.
And please, don't forget to pickup/research the topics of PHP security as well. Your code is only as secure as you make it.
Though i haven't read it, i'm inclined to agree.
Having a good book go not only thru OO but how it relates to design patterns (and vice-versa) with some practical examples is a MUST for anyone wanting to go from the "relatively newbie" to designing real structured apps.
OO by itself is nice, but IMHO you can still do "spaghetti" code if you don't get the real essence of it - wich is why i believe design patterns is a must-have.
What constitutes "adformation?" Any product that gets a positive review? Or perhaps you'd rather not see reviews at all? Or better yet, perhaps you'll buy the books and hardware and send them to us for review - you know, to create an unbiased ground zero. Sound fair?
We review products all the time, and I've never once been paid for work on OSNews.
I agree with you, Adam. If you look at the comments both slight and I wrote above entitled See also..., you will notice how both of us were voted down for what I felt was insightful information. This wasn't adformation, but rather our own personal opinions. I would've killed for this column and our types of comments when I was searching for a book covering this topic. Instead, I was forced to search online for (what I felt was) the best starting point.
I hope people can understand that when I post a reference to something, it is anything but advertising. Notice how I never even referenced a web link in my post. I left it up to the reader to perform their own additional research, giving them only a starting point to something that has helped me finally grasp the concept of object oriented programming and patterns.
So does this book focus on some of the special concerns of PHP?
Assuming a web system we have this to think about:
* Each class is parased, compiled and initialized for each and every request.
* The whole execution is geared towards a single request, and thus has no other concern other than to service this uniqe request.
* The execution is probably single threaded and is thus shielded froma alot of concurrency problems.
* Request data is availible in globals.
* Code in each layer can make theese basic assumptions about the execution.
In this environment there's a whole slew of patterns and idoms coming from the Java-OOP world that just doesn't make sense.
Edited 2006-10-06 21:11
According to PHP itself (the devs of course, not the language), the reason PHP 5 isn't as popular as earlier versions with few upgrades is because it tries to go from a loose and very ill-structured language to something that more closely resembles traditional compiled programming languages.
PHP 6 will be almost fully OO, and as such, taken up by even less people.
If people want OO, they won't use PHP. If they want something fast and powerful that gets the job done with minimum fuss they use PHP (no, not RUBY).
Just my two cents.
> If people want OO, they won't use PHP
You're crazy. OOP with PHP5 and MVC is the way to go, very clean and structured programming that is easily maintainable. What else do you want to use beside PHP? Maybe mod_python, but that's it. Definately not JSP! (although it's 100% OOP)
Yeah, *I* agree with you. But that's besides the point.
If the OOP guys want to use PHP, that's great.
But the fact remains, PHP's OOP-direction for v6 and beyond *is* undeniably scaring away many people.
This isn't me talking, it's the numbers. Ask the PHP devs. I use PHP for OOP and you do too... But that scares the living shit out of a lot of others. OOP isn't hard, it's just perceived as being such by the n00bs and script-boys...





