Object Oriented PHP vs Java

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

    #31
    Re: Object Oriented PHP vs Java


    "Agelmar" <ifetteNOSPAM@c omcast.net> wrote in message news:bun77t$k8f 2g$1@ID-30799.news.uni-berlin.de...[color=blue]
    > Bruno Desthuilliers wrote:[color=green]
    > > Savut wrote:[color=darkred]
    > >> "Jerry" <weinstei@nova. edu> wrote in message
    > >> news:69fca47c.0 401211031.539ef 63f@posting.goo gle.com...
    > >>
    > >>> What are the advantages and disadvantages of using Object Oriented
    > >>> PHP vs Java?
    > >>
    > >> >> PHP is not fully OO, even the PHP5... but Java is OO
    > >>>[/color]
    > >
    > > As there is *no* commonly accepted definition of OO, I just dont
    > > understand how you can claim such a thing.
    > >
    > > BTW, Smalltalkers could tell you why Java is not OO !-)[/color]
    >
    > Actually, there is a commonly accepted definition...
    > OO implies:
    > polymorphism, encapsulation, and inheritance.
    >
    >[/color]


    Not to beat a dead horse (or a live one for that matter) but WHAT IS OOP?

    Object Oriented Programming

    That is what it is. Everything else is just fluff. You can design and program OOP with just about any language - even BASIC. It's
    all in your design and discipline.

    If you never publish a class do you need to have public/private parts to it? No. Would a comment be suffice? i.e.

    class example
    {
    //Private
    var m_dontUse
    var m_dangerousToUs e
    var m_topSecret

    //Public
    var m_safeToUse
    var m_okayToUse
    var m_useMe
    }

    This works fine if you trust your programmers and they are disciplined enough to only use what they are "allowed" to use.

    What if you release a library - if the documentation only lists the pubic members then why isn't that suffice - again if you trust
    the programmers.

    The point is that there is a disconnect between OOPL and OOP/OOD. Do you REALLY need C++ to do OO when you have C?

    Let's not forget that C++ compilers used to be PRE-processors - they generated C code.

    There is no doubt that OOPL are more convenient to use (though I was criticized in an earlier OT message for suggesting a language
    construct just for convenience) the point is that OOP is about the paradigm of building your code based on real-world objects. It
    has nothing to do with whether a language allows you to do some neat trickery.


    -CF



    Comment

    • ChronoFish

      #32
      Re: Object Oriented PHP vs Java


      "Amir Khawaja" <amir@gorebels. net> wrote in message news:3eHPb.5660 7$zs4.20188@fed 1read01...[color=blue]
      > Jerry wrote:
      >[color=green]
      > > What are the advantages and disadvantages of using Object Oriented
      > > PHP vs Java?[/color]
      >
      > If you've ever had training in software development, then you would not
      > be asking this question.
      >[/color]

      That was one of the most egotistical and condescending answers I have read on this news group yet. Exactly how does that help anyone
      here or in the future. If you didn't like the question - don't answer it.

      I would also argue that by judging the number conversations and posts that have resulted in this question, that we need more like
      it.

      -CF


      Comment

      • ChronoFish

        #33
        Re: Object Oriented PHP vs Java


        "Erwin Moller" <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in message
        news:400feca6$0 $318$e4fe514c@n ews.xs4all.nl.. .[color=blue]
        > Lothar Scholz wrote:
        >[color=green]
        > > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
        > > news:<buobb9$jt t$1$8300dec7@ne ws.demon.co.uk> ...[color=darkred]
        > >>
        > >> No because they were to lazy to provide a good multiple inheritance[/color]
        > > implementation like eiffel has. Java is a hacked language and not
        > > technically a good one - no matter how many people use it.[/color]
        >
        > Lothar,
        >
        > Do you actually use Java?
        > Are you an experienced Javaprogrammer?
        > I ask this because you would be the first person I meet who actually uses
        > Java, understand the language, AND doesn't like it.
        >
        > I heard people complain a lot on a lot of languages, often with good
        > arguments, but the only complaint about Java I heard is a steep
        > learningcurve in the beginning.
        > Most complaint about Java from programmers comes from C++ programmers, who
        > miss their precious functionpointer s.
        >[/color]


        Well here's one who has experience with Java and still doesn't like it. You were half right though - I am a C++ programmer, but it
        has nothing to do with function pointers.

        I don't like it because I feel like it's a encapsulation gone bad:

        some.simple.fun ctions.requires .knowing.too.ma ny.classes.just .to.print("hi") ;

        Further more there is way to much involved for deployment - though I admit that those issues have more to with JSP/Tomcat than Java
        itself.

        I certainly wouldn't call it a "hack" but the learning curve is steep and I just could never get comfortable with it. From a
        business perspective I would immediately put it on the bottom of my list in language selection. Training is costly, maintenance is
        costly, configuration is costly. And what does it buy you? A very solid system that is platform independent - if it is ever
        finished.

        The reason why I like PHP so much is that it just seems to work. My mind flows right along with it. Again from a business
        perspective it means rapid development. You get near-platform independence. It's cheap to learn, it's cheap to deploy, and it's
        cheap to maintain. Oh, and just to stay on topic, it's OO!

        -CF


        Comment

        • Daniel Tryba

          #34
          Re: Object Oriented PHP vs Java

          Savut <webki@hotmail. com> wrote:[color=blue]
          > Javascript is not at all OO because there is no concept of private and
          > public variable method, metamorphis and object inherence. You guys are real
          > newbs in programming to say so. When I said Java I mean Java like JSP not
          > Javascript.[/color]
          [snipped 35 lines: please don't TOFU]

          So java is not entirly OO either? Afterall with reflection one can
          manipulate private/protected members from anywhere (depending on the
          securitymanager ).

          --

          Daniel Tryba

          Comment

          • Dave Benjamin

            #35
            Re: Object Oriented PHP vs Java

            In article <buob8d$s1r$1$8 302bc10@news.de mon.co.uk>, Tony Marston wrote:[color=blue]
            >
            > "Dave Benjamin" <ramen@lackingt alent.com> wrote in message
            > news:slrnc0v21b .pop.ramen@lack ingtalent.com.. .[color=green]
            >> In article <bun77t$k8f2g$1 @ID-30799.news.uni-berlin.de>, Agelmar wrote:[color=darkred]
            >> > Bruno Desthuilliers wrote:
            >> >> Savut wrote:
            >> >>> "Jerry" <weinstei@nova. edu> wrote in message
            >> >>> news:69fca47c.0 401211031.539ef 63f@posting.goo gle.com...
            >> >>>[/color][/color]
            >
            ><snip>
            >[color=green]
            >> But there's one thing for sure: OO == good. So, start with "good" and
            >> extrapolate "OO". It's much easier. =)[/color]
            >
            > I disagree entirely. You are implying that if it is OO then it must be good,
            > and if it is not OO then it must be bad.[/color]

            Good. I was being sarcastic. ;)

            --
            ..:[ dave benjamin (rameny sp00) -:- spoomusic.com -:- ramenfest.com ]:.
            : d r i n k i n g l i f e o u t o f t h e c o n t a i n e r :

            Comment

            • R. Rajesh Jeba Anbiah

              #36
              Re: Object Oriented PHP vs Java

              Erwin Moller <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in message news:<400ff083$ 0$318$e4fe514c@ news.xs4all.nl> ...[color=blue]
              > Amir Khawaja wrote:
              >[color=green]
              > > Jerry wrote:
              > >[color=darkred]
              > >> What are the advantages and disadvantages of using Object Oriented
              > >> PHP vs Java?[/color]
              > >
              > > If you've ever had training in software development, then you would not
              > > be asking this question.
              > >
              > >[/color]
              >
              > Amir,
              >
              > Judging by the number of interesting posts in this thread, I think things
              > might be a bit more complicated.
              >
              > I like this discussion a lot, because I use both languages and like them
              > both.[/color]

              I think, Amir is right to some extent. It is really irritating if
              *programmers* ask what is best among the two *without* actually trying
              them. It is also real unfortunate to see people _pushing_ their own
              ideas by quoting their years of experience to win the discussion. It
              is also sad thing to see, such trolls are often encouraged in this
              c.l.p which is not common among other groups say c.l.c or c.l.j

              Personally I liked the discussion 'coz I tried both of them as
              you. But, IMHO, it is wrong to ecourage such never tried people's
              query.

              p.s.: This is *no* rant; this is just my personal opinion. Obviously,
              YMMV

              --
              "We live to die; We die to live"
              Email: rrjanbiah-at-Y!com

              Comment

              • Amir Khawaja

                #37
                Re: Object Oriented PHP vs Java

                ChronoFish wrote:[color=blue]
                > "Amir Khawaja" <amir@gorebels. net> wrote in message news:3eHPb.5660 7$zs4.20188@fed 1read01...
                >[color=green]
                >>Jerry wrote:
                >>
                >>[color=darkred]
                >>>What are the advantages and disadvantages of using Object Oriented
                >>>PHP vs Java?[/color]
                >>
                >>If you've ever had training in software development, then you would not
                >>be asking this question.
                >>[/color]
                >
                >
                > That was one of the most egotistical and condescending answers I have read on this news group yet. Exactly how does that help anyone
                > here or in the future. If you didn't like the question - don't answer it.
                >
                > I would also argue that by judging the number conversations and posts that have resulted in this question, that we need more like
                > it.
                >
                > -CF
                >
                >[/color]

                ChronoFish,

                Yes, admittedly, that response is a little condescending. However, it
                was made to point out to the original author that the question is
                severely flawed. It was not meant to be mean spirited in any way or
                form. I decided to be blunt as opposed to be politically correct.

                --
                Amir Khawaja.

                ----------------------------------
                Rules are written for those who lack the ability to truly reason, But
                for those who can, the rules become nothing more than guidelines, And
                live their lives governed not by rules but by reason.
                - James McGuigan

                Comment

                • Amir Khawaja

                  #38
                  Re: Object Oriented PHP vs Java

                  Erwin Moller wrote:
                  [color=blue]
                  > Amir Khawaja wrote:
                  >
                  >[color=green]
                  >>Jerry wrote:
                  >>
                  >>[color=darkred]
                  >>>What are the advantages and disadvantages of using Object Oriented
                  >>>PHP vs Java?[/color]
                  >>
                  >>If you've ever had training in software development, then you would not
                  >>be asking this question.
                  >>
                  >>[/color]
                  >
                  >
                  > Amir,
                  >
                  > Judging by the number of interesting posts in this thread, I think things
                  > might be a bit more complicated.
                  >
                  > I like this discussion a lot, because I use both languages and like them
                  > both.
                  >
                  > I also find your posting a bit out-of-sync with your (excellent) signature:
                  > "Rules are written for those who lack the ability to truly reason, But
                  > for those who can, the rules become nothing more than guidelines, And
                  > live their lives governed not by rules but by reason."
                  >
                  > Regards,
                  > Erwin Moller[/color]

                  Erwin,

                  Indeed it is out of sync. It was intentional. Please see my response to
                  ChronoFish's post.

                  --
                  Amir Khawaja.

                  ----------------------------------
                  Rules are written for those who lack the ability to truly reason, But
                  for those who can, the rules become nothing more than guidelines, And
                  live their lives governed not by rules but by reason.
                  - James McGuigan

                  Comment

                  • Amir Khawaja

                    #39
                    Re: Object Oriented PHP vs Java

                    Bruno Desthuilliers wrote:
                    [color=blue]
                    > Amir Khawaja wrote:
                    >[color=green]
                    >> Jerry wrote:
                    >>[color=darkred]
                    >>> What are the advantages and disadvantages of using Object Oriented
                    >>> PHP vs Java?[/color]
                    >>
                    >>
                    >>
                    >> If you've ever had training in software development, then you would
                    >> not be asking this question.
                    >>[/color]
                    > A very useful answer. Thanks for your contribution.
                    >[/color]

                    You're welcome :P

                    --
                    Amir Khawaja.

                    ----------------------------------
                    Rules are written for those who lack the ability to truly reason, But
                    for those who can, the rules become nothing more than guidelines, And
                    live their lives governed not by rules but by reason.
                    - James McGuigan

                    Comment

                    • yet another michael

                      #40
                      Re: Object Oriented PHP vs Java

                      it was over a year ago but i seem to remember php objects could get
                      messy when applying functions to groups of them where javas containers
                      have been fairly cute for two or three years - its just time as things
                      are added - but when java first grew it was all about the buzz - and
                      it seems php has definitely got it now - so bring on the future for
                      the pair

                      Comment

                      • André Næss

                        #41
                        Re: Object Oriented PHP vs Java

                        Jerry:
                        [color=blue]
                        > What are the advantages and disadvantages of using Object Oriented
                        > PHP vs Java?[/color]

                        After years of argument and fighting it should be fairly evident that there
                        is no clear definition of what OO really is. However, the invention of "OO"
                        brought several nice features into the world of programming, what features
                        you decide to use is really up to you and the problem at hand. Also,
                        different languages have chosen different sets of features, and of course
                        the developers of the different languages are going to fight over what
                        features are the most OO. But in the end, nobody knows what OO is because
                        there exists no clear definition as for example the definition of the
                        relational model.

                        If you're going to use a language you must use the language to the max. If
                        you choose PHP you shouldn't confine yourself to using only the "OO"
                        features of PHP, that would be insane, in Java you're forced to do that,
                        you're forced to use one style of programming. So why compare the OO
                        features of PHP vs. Java? What you should do is look at what you want to
                        achieve, and decide which of PHP or Java seems more approriate.

                        A language should be chosen because it fits the problem at hand. I think
                        most programming tasks today can be solved with languages like PHP, Perl,
                        Python and Ruby rather than the low-level dinosaurs like C++ and Java,
                        which one you choose should be dictated by past experience as well as the
                        task at hand, these are after all languages with different strengths and
                        weaknesses. I believe generality always comes at a price, sure C++ can be
                        used for everything, but PHP is much faster to use when all you want is to
                        generate a few simple webpages.

                        I think we will see more and more of this. Programming languages should be
                        viewed as tools, and while it is probably possible to solve every problem
                        with the same tool, it makes much more sense to choose specialized tools
                        that makes solving the problem easier.

                        I also think it's a good thing to keep learning new languages even if you
                        don't need to, it opens your eyes to different ways of doing things, and
                        the more techniques you know the more aptly you can operate as a craftsman.
                        Whenever you are faced with a novel problem you have a much vaster body of
                        knowledge to draw from. If you're stuck with one language and the
                        aforementioned problem can't be solved with any of the well known idioms of
                        your pet language you might be stuck. If you know more languages you might
                        just know that this sort of problem is frequently tackled by language X.

                        André Næss

                        Comment

                        • Tim Tyler

                          #42
                          Re: Object Oriented PHP vs Java

                          Erwin Moller <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote or quoted:[color=blue]
                          > Lothar Scholz wrote:[color=green]
                          > > "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message[/color][/color]
                          [color=blue][color=green][color=darkred]
                          > >> Which is precisely why it was left out of Java, and also left out of PHP
                          > >> 5.[/color]
                          > >
                          > > No because they were to lazy to provide a good multiple inheritance
                          > > implementation like eiffel has. Java is a hacked language and not
                          > > technically a good one - no matter how many people use it.[/color]
                          >
                          > Lothar,
                          >
                          > Do you actually use Java?
                          > Are you an experienced Javaprogrammer?
                          > I ask this because you would be the first person I meet who actually uses
                          > Java, understand the language, AND doesn't like it.[/color]

                          Get out more.

                          Java has a fudged primitive type system, lacks named function
                          arguments, enumerations, doesn't have generic types yet, is
                          proprietary Sun microsystems technology - and is full of fudges.

                          It's better than C++, Javascript and PHP - but that's not saying much.
                          --
                          __________
                          |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                          Comment

                          • bdjw

                            #43
                            Re: Object Oriented PHP vs Java

                            Your duplicitous nature leads me to believe
                            you are always seeking to put someone down
                            for something or else you are a control freak.

                            You say that response is 'a little' condescending.

                            How is it that this single question has generated
                            so MUCH healthy response?

                            How then could the question be 'severely flawed'
                            as you bluntly write.

                            In this case, if you have any face left (covered with
                            egg by now) you should retract your arrogrance.

                            Do you have the guts to do it?

                            The author


                            "Amir Khawaja" <amir@gorebels. net> wrote in message
                            news:B73Qb.4350 2$Ar1.5202@fed1 read04...[color=blue]
                            > ChronoFish wrote:[color=green]
                            > > "Amir Khawaja" <amir@gorebels. net> wrote in message[/color][/color]
                            news:3eHPb.5660 7$zs4.20188@fed 1read01...[color=blue][color=green]
                            > >[color=darkred]
                            > >>Jerry wrote:
                            > >>
                            > >>
                            > >>>What are the advantages and disadvantages of using Object Oriented
                            > >>>PHP vs Java?
                            > >>
                            > >>If you've ever had training in software development, then you would not
                            > >>be asking this question.
                            > >>[/color]
                            > >
                            > >
                            > > That was one of the most egotistical and condescending answers I have[/color][/color]
                            read on this news group yet. Exactly how does that help anyone[color=blue][color=green]
                            > > here or in the future. If you didn't like the question - don't answer[/color][/color]
                            it.[color=blue][color=green]
                            > >
                            > > I would also argue that by judging the number conversations and posts[/color][/color]
                            that have resulted in this question, that we need more like[color=blue][color=green]
                            > > it.
                            > >
                            > > -CF
                            > >
                            > >[/color]
                            >
                            > ChronoFish,
                            >
                            > Yes, admittedly, that response is a little condescending. However, it
                            > was made to point out to the original author that the question is
                            > severely flawed. It was not meant to be mean spirited in any way or
                            > form. I decided to be blunt as opposed to be politically correct.
                            >
                            > --
                            > Amir Khawaja.
                            >
                            > ----------------------------------
                            > Rules are written for those who lack the ability to truly reason, But
                            > for those who can, the rules become nothing more than guidelines, And
                            > live their lives governed not by rules but by reason.
                            > - James McGuigan[/color]


                            Comment

                            • bdjw

                              #44
                              Re: Object Oriented PHP vs Java

                              Where did all the assumption arise that
                              the author has 'never tried programming'

                              This is complete arrogrance on your part.

                              Needless to say, in the community of programmers,
                              there is arrogance just as there in every other
                              walk of life....


                              "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
                              news:abc4d8b8.0 401222156.60ccf 8e2@posting.goo gle.com...[color=blue]
                              > Erwin Moller[/color]
                              <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in
                              message news:<400ff083$ 0$318$e4fe514c@ news.xs4all.nl> ...[color=blue][color=green]
                              > > Amir Khawaja wrote:
                              > >[color=darkred]
                              > > > Jerry wrote:
                              > > >
                              > > >> What are the advantages and disadvantages of using Object Oriented
                              > > >> PHP vs Java?
                              > > >
                              > > > If you've ever had training in software development, then you would[/color][/color][/color]
                              not[color=blue][color=green][color=darkred]
                              > > > be asking this question.
                              > > >
                              > > >[/color]
                              > >
                              > > Amir,
                              > >
                              > > Judging by the number of interesting posts in this thread, I think[/color][/color]
                              things[color=blue][color=green]
                              > > might be a bit more complicated.
                              > >
                              > > I like this discussion a lot, because I use both languages and like them
                              > > both.[/color]
                              >
                              > I think, Amir is right to some extent. It is really irritating if
                              > *programmers* ask what is best among the two *without* actually trying
                              > them. It is also real unfortunate to see people _pushing_ their own
                              > ideas by quoting their years of experience to win the discussion. It
                              > is also sad thing to see, such trolls are often encouraged in this
                              > c.l.p which is not common among other groups say c.l.c or c.l.j
                              >
                              > Personally I liked the discussion 'coz I tried both of them as
                              > you. But, IMHO, it is wrong to ecourage such never tried people's
                              > query.
                              >
                              > p.s.: This is *no* rant; this is just my personal opinion. Obviously,
                              > YMMV
                              >
                              > --
                              > "We live to die; We die to live"
                              > Email: rrjanbiah-at-Y!com[/color]


                              Comment

                              • bdjw

                                #45
                                Re: Object Oriented PHP vs Java

                                Would you like to see some of my software development? Or is that a
                                question from
                                someone who has no training in such a discipline?

                                Did you start Sun Microsystems of something?


                                "Amir Khawaja" <amir@gorebels. net> wrote in message
                                news:3eHPb.5660 7$zs4.20188@fed 1read01...[color=blue]
                                > Jerry wrote:
                                >[color=green]
                                > > What are the advantages and disadvantages of using Object Oriented
                                > > PHP vs Java?[/color]
                                >
                                > If you've ever had training in software development, then you would not
                                > be asking this question.
                                >
                                >
                                > --
                                > Amir Khawaja.
                                >
                                > ----------------------------------
                                > Rules are written for those who lack the ability to truly reason, But
                                > for those who can, the rules become nothing more than guidelines, And
                                > live their lives governed not by rules but by reason.
                                > - James McGuigan[/color]


                                Comment

                                Working...