Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: OOP versus Procedural/Functional Date: Mon, 09 Apr 2012 21:59:58 +0200 Lines: 35 Message-ID: <9ugtdvFqubU1@mid.individual.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 7LTHf0LIA7zChSW0g6JougqzqNcMuI4TUjdcq21shppPt83wrT Cancel-Lock: sha1:AWZV6atc2JHC0nCNlWOcmCP0x1k= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120321 Firefox/11.0 SeaMonkey/2.8 In-Reply-To: Xref: csiph.com comp.lang.php:5386 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. -- //Aho