Hi guys,
I am learning Object Oriented PHP and am writing about it on my website as I go along. If you are already experienced in it, I would appreciate any input you have as I go along and if you aren't, feel free to follow along as I learn!
Thanks
| SitePoint Sponsor |

Hi guys,
I am learning Object Oriented PHP and am writing about it on my website as I go along. If you are already experienced in it, I would appreciate any input you have as I go along and if you aren't, feel free to follow along as I learn!
Thanks
San Diego Freelance Web Development Contractor
Great Taste, no Filler. Now with no Trans Fat!


I'm a bit of an OOP newbie myself. My brain is so hard-wired to procedural, that it's still like a foriegn language to me.
OT, IMHO add some padding to the left content panel.

thanks for the feedback Mittineague, may I ask, what is your screen rez?
San Diego Freelance Web Development Contractor
Great Taste, no Filler. Now with no Trans Fat!


Off Topic:In fact, I am leaning away from "tweaking" the old pages (doable but tedious), and towards a fresh approach using OOP and MVC.
I have Windows OS using Opera 9.23 at 600x800
Don't feel bad. It's hard enough to produce valid mark-up let alone flexible.
My current blog theme - which is pink for October (a GeminiGeek design) - adds scrollbars at 480x640.
My pages are valid and AFAIK are OK, except it bothers me a bit that it's a "hybrid". No nested tables for layout, but the "top level" body mark-up is a table to equalize the 2 column height.
By the time I figure it out, it will be time to learn something else.
Hi Rhlowe.
In my experience, people take to OOP better if you use one of your examples as people. For example:
That kind of thing helped me to understand OOP better (although the tutorial was about JAVA (and I don't even know/want to know JAVA, I was just bored)).Originally Posted by Some non-existent OOP PHP Tutorial
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona

If its about the explaining the fundamental principles of OOP to the novice programmer, then Java has got all the good books from what I have seen (The people who wrote Head First Design Patterns were my no#1 gurus).
The PHP books (that I have read) have their place, and help us deal with the rigours of our particular PHP landscape. There are more appearing. Its great.
Fowler uses mostly Java samples with some c# in POEAA - but if you have grasped the fundamentals, and use PHP5 (of course!) then you will profit from tomes like that.
But, y'see, thats the beauty of it - the message and power of OOP transcends mere languages ... I can now happily read articles by Microsoft gurus and understand what they are talking about.
Heres one of my favourite quotes from a comp.object discussion illustrating the "tell, don't ask" principle .
Class.1. You can get some object's guts, manipulate them and then reinsert
the guts.
Versus.
2. The original object maintains its own guts and outsiders just "tell
it", object.doYourThing ().
Which is better?
Approach 1 has guts everywhere. Knowledge about those guts sprayed all
over the place. This here, that there. Mess.
Approach 2 is simpler, easier, guts and knowledge of guts are in one
place.
Imagine a door bell.
You need to open the box, get the wires out, know the wiring diagram,
connect the wires, trigger the ring.
Versus
A black box with a shiny green button with "Press to ring door bell"
written on it.
If you know your PHP5 OOP, and OOP fundamentals, all these gems are open for you to learn from. Our "particular PHP landscape" is evolving very quickly and I think its exciting to think about the patterns this will throw up - maybe patterns we don't yet recognise.
That's a brilliant quote there cups. I'll remember it next time i'm gutting them objects!
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
Bookmarks