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


Groups > comp.lang.php > #15514

Re: OOPHP online tutorials

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.php
Subject Re: OOPHP online tutorials
Date 2015-06-25 11:08 +0200
Organization PointedEars Software (PES)
Message-ID <1644374.BmTICnVD65@PointedEars.de> (permalink)
References <mmf2bs$2hf$1@dont-email.me>

Show all headers | 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