php 5 classes: public, protected and private

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony Marston

    #31
    Re: php 5 classes: public, protected and private


    "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
    news:rNidnZrE3O 5fSvPYnZ2dnUVZ_ vednZ2d@comcast .com...
    Tony Marston wrote:
    < snip>
    >>>>>Tony and I have been into this before. He breaks into conversations
    >>>>>trying to spout his version of OO, with a few blogs from people no one
    >>>>>every heard of to back him up.
    >>>>
    >>>>
    >>>>I see. So in your opinion Martin Fowler is of of these "people no one
    >>>>ever heard of "? He says, like I do, that "Encapsulat ion Wasn't Meant To
    >>>>Mean Data Hiding" at http://homepage.mac.com/keithray/blog/2006/02/22/
    >>>>
    >>>>Are you saying that YOU are more of an expert than Martin Fowler? What
    >>>>arrogance !
    >>>>
    >>>
    >>>No, I'm saying Booch, Rumbaugh and Jacobson, among others, are more
    >>>expert than Martin Fowler. And yes, I've heard of him.
    >>>
    >>>But you're not quoting Martin Fowler. You're quoting Keith Ray's
    >>>INTERPRETATI ON if Martin Fowler.
    >>
    >>
    >If you bothered to follow the link to Martn Fowler's page at
    >http://martinfowler.com/bliki/GetterEradicator.html you would see in
    >paragraph 4 tha it is a direct quotation, not an interpretation.
    >>
    >
    Yes, and did you actually read that page? To quote from Martin Fowler:
    >
    "For me, the point of encapsulation isn't really about hiding the data,
    but in hiding design decisions, particularly in areas where those
    decisions may have to change. The internal data representation is one
    example of this..."
    The full quote is "The internal data representation is one example of this,
    ** but not the only one and not always the best one.**" The significant
    point is the sentence which reads "point of encapsulation isn't really about
    hiding the data, but in hiding design decisions". If you follow the link he
    provides to

    by Craig Larman there is an interesting chapter with the title "Informatio n
    hiding is PV, not data encapsulation". The hiding of design decisions was
    supposed to mean hiding the code which manipulates the data, not the data
    itself.

    As I have said several times, and quoted from other resources, encapsulation
    is NOT about INFORMATION hiding but about IMPLEMENTATION hiding. There is a
    subtle difference which you fail to grasp.
    This is in perfect agreement with Booch, Rumbaugh, Iverson and others. And
    a direct CONTRADICTION to troll Tony Marston.
    >
    >>
    >>>>>It's not worth getting into the argument. He's just a troll with
    >>>>>delusion s of competency.
    >>>>
    >>>>
    >>>>If everyone who disagrees with you is incompetent then the world is full
    >>>>of idiots. Your opinion is not the only opinion, and there are plenty of
    >>>>"experts" who have opposing views.
    >>>>
    >>>
    >>>No, I disagree with a lot of competent people. It's YOU who are an
    >>>incompeten t troll. And you continue to prove it.
    >>>
    >>>Try these - with direct quotes from recognized experts, and examples:
    >>>
    >>>http://www.research.umbc.edu/~tarr/d...ciples-2pp.pdf
    >>>http://www.nnwj.de/encapsulation.html
    >>>
    >>>Or better yet, read the real books by these authors.
    >>>
    >>>But I know you won't, because you disagree with what they say, and don't
    >>>want to burst your little bubble.
    >>>
    >>>Troll.
    >>
    >>
    >Whether you like it or not there is no such thing as a single opinion as
    >to what OOP is and is not, and there are multiple interpretations as to
    >the real meaning of encapsulation, inheritance, polymorphism,
    >implementati on hiding and information hiding. Just because you quote
    >sources who agree with you does not mean you are right and everybody else
    >is wrong. Here are sources with the opinion that "Encapsulat ion is NOT
    >information hiding":
    >>
    >http://homepage.mac.com/keithray/blog/2006/02/22/
    >http://martinfowler.com/bliki/GetterEradicator.html
    >http://www.javaworld.com/javaworld/j...on.html?page=1
    >http://www.itmweb.com/essay550.htm
    >http://nat.truemesh.com/archives/000498.html
    >>
    >The world is full of different opinions, so who is to say which ones are
    >right and which ones are wrong?
    >>
    >
    Yea, and some, like yours, troll, are just wrong.
    In your opinion they are wrong, but I do not value your opinion.
    Read the experts I've mentioned several times. You might actually learn
    something.
    >
    But I know you won't. Like all trolls you know everything and anyone who
    disagrees with you is wrong - no matter how much of a recognized expert he
    is.
    All the "experts" in the world do not agree. "My" experts disagree with
    "your" experts. Just because I, and many others, disagree with your opinion
    does not make me/us wrong.
    Go and crawl back into your hole, troll. And take your delusions of
    competence with you.
    Typical reaction of a moron. When you start losing the argument out come the
    insults.

    --
    Tony Marston
    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

    RADICORE is a Rapid Application Development Toolkit for building Administrative Web Applications which are platform independent, browser independent and database independent.



    Comment

    • Jerry Stuckle

      #32
      Re: php 5 classes: public, protected and private

      Tony Marston wrote:
      "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
      news:rNidnZrE3O 5fSvPYnZ2dnUVZ_ vednZ2d@comcast .com...
      >
      >>Tony Marston wrote:
      >
      < snip>
      >
      >>>>>>Tony and I have been into this before. He breaks into conversations
      >>>>>>trying to spout his version of OO, with a few blogs from people no one
      >>>>>>every heard of to back him up.
      >>>>>
      >>>>>
      >>>>>I see. So in your opinion Martin Fowler is of of these "people no one
      >>>>>ever heard of "? He says, like I do, that "Encapsulat ion Wasn't Meant To
      >>>>>Mean Data Hiding" at http://homepage.mac.com/keithray/blog/2006/02/22/
      >>>>>
      >>>>>Are you saying that YOU are more of an expert than Martin Fowler? What
      >>>>>arroganc e!
      >>>>>
      >>>>
      >>>>No, I'm saying Booch, Rumbaugh and Jacobson, among others, are more
      >>>>expert than Martin Fowler. And yes, I've heard of him.
      >>>>
      >>>>But you're not quoting Martin Fowler. You're quoting Keith Ray's
      >>>>INTERPRETAT ION if Martin Fowler.
      >>>
      >>>
      >>>If you bothered to follow the link to Martn Fowler's page at
      >>>http://martinfowler.com/bliki/GetterEradicator.html you would see in
      >>>paragraph 4 tha it is a direct quotation, not an interpretation.
      >>>
      >>
      >>Yes, and did you actually read that page? To quote from Martin Fowler:
      >>
      >>"For me, the point of encapsulation isn't really about hiding the data,
      >>but in hiding design decisions, particularly in areas where those
      >>decisions may have to change. The internal data representation is one
      >>example of this..."
      >
      >
      The full quote is "The internal data representation is one example of this,
      ** but not the only one and not always the best one.**" The significant
      point is the sentence which reads "point of encapsulation isn't really about
      hiding the data, but in hiding design decisions". If you follow the link he
      provides to

      by Craig Larman there is an interesting chapter with the title "Informatio n
      hiding is PV, not data encapsulation". The hiding of design decisions was
      supposed to mean hiding the code which manipulates the data, not the data
      itself.
      >
      As I have said several times, and quoted from other resources, encapsulation
      is NOT about INFORMATION hiding but about IMPLEMENTATION hiding. There is a
      subtle difference which you fail to grasp.
      >
      No, the point YOU fail to grasp, which ALL the experts, including Martin
      Fowler, is the actual variables used are PART OF THE IMPLEMENTATION.

      I never said you should hide the information. But you should hide HOW
      THE INFORMATION IS STORED. That is one of the DESIGN DECISIONS he is
      talking about.

      This is something on which EVERY expert agrees. But you fail to understand.

      And the same thing with Craig Larman's article. He agrees that
      encapsulation is good because it hides the design details. No one ever
      claimed it hid information.

      Wrong on both counts, Tony the Troll. Learn to read.
      >
      >>This is in perfect agreement with Booch, Rumbaugh, Iverson and others. And
      >>a direct CONTRADICTION to troll Tony Marston.
      >>
      >>
      >>>>>>It's not worth getting into the argument. He's just a troll with
      >>>>>>delusio ns of competency.
      >>>>>
      >>>>>
      >>>>>If everyone who disagrees with you is incompetent then the world is full
      >>>>>of idiots. Your opinion is not the only opinion, and there are plenty of
      >>>>>"experts " who have opposing views.
      >>>>>
      >>>>
      >>>>No, I disagree with a lot of competent people. It's YOU who are an
      >>>>incompete nt troll. And you continue to prove it.
      >>>>
      >>>>Try these - with direct quotes from recognized experts, and examples:
      >>>>
      >>>>http://www.research.umbc.edu/~tarr/d...ciples-2pp.pdf
      >>>>http://www.nnwj.de/encapsulation.html
      >>>>
      >>>>Or better yet, read the real books by these authors.
      >>>>
      >>>>But I know you won't, because you disagree with what they say, and don't
      >>>>want to burst your little bubble.
      >>>>
      >>>>Troll.
      >>>
      >>>
      >>>Whether you like it or not there is no such thing as a single opinion as
      >>>to what OOP is and is not, and there are multiple interpretations as to
      >>>the real meaning of encapsulation, inheritance, polymorphism,
      >>>implementati on hiding and information hiding. Just because you quote
      >>>sources who agree with you does not mean you are right and everybody else
      >>>is wrong. Here are sources with the opinion that "Encapsulat ion is NOT
      >>>informatio n hiding":
      >>>
      >>>http://homepage.mac.com/keithray/blog/2006/02/22/
      >>>http://martinfowler.com/bliki/GetterEradicator.html
      >>>http://www.javaworld.com/javaworld/j...on.html?page=1
      >>>http://www.itmweb.com/essay550.htm
      >>>http://nat.truemesh.com/archives/000498.html
      >>>
      >>>The world is full of different opinions, so who is to say which ones are
      >>>right and which ones are wrong?
      >>>
      >>
      >>Yea, and some, like yours, troll, are just wrong.
      >
      >
      In your opinion they are wrong, but I do not value your opinion.
      >
      I really don't give a flying fuck if you or any other troll values my
      opinion, Tony. Your idiocy is beyond comprehension.
      >
      >>Read the experts I've mentioned several times. You might actually learn
      >>something.
      >>
      >>But I know you won't. Like all trolls you know everything and anyone who
      >>disagrees with you is wrong - no matter how much of a recognized expert he
      >>is.
      >
      >
      All the "experts" in the world do not agree. "My" experts disagree with
      "your" experts. Just because I, and many others, disagree with your opinion
      does not make me/us wrong.
      >
      Where did your "experts" get their training? The great Tony Martson
      School of Bullshit?

      These are experts recognized by the INDUSTRY - not me, not Tony Marston.
      They are recognized by top programmers, university professors,
      industry groups, publishers and more.

      And quite frankly, troll Tony Marston's opinion on who an expert is
      isn't important.
      >
      >>Go and crawl back into your hole, troll. And take your delusions of
      >>competence with you.
      >
      >
      Typical reaction of a moron. When you start losing the argument out come the
      insults.
      >
      Yep, you've labeled yourself for sure. I am not "losing the argument".
      Rather, you are just too thick-headed and stubborn to listen to the
      real experts in the field.

      You've done a little programming in one (or maybe even two) languages.
      You think reading some of the crap on the Internet makes you an expert
      in the matter.

      Let me clue you in, Tony. You are far from an expert in anything. A
      web site with some copied (and incorrect) information does not make you
      an expert. Posting your bullshit in this and other newsgroups does not
      make you an expert. And quoting people no one ever heard of does not
      make you an expert.

      Try working on an OO project with 100 programmers. Learn how to do
      proper OO. Then spend another 5-10 years or so working your way up in
      the OOAD field, until you're managing projects like the one above. Then
      your opinions might count. I've done all of that over the years.

      Or even read the books I mentioned by those authors.

      But I know you won't. Like all trolls, you're just plain stupid, and
      are totally afraid the bullshit you've been espousing might be wrong.

      Go away, troll.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Jerry Stuckle

        #33
        Re: php 5 classes: public, protected and private

        Michael Fesser wrote:
        .oO(Tony Marston)
        >
        >
        >>That just tells me what interfaces ARE, but it certainly does not say that
        >>interfaces are REQUIRED. It is possible to define a class method and access
        >>it directly WITHOUT going through an interface, therefore an interface IS
        >>NOT NECESSARY.
        >
        >
        Forget it. Obviously you haven't understood what interfaces in PHP are
        used for and what you can do/ensure with them. Just an example: Without
        these interfaces it wouldn't be possible to use 'foreach' to iterate
        over any arbitrary object:
        >
        foreach ($directory as $file) {...}
        foreach ($resultSet as $record) {...}
        >
        Micha
        Micha,

        Tony is just a troll who is beyond stupid. He can't even understand the
        "experts" he quotes. They contradict what he says, but he can't see that.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • Jerry Stuckle

          #34
          Re: php 5 classes: public, protected and private

          Tony Marston wrote:
          "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
          news:DuWdndxBr5 xeRfPYnZ2dnUVZ_ vidnZ2d@comcast .com...
          < snip>
          >
          >>>>>>The PHP interface defines a set of methods (function) which are
          >>>>>>require d by the classes which implement the interface. Java is similar
          >>>>>>in that respect. But both are a subset of the total interface.
          >>>>>
          >>>>>
          >>>>>It is possible to access the method directly without an interface,
          >>>>>therefor e an interfae is not necessary.
          >>>>>
          >>>>
          >>>>"Possible " != "CORRECT"
          >>>
          >>>
          >>>That's just your opinion. Where does it say that I *MUST* define and use
          >>>an interface before I can access a class method? Interfaces are optional
          >>>(especuial ly in PHP) so it is not wrong to excercise the option NOT to
          >>>use them. I can define a class method and access that method without
          >>>using an interface, and that is what I choose to do.
          >>>
          >>
          >>When are you going to get it through that pea-sized mind of yours that a
          >>PHP interface is not the same as an interface as defined in OO terms?
          >>
          >>In OO terms, a public method is part of the interface. The PHP keyword
          >>interface just defines a set of functions which must be implemented by the
          >>class.
          >>
          >>They are two entirely different things.
          >
          >
          The fact that a method and an interface are different things is irrelevant.
          I am just pointing out that in PHP an interface is not necessary as I can
          access the method directly without going through an interface. Is this
          statement true or false?
          >
          No, the fact that they are different are VERY RELEVANT. The fact you
          can't understand the difference is also VERY RELEVANT. Or is it just
          that you disregard facts which don't support with your stupidness?

          Losing the argument so you need to disregard the facts? Typical troll
          behavior.

          Whether or not a PHP interface is required is immaterial - we are
          talking about the OO concept of an interface, not PHP interfaces.

          But that's way too deep for you to understand - the same word having
          different meanings in different contexts? Hope your head didn't explode.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • Buddy

            #35
            Re: php 5 classes: public, protected and private

            Python does what LISP does with better syntax. So I would say Python
            bets both LISP and PHP and with mod_python (for Apache), maybe you
            should learn it.

            Tony Marston wrote:
            "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
            news:n9GdnZYmX_-4EfDYnZ2dnUVZ_q-dnZ2d@comcast.c om...
            Tony Marston wrote:
            "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
            news:bpudnWTDrL PbNPHYnZ2dnUVZ_ tudnZ2d@comcast .com...
            >
            >>Tony Marston wrote:
            >>
            >>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
            >>>news:PeudnRK ltLJsufHYnZ2dnU VZ_u2dnZ2d@comc ast.com...
            >>>
            >>>
            >>>>Tony Marston wrote:
            >>>>
            >>>>
            >>>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
            >>>>>news:j9-dnQB80fVLOvbYnZ 2dnUVZ_rOdnZ2d@ comcast.com...
            >>>>>
            >>>>>
            >>>>>
            >>>>>>Tony Marston wrote:
            >>>>>>
            >>>>>>
            >>>>>>
            >>>>>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
            >>>>>>>news:Ib6 dna_BtYQSifbYnZ 2dnUVZ_sSdnZ2d@ comcast.com...
            >>>>>>>
            >>>>>>>
            >>>>>>>
            >>>>>>>
            >>>>>>>>jopperd epopper wrote:
            >>>>>>>>
            >>>>>>>>
            >>>>>>>>
            >>>>>>>>
            >>>>>>>>>>You should read "can be accessed everywhere".
            >>>>>>>>>>
            >>>>>>>>>>Priva te members can be accessed by members of the class only.
            >>>>>>>>>>Prote cted members can be accessed by members of the class or a
            >>>>>>>>>>deriv ed
            >>>>>>>>>>class .
            >>>>>>>>>>Publi c members can be accessed by anyone, including other
            >>>>>>>>>>class es,
            >>>>>>>>>>funct ions and any other code.
            >>>>>>>>>
            >>>>>>>>>
            >>>>>>>>>
            >>>>>>>>>Than ks Jerry. I'm trying to make a bit of sense of the php 5
            >>>>>>>>>approa ch
            >>>>>>>>>to classes, and so far having a hard time. I fail to see the 'why'
            >>>>>>>>>behi nd the 'public, protected and private' and stuff like
            >>>>>>>>>abstra ction,
            >>>>>>>>>interf aces and whatnot.
            >>>>>>>
            >>>>>>>
            >>>>>>>Inteface s are not necessary in PHP. Once you have defined a method
            >>>>>>>it is a total waste to time to also define an interface. Interfaces
            >>>>>>>are a "fix" in those languages as a means of dealing with optional
            >>>>>>>argument s and statyic typing. PHP has ifferent ways of dealing with
            >>>>>>>bth of these, therefore interfaces serve no useful purpose.
            >>>>>>>
            >>>>>>
            >>>>>>Ah, the great Tony Marston is back to trolling again.
            >>>>>>
            >>>>>>Wrong. In OO terms, the interface is the way to interact with the
            >>>>>>object. It consists of all public members - both methods (functions,
            >>>>>>in PHP) and variables. And for derived classes, the base class adds
            >>>>>>protect ed members.
            >>>>>>
            >>>>>>A PHP interface is something entirely different.
            >>>>>
            >>>>>
            >>>>>I disagree. It is possible to define a function (method) within a
            >>>>>class,
            >>>>>then to define a separate thing called an "interface" . It is possible
            >>>>>access
            >>>>>the function without using the interface, therefore the interface is
            >>>>>not
            >>>>>necessar y.
            >>>>>
            >>>>
            >>>>Tony,
            >>>>
            >>>>You really need to learn about OO before spouting off. In OO terms, an
            >>>>interface is something entirely different than a PHP interface.
            >>>
            >>>
            >>>How so? All the documentation I have seen describes how an interface
            >>>simply describes a method which it imlements. If it is possible to
            >>>access a method (a function in PHP) without going though an interface,
            >>>ten an interface is not necessary in any language.
            >>>
            >>
            >>You need to understand the difference between an interface as described
            >>in OO terms and the PHP interface.
            >>
            >>The PHP interface defines a set of methods (function) which are required
            >>by the classes which implement the interface. Java is similar in that
            >>respect. But both are a subset of the total interface.
            >
            >
            It is possible to access the method directly without an interface,
            therefore an interfae is not necessary.
            >
            "Possible" != "CORRECT"
            >
            That's just your opinion. Where does it say that I *MUST* define and use an
            interface before I can access a class method? Interfaces are optional
            (especuially in PHP) so it is not wrong to excercise the option NOT to use
            them. I can define a class method and access that method without using an
            interface, and that is what I choose to do.
            >
            --
            Tony Marston
            This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

            http://www.radicore.org

            Comment

            • Michael Fesser

              #36
              Re: php 5 classes: public, protected and private

              ..oO(Jerry Stuckle)
              >Tony is just a troll who is beyond stupid.
              I start to believe that. ;(

              Micha

              Comment

              • Michael Fesser

                #37
                Re: php 5 classes: public, protected and private

                ..oO(Tony Marston)
                >Just an example: Without
                >these interfaces it wouldn't be possible to use 'foreach' to iterate
                >over any arbitrary object:
                >>
                >foreach ($directory as $file) {...}
                >foreach ($resultSet as $record) {...}
                >
                >With PHP 5 it is possible to use 'foreach' on an object without the use of
                >interfaces, so your argument is not valid.
                It's a huge difference whether you just loop through all of the object's
                properties like an array (that's what you described above) or if each
                iteration automatically calls a particular method, which for example
                fetches the next record from a database.

                The latter is the basis of the SPL extension and not possible without
                interfaces. Maybe IYHO the entire extension is not valid as well?

                Micha

                Comment

                • Tony Marston

                  #38
                  Re: php 5 classes: public, protected and private


                  "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                  news:kv-dnVmk7pteu-3YnZ2dnUVZ_sedn Z2d@comcast.com ...
                  Tony Marston wrote:
                  >"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                  >news:DuWdndxBr 5xeRfPYnZ2dnUVZ _vidnZ2d@comcas t.com...
                  >< snip>
                  >>
                  >>>>>>>The PHP interface defines a set of methods (function) which are
                  >>>>>>>requir ed by the classes which implement the interface. Java is
                  >>>>>>>simila r in that respect. But both are a subset of the total
                  >>>>>>>interfac e.
                  >>>>>>
                  >>>>>>
                  >>>>>>It is possible to access the method directly without an interface,
                  >>>>>>therefo re an interfae is not necessary.
                  >>>>>>
                  >>>>>
                  >>>>>"Possibl e" != "CORRECT"
                  >>>>
                  >>>>
                  >>>>That's just your opinion. Where does it say that I *MUST* define and use
                  >>>>an interface before I can access a class method? Interfaces are optional
                  >>>>(especuiall y in PHP) so it is not wrong to excercise the option NOT to
                  >>>>use them. I can define a class method and access that method without
                  >>>>using an interface, and that is what I choose to do.
                  >>>>
                  >>>
                  >>>When are you going to get it through that pea-sized mind of yours that a
                  >>>PHP interface is not the same as an interface as defined in OO terms?
                  >>>
                  >>>In OO terms, a public method is part of the interface. The PHP keyword
                  >>>interface just defines a set of functions which must be implemented by
                  >>>the class.
                  >>>
                  >>>They are two entirely different things.
                  >>
                  >>
                  >The fact that a method and an interface are different things is
                  >irrelevant. I am just pointing out that in PHP an interface is not
                  >necessary as I can access the method directly without going through an
                  >interface. Is this statement true or false?
                  >>
                  >
                  No, the fact that they are different are VERY RELEVANT. The fact you
                  can't understand the difference is also VERY RELEVANT. Or is it just that
                  you disregard facts which don't support with your stupidness?
                  >
                  Losing the argument so you need to disregard the facts? Typical troll
                  behavior.
                  >
                  Whether or not a PHP interface is required is immaterial - we are talking
                  about the OO concept of an interface, not PHP interfaces.
                  >
                  But that's way too deep for you to understand - the same word having
                  different meanings in different contexts? Hope your head didn't explode.
                  This is a PHP newsgroup, so I am explaining how interfaces work within PHP.
                  It is a simple fact that interfaces ARE NOT NECESSARY in PHP. The fact that
                  interfaces are treated differently in other languages is totally irrelevant.
                  The fact that YOU think that interfaces in PHP should behave exactly the
                  same as in other languages is also irrelevant.

                  --
                  Tony Marston
                  This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

                  RADICORE is a Rapid Application Development Toolkit for building Administrative Web Applications which are platform independent, browser independent and database independent.



                  Comment

                  • Tony Marston

                    #39
                    Re: php 5 classes: public, protected and private


                    "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                    news:WfCdnZm7SJ gKuO3YnZ2dnUVZ_ u6dnZ2d@comcast .com...
                    Tony Marston wrote:
                    >"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                    >news:rNidnZrE3 O5fSvPYnZ2dnUVZ _vednZ2d@comcas t.com...
                    >>
                    >>>Tony Marston wrote:
                    >>
                    >< snip>
                    >>
                    >>>>>>>Tony and I have been into this before. He breaks into conversations
                    >>>>>>>trying to spout his version of OO, with a few blogs from people no
                    >>>>>>>one every heard of to back him up.
                    >>>>>>
                    >>>>>>
                    >>>>>>I see. So in your opinion Martin Fowler is of of these "people no one
                    >>>>>>ever heard of "? He says, like I do, that "Encapsulat ion Wasn't Meant
                    >>>>>>To Mean Data Hiding" at
                    >>>>>>http://homepage.mac.com/keithray/blog/2006/02/22/
                    >>>>>>
                    >>>>>>Are you saying that YOU are more of an expert than Martin Fowler? What
                    >>>>>>arrogance !
                    >>>>>>
                    >>>>>
                    >>>>>No, I'm saying Booch, Rumbaugh and Jacobson, among others, are more
                    >>>>>expert than Martin Fowler. And yes, I've heard of him.
                    >>>>>
                    >>>>>But you're not quoting Martin Fowler. You're quoting Keith Ray's
                    >>>>>INTERPRETA TION if Martin Fowler.
                    >>>>
                    >>>>
                    >>>>If you bothered to follow the link to Martn Fowler's page at
                    >>>>http://martinfowler.com/bliki/GetterEradicator.html you would see in
                    >>>>paragraph 4 tha it is a direct quotation, not an interpretation.
                    >>>>
                    >>>
                    >>>Yes, and did you actually read that page? To quote from Martin Fowler:
                    >>>
                    >>>"For me, the point of encapsulation isn't really about hiding the data,
                    >>>but in hiding design decisions, particularly in areas where those
                    >>>decisions may have to change. The internal data representation is one
                    >>>example of this..."
                    >>
                    >>
                    >The full quote is "The internal data representation is one example of
                    >this, ** but not the only one and not always the best one.**" The
                    >significant point is the sentence which reads "point of encapsulation
                    >isn't really about hiding the data, but in hiding design decisions". If
                    >you follow the link he provides to
                    >http://www.craiglarman.com/articles/...20Software.pdf
                    >by Craig Larman there is an interesting chapter with the title
                    >"Informatio n hiding is PV, not data encapsulation". The hiding of design
                    >decisions was supposed to mean hiding the code which manipulates the
                    >data, not the data itself.
                    >>
                    >As I have said several times, and quoted from other resources,
                    >encapsulatio n is NOT about INFORMATION hiding but about IMPLEMENTATION
                    >hiding. There is a subtle difference which you fail to grasp.
                    >>
                    >
                    No, the point YOU fail to grasp, which ALL the experts, including Martin
                    Fowler, is the actual variables used are PART OF THE IMPLEMENTATION.
                    >
                    I never said you should hide the information. But you should hide HOW THE
                    INFORMATION IS STORED. That is one of the DESIGN DECISIONS he is talking
                    about.
                    I suggest you learn to read. The article by Craig Larman clearly states "In
                    it, Parnas introduces information hiding. Many people have misinterpretted
                    this term as meaning data encapsulation, and some books erroneously define
                    the concepts as synonyms"
                    Do you see? "Encapsulat ion" is not supposed to mean "data encapsulation".

                    This is something on which EVERY expert agrees. But you fail to
                    understand.
                    Not EVERY export. Some agree, some don't..
                    And the same thing with Craig Larman's article. He agrees that
                    encapsulation is good because it hides the design details. No one ever
                    claimed it hid information.
                    >
                    Wrong on both counts, Tony the Troll. Learn to read.
                    "Encapsulat ion" is not supposed to mean "data encapsulation". It is supposed
                    to hide the implemetation (code), not the information (data).
                    >>
                    >>>This is in perfect agreement with Booch, Rumbaugh, Iverson and others.
                    >>>And a direct CONTRADICTION to troll Tony Marston.
                    >>>
                    >>>
                    >>>>>>>It's not worth getting into the argument. He's just a troll with
                    >>>>>>>delusion s of competency.
                    >>>>>>
                    >>>>>>
                    >>>>>>If everyone who disagrees with you is incompetent then the world is
                    >>>>>>full of idiots. Your opinion is not the only opinion, and there are
                    >>>>>>plenty of "experts" who have opposing views.
                    >>>>>>
                    >>>>>
                    >>>>>No, I disagree with a lot of competent people. It's YOU who are an
                    >>>>>incompeten t troll. And you continue to prove it.
                    I see. I agree with some of the people that you disagree with, yet that
                    makes me a troll.
                    >>>>>Try these - with direct quotes from recognized experts, and examples:
                    >>>>>
                    >>>>>http://www.research.umbc.edu/~tarr/d...ciples-2pp.pdf
                    >>>>>http://www.nnwj.de/encapsulation.html
                    >>>>>
                    >>>>>Or better yet, read the real books by these authors.
                    >>>>>
                    >>>>>But I know you won't, because you disagree with what they say, and
                    >>>>>don't want to burst your little bubble.
                    >>>>>
                    >>>>>Troll.
                    >>>>
                    >>>>
                    >>>>Whether you like it or not there is no such thing as a single opinion as
                    >>>>to what OOP is and is not, and there are multiple interpretations as to
                    >>>>the real meaning of encapsulation, inheritance, polymorphism,
                    >>>>implementat ion hiding and information hiding. Just because you quote
                    >>>>sources who agree with you does not mean you are right and everybody
                    >>>>else is wrong. Here are sources with the opinion that "Encapsulat ion is
                    >>>>NOT information hiding":
                    >>>>
                    >>>>http://homepage.mac.com/keithray/blog/2006/02/22/
                    >>>>http://martinfowler.com/bliki/GetterEradicator.html
                    >>>>http://www.javaworld.com/javaworld/j...on.html?page=1
                    >>>>http://www.itmweb.com/essay550.htm
                    >>>>http://nat.truemesh.com/archives/000498.html
                    >>>>
                    >>>>The world is full of different opinions, so who is to say which ones are
                    >>>>right and which ones are wrong?
                    >>>>
                    >>>
                    >>>Yea, and some, like yours, troll, are just wrong.
                    >>
                    >>
                    >In your opinion they are wrong, but I do not value your opinion.
                    >>
                    >
                    I really don't give a flying fuck if you or any other troll values my
                    opinion, Tony. Your idiocy is beyond comprehension.
                    >>
                    >>>Read the experts I've mentioned several times. You might actually learn
                    >>>something.
                    >>>
                    >>>But I know you won't. Like all trolls you know everything and anyone who
                    >>>disagrees with you is wrong - no matter how much of a recognized expert
                    >>>he is.
                    >>
                    >>
                    >All the "experts" in the world do not agree. "My" experts disagree with
                    >"your" experts. Just because I, and many others, disagree with your
                    >opinion does not make me/us wrong.
                    >>
                    >
                    Where did your "experts" get their training? The great Tony Martson
                    School of Bullshit?
                    >
                    These are experts recognized by the INDUSTRY - not me, not Tony Marston.
                    They are recognized by top programmers, university professors, industry
                    groups, publishers and more.
                    >
                    And quite frankly, troll Tony Marston's opinion on who an expert is isn't
                    important.
                    Neither is yours.
                    >>>Go and crawl back into your hole, troll. And take your delusions of
                    >>>competence with you.
                    >>
                    >>
                    >Typical reaction of a moron. When you start losing the argument out come
                    >the insults.
                    >>
                    >
                    Yep, you've labeled yourself for sure. I am not "losing the argument".
                    Rather, you are just too thick-headed and stubborn to listen to the real
                    experts in the field.
                    As I keep on saying, there is no such thing as one set of experts with whom
                    EVERYBODY agrees, just as there is no such thing as one programming style
                    with which EVEYBODY agrees.In every walk of life there are different
                    opinions, and all I am doing is expressing an opinion which isdifferent from
                    yours.
                    You've done a little programming in one (or maybe even two) languages.
                    I have done a lot of programming in many languages.
                    You think reading some of the crap on the Internet makes you an expert in
                    the matter.
                    Just as the crap you read makes you an expert.
                    Let me clue you in, Tony. You are far from an expert in anything. A web
                    site with some copied (and incorrect)
                    It is only your opinion that it is incorect. Other people do not think so.
                    information does not make you an expert. Posting your bullshit in this
                    and other newsgroups does not make you an expert.
                    Posting your bullsh*t does not make you an expert either.
                    And quoting people no one ever heard of does not make you an expert.
                    Just because you haven't heard of them does no mean that they do not exist,
                    nor hat their opinions are worthless.
                    Try working on an OO project with 100 programmers. Learn how to do
                    proper OO.
                    I once worked on a project with a team of so-called OO "experts", and it was
                    the worst technical disaster of my entire career. They were so full of their
                    fancy ideas they coud not tell which way was up. They were so incompetent
                    they could not find their own backsides in the dark if you let them use both
                    hands and gave them a map and compass.
                    Then spend another 5-10 years or so working your way up in the OOAD
                    field, until you're managing projects like the one above. Then your
                    opinions might count. I've done all of that over the years.
                    >
                    Or even read the books I mentioned by those authors.
                    >
                    But I know you won't. Like all trolls, you're just plain stupid, and are
                    totally afraid the bullshit you've been espousing might be wrong.
                    >
                    Go away, troll.
                    No, I won't. I will keep contradicting your opinions until hell freezes over
                    for the simple reason that I, and others, do not agree with your opinions.

                    --
                    Tony Marston
                    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

                    RADICORE is a Rapid Application Development Toolkit for building Administrative Web Applications which are platform independent, browser independent and database independent.



                    Comment

                    • Tony Marston

                      #40
                      Re: php 5 classes: public, protected and private


                      "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                      news:WfCdnZi7SJ hguO3YnZ2dnUVZ_ u6dnZ2d@comcast .com...
                      Michael Fesser wrote:
                      >.oO(Tony Marston)
                      >>
                      >>
                      >>>That just tells me what interfaces ARE, but it certainly does not say
                      >>>that interfaces are REQUIRED. It is possible to define a class method and
                      >>>access it directly WITHOUT going through an interface, therefore an
                      >>>interface IS NOT NECESSARY.
                      >>
                      >>
                      >Forget it. Obviously you haven't understood what interfaces in PHP are
                      >used for and what you can do/ensure with them. Just an example: Without
                      >these interfaces it wouldn't be possible to use 'foreach' to iterate
                      >over any arbitrary object:
                      >>
                      >foreach ($directory as $file) {...}
                      >foreach ($resultSet as $record) {...}
                      >>
                      >Micha
                      >
                      Micha,
                      >
                      Tony is just a troll who is beyond stupid. He can't even understand the
                      "experts" he quotes. They contradict what he says, but he can't see that.
                      They also contradict what you say, and you can't see that.

                      --
                      Tony Marston
                      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

                      RADICORE is a Rapid Application Development Toolkit for building Administrative Web Applications which are platform independent, browser independent and database independent.



                      Comment

                      • Tony Marston

                        #41
                        Re: php 5 classes: public, protected and private


                        "Michael Fesser" <netizen@gmx.de wrote in message
                        news:u4f0n2tpfk fscou9beeq5pig1 21dhd9edf@4ax.c om...
                        .oO(Tony Marston)
                        >
                        >>Just an example: Without
                        >>these interfaces it wouldn't be possible to use 'foreach' to iterate
                        >>over any arbitrary object:
                        >>>
                        >>foreach ($directory as $file) {...}
                        >>foreach ($resultSet as $record) {...}
                        >>
                        >>With PHP 5 it is possible to use 'foreach' on an object without the use of
                        >>interfaces, so your argument is not valid.
                        >
                        It's a huge difference whether you just loop through all of the object's
                        properties like an array (that's what you described above) or if each
                        iteration automatically calls a particular method, which for example
                        fetches the next record from a database.
                        >
                        The latter is the basis of the SPL extension and not possible without
                        interfaces. Maybe IYHO the entire extension is not valid as well?
                        >
                        Micha
                        I have no opinion on the SPL extension as I have never used it. That
                        argument is irrelevant anyway. The point being debated here is whether
                        interfaces in PHP are necessary, and it is my opinion that they are NOT.

                        --
                        Tony Marston
                        This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

                        RADICORE is a Rapid Application Development Toolkit for building Administrative Web Applications which are platform independent, browser independent and database independent.



                        Comment

                        • Tony Marston

                          #42
                          Re: php 5 classes: public, protected and private

                          "Buddy" <buddywilliams@ gmail.comwrote in message
                          news:1164981091 .874110.111360@ 73g2000cwn.goog legroups.com...
                          Python does what LISP does with better syntax. So I would say Python
                          bets both LISP and PHP and with mod_python (for Apache), maybe you
                          should learn it.
                          What has this got to do with the topic being discussed?

                          --
                          Tony Marston
                          This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

                          RADICORE is a Rapid Application Development Toolkit for building Administrative Web Applications which are platform independent, browser independent and database independent.

                          Tony Marston wrote:
                          >"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          >news:n9GdnZYmX _-4EfDYnZ2dnUVZ_q-dnZ2d@comcast.c om...
                          Tony Marston wrote:
                          >"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          >news:bpudnWTDr LPbNPHYnZ2dnUVZ _tudnZ2d@comcas t.com...
                          >>
                          >>>Tony Marston wrote:
                          >>>
                          >>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          >>>>news:PeudnR KltLJsufHYnZ2dn UVZ_u2dnZ2d@com cast.com...
                          >>>>
                          >>>>
                          >>>>>Tony Marston wrote:
                          >>>>>
                          >>>>>
                          >>>>>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                          >>>>>>news:j9-dnQB80fVLOvbYnZ 2dnUVZ_rOdnZ2d@ comcast.com...
                          >>>>>>
                          >>>>>>
                          >>>>>>
                          >>>>>>>Tony Marston wrote:
                          >>>>>>>
                          >>>>>>>
                          >>>>>>>
                          >>>>>>>>"Jerr y Stuckle" <jstucklex@attg lobal.netwrote in message
                          >>>>>>>>news:Ib 6dna_BtYQSifbYn Z2dnUVZ_sSdnZ2d @comcast.com...
                          >>>>>>>>
                          >>>>>>>>
                          >>>>>>>>
                          >>>>>>>>
                          >>>>>>>>>jopper depopper wrote:
                          >>>>>>>>>
                          >>>>>>>>>
                          >>>>>>>>>
                          >>>>>>>>>
                          >>>>>>>>>>>Yo u should read "can be accessed everywhere".
                          >>>>>>>>>>>
                          >>>>>>>>>>>Priv ate members can be accessed by members of the class only.
                          >>>>>>>>>>>Prot ected members can be accessed by members of the class or a
                          >>>>>>>>>>>deri ved
                          >>>>>>>>>>>clas s.
                          >>>>>>>>>>>Publ ic members can be accessed by anyone, including other
                          >>>>>>>>>>>clas ses,
                          >>>>>>>>>>>func tions and any other code.
                          >>>>>>>>>>
                          >>>>>>>>>>
                          >>>>>>>>>>
                          >>>>>>>>>>Thank s Jerry. I'm trying to make a bit of sense of the php 5
                          >>>>>>>>>>appro ach
                          >>>>>>>>>>to classes, and so far having a hard time. I fail to see the
                          >>>>>>>>>>'wh y'
                          >>>>>>>>>>behin d the 'public, protected and private' and stuff like
                          >>>>>>>>>>abstr action,
                          >>>>>>>>>>inter faces and whatnot.
                          >>>>>>>>
                          >>>>>>>>
                          >>>>>>>>Intefac es are not necessary in PHP. Once you have defined a
                          >>>>>>>>metho d
                          >>>>>>>>it is a total waste to time to also define an interface.
                          >>>>>>>>Interfa ces
                          >>>>>>>>are a "fix" in those languages as a means of dealing with
                          >>>>>>>>optiona l
                          >>>>>>>>argumen ts and statyic typing. PHP has ifferent ways of dealing
                          >>>>>>>>with
                          >>>>>>>>bth of these, therefore interfaces serve no useful purpose.
                          >>>>>>>>
                          >>>>>>>
                          >>>>>>>Ah, the great Tony Marston is back to trolling again.
                          >>>>>>>
                          >>>>>>>Wrong. In OO terms, the interface is the way to interact with the
                          >>>>>>>object . It consists of all public members - both methods
                          >>>>>>>(functio ns,
                          >>>>>>>in PHP) and variables. And for derived classes, the base class
                          >>>>>>>adds
                          >>>>>>>protecte d members.
                          >>>>>>>
                          >>>>>>>A PHP interface is something entirely different.
                          >>>>>>
                          >>>>>>
                          >>>>>>I disagree. It is possible to define a function (method) within a
                          >>>>>>class,
                          >>>>>>then to define a separate thing called an "interface" . It is
                          >>>>>>possibl e
                          >>>>>>access
                          >>>>>>the function without using the interface, therefore the interface
                          >>>>>>is
                          >>>>>>not
                          >>>>>>necessary .
                          >>>>>>
                          >>>>>
                          >>>>>Tony,
                          >>>>>
                          >>>>>You really need to learn about OO before spouting off. In OO terms,
                          >>>>>an
                          >>>>>interfac e is something entirely different than a PHP interface.
                          >>>>
                          >>>>
                          >>>>How so? All the documentation I have seen describes how an interface
                          >>>>simply describes a method which it imlements. If it is possible to
                          >>>>access a method (a function in PHP) without going though an
                          >>>>interface ,
                          >>>>ten an interface is not necessary in any language.
                          >>>>
                          >>>
                          >>>You need to understand the difference between an interface as
                          >>>described
                          >>>in OO terms and the PHP interface.
                          >>>
                          >>>The PHP interface defines a set of methods (function) which are
                          >>>required
                          >>>by the classes which implement the interface. Java is similar in that
                          >>>respect. But both are a subset of the total interface.
                          >>
                          >>
                          >It is possible to access the method directly without an interface,
                          >therefore an interfae is not necessary.
                          >>
                          >
                          "Possible" != "CORRECT"
                          >>
                          >That's just your opinion. Where does it say that I *MUST* define and use
                          >an
                          >interface before I can access a class method? Interfaces are optional
                          >(especuially in PHP) so it is not wrong to excercise the option NOT to
                          >use
                          >them. I can define a class method and access that method without using an
                          >interface, and that is what I choose to do.
                          >>
                          >--
                          >Tony Marston
                          >http://www.tonymarston.net
                          >http://www.radicore.org
                          >

                          Comment

                          • Jerry Stuckle

                            #43
                            Re: php 5 classes: public, protected and private

                            Tony Marston wrote:
                            "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                            news:WfCdnZm7SJ gKuO3YnZ2dnUVZ_ u6dnZ2d@comcast .com...
                            >
                            >>Tony Marston wrote:
                            >>
                            >>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                            >>>news:rNidnZr E3O5fSvPYnZ2dnU VZ_vednZ2d@comc ast.com...
                            >>>
                            >>>
                            >>>>Tony Marston wrote:
                            >>>
                            >>>< snip>
                            >>>
                            >>>>>>>>Tony and I have been into this before. He breaks into conversations
                            >>>>>>>>tryin g to spout his version of OO, with a few blogs from people no
                            >>>>>>>>one every heard of to back him up.
                            >>>>>>>
                            >>>>>>>
                            >>>>>>>I see. So in your opinion Martin Fowler is of of these "people no one
                            >>>>>>>ever heard of "? He says, like I do, that "Encapsulat ion Wasn't Meant
                            >>>>>>>To Mean Data Hiding" at
                            >>>>>>>http://homepage.mac.com/keithray/blog/2006/02/22/
                            >>>>>>>
                            >>>>>>>Are you saying that YOU are more of an expert than Martin Fowler? What
                            >>>>>>>arroganc e!
                            >>>>>>>
                            >>>>>>
                            >>>>>>No, I'm saying Booch, Rumbaugh and Jacobson, among others, are more
                            >>>>>>expert than Martin Fowler. And yes, I've heard of him.
                            >>>>>>
                            >>>>>>But you're not quoting Martin Fowler. You're quoting Keith Ray's
                            >>>>>>INTERPRET ATION if Martin Fowler.
                            >>>>>
                            >>>>>
                            >>>>>If you bothered to follow the link to Martn Fowler's page at
                            >>>>>http://martinfowler.com/bliki/GetterEradicator.html you would see in
                            >>>>>paragrap h 4 tha it is a direct quotation, not an interpretation.
                            >>>>>
                            >>>>
                            >>>>Yes, and did you actually read that page? To quote from Martin Fowler:
                            >>>>
                            >>>>"For me, the point of encapsulation isn't really about hiding the data,
                            >>>>but in hiding design decisions, particularly in areas where those
                            >>>>decisions may have to change. The internal data representation is one
                            >>>>example of this..."
                            >>>
                            >>>
                            >>>The full quote is "The internal data representation is one example of
                            >>>this, ** but not the only one and not always the best one.**" The
                            >>>significan t point is the sentence which reads "point of encapsulation
                            >>>isn't really about hiding the data, but in hiding design decisions". If
                            >>>you follow the link he provides to
                            >>>http://www.craiglarman.com/articles/...20Software.pdf
                            >>>by Craig Larman there is an interesting chapter with the title
                            >>>"Informati on hiding is PV, not data encapsulation". The hiding of design
                            >>>decisions was supposed to mean hiding the code which manipulates the
                            >>>data, not the data itself.
                            >>>
                            >>>As I have said several times, and quoted from other resources,
                            >>>encapsulatio n is NOT about INFORMATION hiding but about IMPLEMENTATION
                            >>>hiding. There is a subtle difference which you fail to grasp.
                            >>>
                            >>
                            >>No, the point YOU fail to grasp, which ALL the experts, including Martin
                            >>Fowler, is the actual variables used are PART OF THE IMPLEMENTATION.
                            >>
                            >>I never said you should hide the information. But you should hide HOW THE
                            >>INFORMATION IS STORED. That is one of the DESIGN DECISIONS he is talking
                            >>about.
                            >
                            >
                            I suggest you learn to read. The article by Craig Larman clearly states "In
                            it, Parnas introduces information hiding. Many people have misinterpretted
                            this term as meaning data encapsulation, and some books erroneously define
                            the concepts as synonyms"
                            Do you see? "Encapsulat ion" is not supposed to mean "data encapsulation".
                            >
                            Yes, I suggest you learn to read, Tony. Start with the real experts.

                            You're just a stupid troll who looks around for someone to support his
                            position. Read the authors I recommended.

                            And no, I don't need to read any more of your "experts". I've read
                            enough to see that you really don't understand what they're talking about.
                            >
                            >
                            >>This is something on which EVERY expert agrees. But you fail to
                            >>understand.
                            >
                            >
                            Not EVERY export. Some agree, some don't..
                            >
                            OK, every RECOGNIZED expert. That does not include the "experts" trolls
                            like you recognize. Nor anyone who posts an essay or blog on the web.
                            >
                            >>And the same thing with Craig Larman's article. He agrees that
                            >>encapsulati on is good because it hides the design details. No one ever
                            >>claimed it hid information.
                            >>
                            >>Wrong on both counts, Tony the Troll. Learn to read.
                            >
                            >
                            "Encapsulat ion" is not supposed to mean "data encapsulation". It is supposed
                            to hide the implemetation (code), not the information (data).
                            >
                            Encapsulation includes bot DATA AND CODE. How information is stored is
                            part of the implementation, also. But that's what you can't get through
                            your thick skull.

                            Maybe if you stood up and took a load off of your brain you could think
                            more clearly. I'd suggest you take a shit but I'm afraid you'd loose
                            what ever brains you might have.
                            >
                            >>>>This is in perfect agreement with Booch, Rumbaugh, Iverson and others.
                            >>>>And a direct CONTRADICTION to troll Tony Marston.
                            >>>>
                            >>>>
                            >>>>
                            >>>>>>>>It's not worth getting into the argument. He's just a troll with
                            >>>>>>>>delusio ns of competency.
                            >>>>>>>
                            >>>>>>>
                            >>>>>>>If everyone who disagrees with you is incompetent then the world is
                            >>>>>>>full of idiots. Your opinion is not the only opinion, and there are
                            >>>>>>>plenty of "experts" who have opposing views.
                            >>>>>>>
                            >>>>>>
                            >>>>>>No, I disagree with a lot of competent people. It's YOU who are an
                            >>>>>>incompete nt troll. And you continue to prove it.
                            >
                            >
                            I see. I agree with some of the people that you disagree with, yet that
                            makes me a troll.
                            >
                            No, you're a troll because you come into a tread and start arguing your
                            case. You refuse to read industry-recognized experts, but quote blogs
                            by people who agree with you.

                            And even when you post a page of someone who agrees with me and I point
                            it out, you refute it and change the subject - finding another unknown
                            "expert" to support your claim.

                            Also, I challenge you to find even ONE college level OO course in the
                            U.S. which agrees with you. I bet you can't. So I guess all those
                            professors are wrong, also.

                            You are a troll because you have absolutely no idea of which you talk.
                            You have no real experience outside of your little bubble, yet claim you
                            are an expert. You would never last in a corporate programming
                            environment - or any other serious programming group.

                            IOW, you're a total idiot, and proving it every day.
                            >
                            >>>>>>Try these - with direct quotes from recognized experts, and examples:
                            >>>>>>
                            >>>>>>http://www.research.umbc.edu/~tarr/d...ciples-2pp.pdf
                            >>>>>>http://www.nnwj.de/encapsulation.html
                            >>>>>>
                            >>>>>>Or better yet, read the real books by these authors.
                            >>>>>>
                            >>>>>>But I know you won't, because you disagree with what they say, and
                            >>>>>>don't want to burst your little bubble.
                            >>>>>>
                            >>>>>>Troll.
                            >>>>>
                            >>>>>
                            >>>>>Whether you like it or not there is no such thing as a single opinion as
                            >>>>>to what OOP is and is not, and there are multiple interpretations as to
                            >>>>>the real meaning of encapsulation, inheritance, polymorphism,
                            >>>>>implementa tion hiding and information hiding. Just because you quote
                            >>>>>sources who agree with you does not mean you are right and everybody
                            >>>>>else is wrong. Here are sources with the opinion that "Encapsulat ion is
                            >>>>>NOT information hiding":
                            >>>>>
                            >>>>>http://homepage.mac.com/keithray/blog/2006/02/22/
                            >>>>>http://martinfowler.com/bliki/GetterEradicator.html
                            >>>>>http://www.javaworld.com/javaworld/j...on.html?page=1
                            >>>>>http://www.itmweb.com/essay550.htm
                            >>>>>http://nat.truemesh.com/archives/000498.html
                            >>>>>
                            >>>>>The world is full of different opinions, so who is to say which ones are
                            >>>>>right and which ones are wrong?
                            >>>>>
                            >>>>
                            >>>>Yea, and some, like yours, troll, are just wrong.
                            >>>
                            >>>
                            >>>In your opinion they are wrong, but I do not value your opinion.
                            >>>
                            >>
                            >>I really don't give a flying fuck if you or any other troll values my
                            >>opinion, Tony. Your idiocy is beyond comprehension.
                            >>
                            >>>>Read the experts I've mentioned several times. You might actually learn
                            >>>>something .
                            >>>>
                            >>>>But I know you won't. Like all trolls you know everything and anyone who
                            >>>>disagrees with you is wrong - no matter how much of a recognized expert
                            >>>>he is.
                            >>>
                            >>>
                            >>>All the "experts" in the world do not agree. "My" experts disagree with
                            >>>"your" experts. Just because I, and many others, disagree with your
                            >>>opinion does not make me/us wrong.
                            >>>
                            >>
                            >>Where did your "experts" get their training? The great Tony Martson
                            >>School of Bullshit?
                            >>
                            >>These are experts recognized by the INDUSTRY - not me, not Tony Marston.
                            >>They are recognized by top programmers, university professors, industry
                            >>groups, publishers and more.
                            >>
                            >>And quite frankly, troll Tony Marston's opinion on who an expert is isn't
                            >>important.
                            >
                            >
                            Neither is yours.
                            >
                            No, but my opinion is supported by Jacobson, Booch and Rumbaugh, among
                            other industry-recognized experts. Yours is only supported by bloggers
                            who, like you, are trying in vain to get noticed in this world.

                            And you won't even read the industry experts. Your mantra is:

                            "I've made up my mind. Don't confuse me with the facts".

                            >
                            >>>>Go and crawl back into your hole, troll. And take your delusions of
                            >>>>competenc e with you.
                            >>>
                            >>>
                            >>>Typical reaction of a moron. When you start losing the argument out come
                            >>>the insults.
                            >>>
                            >>
                            >>Yep, you've labeled yourself for sure. I am not "losing the argument".
                            >>Rather, you are just too thick-headed and stubborn to listen to the real
                            >>experts in the field.
                            >
                            >
                            As I keep on saying, there is no such thing as one set of experts with whom
                            EVERYBODY agrees, just as there is no such thing as one programming style
                            with which EVEYBODY agrees.In every walk of life there are different
                            opinions, and all I am doing is expressing an opinion which isdifferent from
                            yours.
                            >
                            >
                            >>You've done a little programming in one (or maybe even two) languages.
                            >
                            >
                            I have done a lot of programming in many languages.
                            >
                            ROFLMAO! Basic? Javascript?
                            >
                            >>You think reading some of the crap on the Internet makes you an expert in
                            >>the matter.
                            >
                            >
                            Just as the crap you read makes you an expert.
                            >
                            Yea, Booch, Jacobson and Rumbaugh are "crap". That shows just how much
                            of a stupid troll you are, Tony.
                            >
                            >>Let me clue you in, Tony. You are far from an expert in anything. A web
                            >>site with some copied (and incorrect)
                            >
                            >
                            It is only your opinion that it is incorect. Other people do not think so.
                            >
                            It's the opinion of a lot of people on this newsgroup, Tony. You've
                            made a complete ass of yourself too many times.
                            >
                            >>information does not make you an expert. Posting your bullshit in this
                            >>and other newsgroups does not make you an expert.
                            >
                            >
                            Posting your bullsh*t does not make you an expert either.
                            >
                            The difference is my "bullshit" is supported by industry-recognized
                            techniques. Yours is only supported by unknown people who are trying to
                            get their names out.
                            >
                            >And quoting people no one ever heard of does not make you an expert.
                            >
                            >
                            Just because you haven't heard of them does no mean that they do not exist,
                            nor hat their opinions are worthless.
                            >
                            And it also doesn't mean they have any credibility. As a reference,
                            their opinions are worthless.
                            >
                            >>Try working on an OO project with 100 programmers. Learn how to do
                            >>proper OO.
                            >
                            >
                            I once worked on a project with a team of so-called OO "experts", and it was
                            the worst technical disaster of my entire career. They were so full of their
                            fancy ideas they coud not tell which way was up. They were so incompetent
                            they could not find their own backsides in the dark if you let them use both
                            hands and gave them a map and compass.
                            >
                            Right. And the great Tony Marston was the only competent programmer
                            there. Are you familiar with the term "megalomani ac"? Looks like we
                            need to add that to your description, also.
                            >
                            >Then spend another 5-10 years or so working your way up in the OOAD
                            >>field, until you're managing projects like the one above. Then your
                            >>opinions might count. I've done all of that over the years.
                            >>
                            >>Or even read the books I mentioned by those authors.
                            >>
                            >>But I know you won't. Like all trolls, you're just plain stupid, and are
                            >>totally afraid the bullshit you've been espousing might be wrong.
                            >>
                            >>Go away, troll.
                            >
                            >
                            No, I won't. I will keep contradicting your opinions until hell freezes over
                            for the simple reason that I, and others, do not agree with your opinions.
                            >
                            And you'll keep making a complete ass of yourself, Tony. Almost
                            everyone here is laughing at you and your pitiful attempts to show how
                            little you know.

                            --
                            =============== ===
                            Remove the "x" from my email address
                            Jerry Stuckle
                            JDS Computer Training Corp.
                            jstucklex@attgl obal.net
                            =============== ===

                            Comment

                            • Jerry Stuckle

                              #44
                              Re: php 5 classes: public, protected and private

                              Tony Marston wrote:
                              "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                              news:kv-dnVmk7pteu-3YnZ2dnUVZ_sedn Z2d@comcast.com ...
                              >
                              >>Tony Marston wrote:
                              >>
                              >>>"Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
                              >>>news:DuWdndx Br5xeRfPYnZ2dnU VZ_vidnZ2d@comc ast.com...
                              >>>< snip>
                              >>>
                              >>>>>>>>The PHP interface defines a set of methods (function) which are
                              >>>>>>>>require d by the classes which implement the interface. Java is
                              >>>>>>>>simil ar in that respect. But both are a subset of the total
                              >>>>>>>>interfa ce.
                              >>>>>>>
                              >>>>>>>
                              >>>>>>>It is possible to access the method directly without an interface,
                              >>>>>>>therefor e an interfae is not necessary.
                              >>>>>>>
                              >>>>>>
                              >>>>>>"Possible " != "CORRECT"
                              >>>>>
                              >>>>>
                              >>>>>That's just your opinion. Where does it say that I *MUST* define and use
                              >>>>>an interface before I can access a class method? Interfaces are optional
                              >>>>>(especuial ly in PHP) so it is not wrong to excercise the option NOT to
                              >>>>>use them. I can define a class method and access that method without
                              >>>>>using an interface, and that is what I choose to do.
                              >>>>>
                              >>>>
                              >>>>When are you going to get it through that pea-sized mind of yours that a
                              >>>>PHP interface is not the same as an interface as defined in OO terms?
                              >>>>
                              >>>>In OO terms, a public method is part of the interface. The PHP keyword
                              >>>>interface just defines a set of functions which must be implemented by
                              >>>>the class.
                              >>>>
                              >>>>They are two entirely different things.
                              >>>
                              >>>
                              >>>The fact that a method and an interface are different things is
                              >>>irrelevant . I am just pointing out that in PHP an interface is not
                              >>>necessary as I can access the method directly without going through an
                              >>>interface. Is this statement true or false?
                              >>>
                              >>
                              >>No, the fact that they are different are VERY RELEVANT. The fact you
                              >>can't understand the difference is also VERY RELEVANT. Or is it just that
                              >>you disregard facts which don't support with your stupidness?
                              >>
                              >>Losing the argument so you need to disregard the facts? Typical troll
                              >>behavior.
                              >>
                              >>Whether or not a PHP interface is required is immaterial - we are talking
                              >>about the OO concept of an interface, not PHP interfaces.
                              >>
                              >>But that's way too deep for you to understand - the same word having
                              >>different meanings in different contexts? Hope your head didn't explode.
                              >
                              >
                              This is a PHP newsgroup, so I am explaining how interfaces work within PHP.
                              It is a simple fact that interfaces ARE NOT NECESSARY in PHP. The fact that
                              interfaces are treated differently in other languages is totally irrelevant.
                              The fact that YOU think that interfaces in PHP should behave exactly the
                              same as in other languages is also irrelevant.
                              >
                              The subject of interfaces came up in the OO context, not a PHP interface.

                              However, you're too stupid to understand there's a difference between
                              the two. So you keep trying to change the subject then justifying your
                              change - just like any troll.

                              --
                              =============== ===
                              Remove the "x" from my email address
                              Jerry Stuckle
                              JDS Computer Training Corp.
                              jstucklex@attgl obal.net
                              =============== ===

                              Comment

                              • Curtis

                                #45
                                Re: php 5 classes: public, protected and private

                                That's just your opinion. Where does it say that I *MUST* define and use an
                                interface before I can access a class method? Interfaces are optional
                                (especuially in PHP) so it is not wrong to excercise the option NOT to use
                                them. I can define a class method and access that method without using an
                                interface, and that is what I choose to do.
                                No one is saying that you have to use interfaces. The point is that it
                                is there to help in organizing and creating classes, the same goes for
                                visibility keywords. Just because you don't have to use these, doesn't
                                mean that you should not use them.

                                I can see an advantage in using interfaces and/or visibility keywords
                                in PHP, if one is creating a large library, or to help communications
                                between a team of developers. These features can help track down where
                                a problem is if something isn't working right, or just for clarifying
                                the particular usage for the class or its members.

                                BTW, I do not believe there is any controversy over what encapsulation
                                is; if so, I haven't heard about it.

                                Comment

                                Working...