Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15514

Re: OOPHP online tutorials

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.php
Subject Re: OOPHP online tutorials
Date Thu, 25 Jun 2015 11:08:15 +0200
Organization PointedEars Software (PES)
Lines 33
Message-ID <1644374.BmTICnVD65@PointedEars.de> (permalink)
References <mmf2bs$2hf$1@dont-email.me>
Reply-To Thomas 'PointedEars' Lahn <php@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1435223495 4946 eJwFwQkBgAAIA8BKfBsQB1H6R/AOTuVmEAwcLntLElOh8YgZv442g7P6ndE8XSaPLkar/gH4Nw+X (25 Jun 2015 09:11:35 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Thu, 25 Jun 2015 09:11:35 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwNwgcRwDAMBDBK8XgPOM54/hDak2AhcdID4eAvFfmCXFJMSX8HyrbmrZp1anAxKc3xvs29h4OtNmCG6wdSzBXh
Cancel-Lock sha1:85LkiCXFRA88KhLFUo4Vc/SN3KE=
X-NNTP-Posting-Host eJwFwQkBwDAIA0BLhRJC5fAM/xJ2h+viTXO4YbHybQyLy/MQtj5XKgk5EtWPqmmR01gjs/QHGygRCw==
Xref csiph.com comp.lang.php:15514

Show key headers only | View raw


Richard Heathfield wrote:

> Frequently I find myself writing *almost* the same PHP code for a number
> of tasks, but with tiny differences. For example:
> 
> User: create, retrieve, amend, delete
> Group: create, retrieve, amend, delete
> UserPermission: create, retrieve, amend, delete
> GroupPermission: create, retrieve, amend, delete
> DiaryEntry: create, retrieve, amend, delete
> EmbeddedImage: create, retrieve, amend, delete
> 
> and so on. At present, I'm more or less doing copy-paste-edit, which I
> can't help but notice is a terrible way to do things, and it strikes me
> that an object-oriented approach would be more efficient.

It would be more efficient when writing the code, but not when executing the 
code.  You always pay for the generality of an approach by its reduced 
runtime efficiency and memory efficiency.  But it is worth it, literally.
 
> […]
> Are there any excellent but gentle introductions to OO PHP out there on
> the Web?

Yes.

<http://www.catb.org/~esr/faqs/smart-questions.html>

-- 
PointedEars
Zend Certified PHP Engineer
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-24 21:03 +0100
  Re: OOPHP online tutorials bramante <bramante@yopmail.com> - 2015-06-24 23:37 +0200
  Re: OOPHP online tutorials Jerry Stuckle <jstucklex@attglobal.net> - 2015-06-24 23:21 -0400
    Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 09:12 +0100
      Re: OOPHP online tutorials Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-25 11:15 +0200
        Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 12:01 +0100
      Re: OOPHP online tutorials Jerry Stuckle <jstucklex@attglobal.net> - 2015-06-25 08:09 -0400
        Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 13:33 +0100
  Re: OOPHP online tutorials Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-25 11:08 +0200
    Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 11:12 +0100
      Re: OOPHP online tutorials Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-25 14:02 +0200
        Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 13:20 +0100
          Re: OOPHP online tutorials "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-25 14:51 +0200
            Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 13:56 +0100
          Re: OOPHP online tutorials Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-25 15:39 +0200
            Re: OOPHP online tutorials Richard Heathfield <rjh@cpax.org.uk> - 2015-06-25 14:54 +0100

csiph-web