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


Groups > comp.lang.php > #15518

Re: OOPHP online tutorials

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

Show all headers | View raw


Richard Heathfield wrote:

> On 25/06/15 10:08, Thomas 'PointedEars' Lahn wrote:
>> Richard Heathfield wrote:
>>> 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>
> 
> Right. I didn't post what I'd already tried. Sorry about that.
> (Incidentally, I have just now been through ESR's entire document
> point-by-point, and that seems to be the only way that I fouled up.)

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

Also:

  Talk is cheap. Show me the code.
    —Linus Torvalds

> So here's what I found in the group's archives:
> 
> * http://www.w-p.dds.nl/tinyunit.htm (which doesn't meet my needs
> because it's too abstract and focused too much on one specific task,
> unit testing).
> * http://php.net/OOP (OOP in PHP 4) and http://php.net/OOP5 (OOP in PHP
> 5), neither of which meet my needs because they focus on syntax (which I
> accept I'll need to learn) without explaining how one would go about
> using OO PHP in a sensible way, which is at the heart of my requirement.

You did not ask how to learn OOP, but OOP with PHP, and that chapter is 
precisely about that.  *Of course* it is tied to the syntax elements 
required to create objects with PHP.

PHP uses class-based inheritance.  I find the chapter in the PHP manual 
rather instructive, and would have referred you to it; but I had learned OOP 
(with Turbo Pascal, Object Pascal in Delphi, and Microsoft Visual C++) 
before I learned PHP (3), and have also used several other OOPLs since then.

> Here's what I found on the Web:
> 
> *
> http://code.tutsplus.com/tutorials/object-oriented-php-for-beginners--net-12762
> which, again, is syntax-based rather than oriented towards how to use
> OOP to shortcut the development process.

Not a bad start.
 
> *
> http://www.killerphp.com/tutorials/object-oriented-php/downloads/oop_in_php_tutorial.pdf
> - again, this focuses on elementary syntax rather than on how to make
> OOP pay its way.

Appears to be well written, although class names should begin with a capital 
letter (“Person”, not “person”), and camel-case is more common in PHP for 
method names and formal parameters (“setName”, not “set_name”).  And avoid 
“==” in favor of “===”.

> * http://www.tutorialspoint.com/php/php_object_oriented.htm - yet again,
> this focuses on elementary syntax,

NAK.

> not on using OOP to cut down on repeated code.

ISTM you are actually asking for “OOP 101”.  Sorry, this newsgroup is not 
it.

> I looked for the FAQ for this group, but couldn't find one. Is there one?

I do not know (I know that <news:de.comp.lang.php> has one).  What exactly 
have you searched for?

> My question may not have been 100% smart, but I don't think it was
> exactly riddled with dumbness. I hope I have now demonstrated that I
> have at least tried to find my own answer. I'm beginning to suspect that
> the real answer is that there is no tutorial out there that meets my
> needs. I hope I'm wrong. Am I?

Mu.

-- 
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