Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!not-for-mail From: "M. Strobel" Newsgroups: comp.lang.php Subject: Re: OOP versus Procedural/Functional Date: Tue, 10 Apr 2012 00:34:17 +0200 Lines: 24 Message-ID: <9uh6f9FujlU1@mid.uni-berlin.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de phfoD1o8EYSuWwF4IWqG7Qq7KqiACoGq6dvAPc1ybWSo48BG4= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: Xref: csiph.com comp.lang.php:5392 Am 09.04.2012 21:35, schrieb Mr. B-o-B: > 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? > > Thanks! > > Mr. B-o-B The OOA/OOD way, supported by a selective use of UML, offers one complete path from requirements to application architecture to implementation. For the smaller work at hand and a language not complete OO, but with OO extensions, like PHP, you can choose what suits you best. Objects are data plus code. I found it quite handy for objects like users, companies, orders, invoices, etc that correspond to database entities. /Str.