Page 1 of 1

OOP

Posted: Mon Aug 26, 2002 3:03 am
by Takuma
Why does most of people think OOP is not really needed in PHP??? I think there are very usefull.

Posted: Mon Aug 26, 2002 6:42 am
by phpPete
If you're just whipping up a few scripts for DB queries and data display then OOP is overkill.

If you're developing a web based application with PHP then OOP is one way of doing that, a very good way indeed.

Posted: Mon Aug 26, 2002 8:40 am
by nielsene
I think it also depends on from where you arrive at PHP. Prior to PHP I was a C++/Java programmer most of the time, so I'm used to thinking in objects. As my biggest/ongoing PHP project is my Master's thesis I wanted to do it "right"; to me this meant a OO based design (especially as the non OO prototype became too unwieldy). Because my code is part of a thesis I feel its important to do as much as possible according to the canonical "good software engineering practices." As the expected maximum load is quite small compared to most sites, speed is not a huge issue so it tends to lose in most trade-offs. If I were developing a large community site, I would likely make very different choices.

Posted: Mon Aug 26, 2002 8:55 am
by phpPete
OOP will ultimately become the preferred design paradigm in software and web application design and development.

I'm working on moving all my PHP development to an OOP paradigm, it's just more organized and scalable.

I'm very eager to see how far PHP 5.0 goes towards a fully OOP language.

I imagine PHP will always allow a procedural way of programming, but I'd love to see a JAVA like implementation of OOP in PHP.

Were ZEND to move PHP to an entirely OOP paradigm we'd have a situation akin to VB developers trying to upgrade their apps. to VB.net ( VB-7.0 ).

The learning curve for newbies would also become much steeper.

That would be a challenge!

Posted: Mon Aug 26, 2002 9:52 am
by hob_goblin
I wouldn't mind the learning curve being steeper... I mean, alot of little script kiddies that instant messenge me every day with php questions - they think its as easy as html and once they can write a counter they tell me how 'good' they are.. php is very complicated and deep once you get to know it, and people abuse that :-x

Posted: Mon Aug 26, 2002 10:10 am
by nielsene
Hmm that makes me think... Is PHP a "gateway" language, getting the "innocent" hooked and possible interested in learning other languanges? :)

I suspect the PHP core developers/Zend will always strive to keep the languange simple and I doubt it will ever evolve to a pure/strict OOP model. However, I suspect that they continue to improve the object model as time goes on so that those who want it will have it.

So hob_goblin will still get all the script kiddie IM's :(, but we'll also have deeper crevices to explore and exploit. :D

Posted: Mon Sep 26, 2005 9:29 pm
by alvinphp
nielsene wrote:Hmm that makes me think... Is PHP a "gateway" language, getting the "innocent" hooked and possible interested in learning other languanges? :)....
That what I think of PHP, a gateway language. It is relatively easy to learn and every host has it installed.