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 #177588 is a reply to message #177587] Tue, 10 April 2012 15:34 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Álvaro G. Vicario wrote:
> El 09/04/2012 21:35, Mr. B-o-B escribió/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.
>>
>> Am I missing something, or is it just a different approach to the same
>> problem?
>
> IMHO, OOP suffers from two problems that aren't actually intrinsic to it:
>
> 1. For many people, it's a religion. This leads to endless debates about
> design patterns and implementation subtleties that replace actual code
> typing. It also leads to teachers and teaching materials that focus on
> how utterly complex and philosophical OOP is rather than how useful it
> is. (There seems to be a endless flow of OOP tutorials out there that
> explain how to code cats and dogs and, apparently, it requires many
> lines of code.)
>
> 2. Discussions about OOP always assume that there's only one type of
> application to be written and only one type of team to write it: the
> mega enterprisey ERP financed by a big-bucks customer maintained by a
> 20+ team.
>
> To make it worse, most of the noise comes from fairly experienced
> non-PHP programmers who are forced to code in a language they neither
> understand nor like and get frustrated when they can't make PHP behave
> like Java.
>
> OOP is a tool. It's a darn good tool and it's just one more tool: that
> says it all. I suffer when I see a thousand lines of getters and setters
> that actually do nothing and I suffer when I see a shopping cart build
> on top of 5-level nested arrays.
>
Just try tracing any simple action like pressing a key in a modern OO
program.

It is horrendous. I like the OO paradigm - its a good tool and I learnt
from it. But I don't write for OO languages. I don't need to as I am not
coding for mega-enterprises.

Sometimes a state machine is a good tool too..just depends what you are
trying to do.


>


--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.
[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: Fri Nov 22 13:50:40 GMT 2024

Total time taken to generate the page: 0.04435 seconds