FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » OOP versus Procedural/Functional
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: OOP versus Procedural/Functional [message #177567 is a reply to message #177557] Tue, 10 April 2012 02:29 Go to previous messageGo to previous message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma:
Member
In article <9ugtdvFqubU1(at)mid(dot)individual(dot)net>,
"J.O. Aho" <user(at)example(dot)net> wrote:

> Mr. B-o-B wrote:
>> I was curious about peoples thoughts in regards to OOP with PHP.
>>
>> Are there pro's/con's of writing OOP code versus procedural/functional
>> coding?
>>
>> Strictly speaking for PHP, I do the bulk of my coding as
>> procedural/functional. I really haven't found any added benefit to going
>> the
>> OOP route.
>
> There is two minds about OOP, there are those who thinks is the way to go and
> those who thinks it don't give any benefits.
>
>
>
>> Am I missing something, or is it just a different approach to the same
>> problem?
>
> It's another way to solve the problem and there is a third way which kind of
> mixes both worlds.
>
> Read some more about OOP in general and get a bit better insight for example:
> http://www.inf.ufsc.br/poo/smalltalk/ibm/tutorial/oop.html
>
> The site may or may not be good, just got it as a hit on google, never read
> it
> myself.
>
> If you get an aha-moment, then OOP maybe is something for you, but if you
> feel
> it's just making things complicated, than stay with traditional functional
> programming.
>
> Many of the major big projects uses OOP, so it can be a good point in knowing
> how it works.

OK. I thought I was missing something by not immediately jumping on the
OOP bandwagon. My first language was FORTRAN and a friend had to tell
me about 'automatic variables' when I had a particularly annoying
problem that worked in FORTRAN but failed in C.

I picked up the php version of OOP because it made more sense to me than
Perl's implementation. There's to much of Perl I have yet to learn but
I was reasonably able to pick up php 4 and php 5's OOP model and get it
working on small stuff. Then I tried to get something bigger (phpBB),
it was an interesting mess of both procedural and OOP.

I stand by the "use what works when needed" rule. Sometimes it's a ball
peen hammer. Sometimes a sledge. Sometimes bazooka.

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently?
Next Topic: Clean PDO-MySQL Statement
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 08:26:26 GMT 2024

Total time taken to generate the page: 0.04805 seconds