PDA

View Full Version : Recommendation wanted: OO PHP manual/book



s1nykuL
10-11-2011, 01:16 AM
I learned 'C' by reading Kernighan and Ritchies "The C Programming Language" Book. IMHO it has to be the best resource for learning procedural 'C' programming.

I have taught myself procedural PHP coding from various online tutorials and although I still have a lot more to learn I want to master OO programming in PHP. Is there a definitive OO PHP publication written in the same style as the Kernighan and Ritchie book?

If not can someone recommend a book that is recognised as the defacto standard for OO PHP. I do understand the principals behind OO programming but have yet to write a single line of OO code.

desnudopenguino
10-11-2011, 05:19 AM
http://php.net/manual/en/language.oop5.php The docs for php online are a good start before you drop some cash on a book. This is the only source I've used for OO PHP. The documentation for PHP is really good online, and the examples users have included along with the official documentation really helps make things clear. I don't think there is anything in print, and probably online as well, that equals the K&R book in respect to OO PHP. PHP is a good language to move from procedural to object oriented programming as it supports both styles of coding.

s1nykuL
10-12-2011, 02:20 AM
Thanks desnudopenguino, I was aware of this site, I used it for much of my insights into procedural PHP it is a very good resource. I just never thought of finding out about OO PHP from it, my intelligence is only equaled by my capacity for being dumb.

Cheers :)

El Mano
11-22-2011, 04:33 PM
May I ask why OO PHP?
Java is also a nice language for dynamic web content.

El Mano
11-22-2011, 04:33 PM
May I ask why OO PHP?
Java is also a nice language for dynamic web content.

W1zzard
11-22-2011, 11:54 PM
most people use OO PHP to keep their source code more readable and capsulated. i rarely see hardcore OO concepts. If you are already good with procedural PHP, read the PHP OO docs, start using OO for capsulation in your next project, and keep going back to the docs to solve specific issues

s1nykuL
12-03-2011, 03:04 AM
May I ask why OO PHP?
Java is also a nice language for dynamic web content.

Curiosity and research as to whether OO php is better for the kind of Web applications I will be developing... re-useability of classes mainly. However, well constructed functions can be used across various projects without the need for classes. I have never coded OO in any language so it is a learning exercise more than anything.

s1nykuL
12-03-2011, 03:23 AM
most people use OO PHP to keep their source code more readable and capsulated. i rarely see hardcore OO concepts. If you are already good with procedural PHP, read the PHP OO docs, start using OO for capsulation in your next project, and keep going back to the docs to solve specific issues

This is what I plan to do, write procedurally and make use of OO constructs where I feel the project will benefit. After completing my first web app, I now have much more insight as to how php/java/html/jquery work together to render a page and respond to user input. Things are getting easier as I don't have to look up the synopsis of php and Javascript functions nearly as much as I had to at the outset.

s1nykuL
12-03-2011, 03:25 AM
My very first php application is now live, I have tested it to the point risking my sanity. It has to be secure and at this stage it seems to be. I have have tried every injection and XXS attack I can think of and the app is secure.... Until that is someone smarter than me comes along and shows me how lacking in these skills I actually am. I reckon in another 12 months I might just actually understand what I am doing ;-)

I am not going to post a link to the site here, but if anyone is interested in what my first php web app looks like, PM me and I will send a link. Before I started this, I hadn't written a single line of php or used MySQL, although I had built several html sites. This project was my introduction to PHP and MySQL and my client was aware of this.