PHP vs. Java

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

    PHP vs. Java

    I'm not a Perl programmer nor a Linux adherent. What are the advantages of
    LAMP vs.the Java model for building data-driven websites? I do a fair amount
    of
    development using Tomcat/JSP/Servlets with Struts for clients. I see more
    and more ads for
    LAMP/PHP developers. What are the advantages and tradeoffs? All opinions
    welcomed....




  • RG

    #2
    Re: PHP vs. Java


    "bb" <bill.blackmon@ verizon.net> wrote in message
    news:9dqOa.223$ 78.172@nwrdny03 .gnilink.net...[color=blue]
    > I'm not a Perl programmer nor a Linux adherent. What are the advantages of
    > LAMP vs.the Java model for building data-driven websites? I do a fair[/color]
    amount[color=blue]
    > of
    > development using Tomcat/JSP/Servlets with Struts for clients. I see more
    > and more ads for
    > LAMP/PHP developers. What are the advantages and tradeoffs? All opinions
    > welcomed....
    >
    >
    >
    >[/color]

    PHP is easier to learn, it actually reads like english.
    Nearly all Linux servers are offering PHP and MySQL which means cheaper
    prices for shared space.
    This is of course my biased opinion because I have never even looked into
    servlets.
    RG


    Comment

    • Metnetsky

      #3
      Re: PHP vs. Java

      > Struts and similar systems are purported to separate the tasks of[color=blue]
      > programming and designing web pages. I really don't think such
      > separation can ever be complete. I think you come up with better UI if
      > you don't try to create such separation. The UI should be a natural
      > extension of what the user does with the data.[/color]

      And that's why using a MVC(2) system is best. Because you can keep the
      same back-end, and use it with different front-ends. The coding can be
      complete. We have a completely separated system and it's completely
      written in PHP making use of our own Struts-Like application, Smarty, and
      many of the PEAR modules. Read up on Struts and MVC(2) systems, you'll
      see the light. Putting your logic and control inside of a page that
      contains HTML is horrible to pick up and understand. At the very least
      the separation makes things easier.

      ~ Metnetsky

      Comment

      • Metnetsky

        #4
        Re: PHP vs. Java

        On Tue, 08 Jul 2003 12:46:44 -0700, RG wrote:
        [color=blue]
        >
        > "bb" <bill.blackmon@ verizon.net> wrote in message
        > news:9dqOa.223$ 78.172@nwrdny03 .gnilink.net...[color=green]
        >> I'm not a Perl programmer nor a Linux adherent. What are the advantages of
        >> LAMP vs.the Java model for building data-driven websites? I do a fair[/color]
        > amount[color=green]
        >> of
        >> development using Tomcat/JSP/Servlets with Struts for clients. I see more
        >> and more ads for
        >> LAMP/PHP developers. What are the advantages and tradeoffs? All opinions
        >> welcomed....
        >>
        >>
        >>
        >>[/color]
        >
        > PHP is easier to learn, it actually reads like english.
        > Nearly all Linux servers are offering PHP and MySQL which means cheaper
        > prices for shared space.
        > This is of course my biased opinion because I have never even looked into
        > servlets.
        > RG[/color]

        PHP is generally easier. But with PHP5 it's going to become the
        Java-Scripting-Language as it's a near replicate minus variable types. I
        love PHP and I love Java. Each have their points. Generally PHP can
        handle everything from small to mid-size without a problem. It can even
        handle some huge sites (at work we're developing a massive community based
        system in pure PHP - but we're knocking on the walls pretty hard). For
        high-end systems I would suggest Java. It REQUIRES that you truly think
        throw your entire systems model and forces you to have everything in place
        before you begin and realize you're screwed. Most PHP applications are
        hacks, for better or worse (depends on who you ask). And if you ask most
        the PHP's creators they'll tell you that PHP should just control template
        logic and all control/model patterns should be written as PHP modules in
        C. My point is simply this, everyone has an opinion and they're all right
        and wrong.

        Personally I like the design patterns that most Java applications make use
        of. That just happens to be my cup of coffee. But if you like coding
        directly in the pages, use PHP, it's far easier than pure JSP.

        Comment

        • Bruce Lewis

          #5
          Re: PHP vs. Java

          "Metnetsky" <mimetnet@syr.e du> writes:
          [color=blue][color=green]
          > > The UI should be a natural
          > > extension of what the user does with the data.[/color]
          >
          > And that's why using a MVC(2) system is best.[/color]

          With a feature-complete databse like PostgreSQL, all business logic can
          be at the database level. The database is the back end. Put as many
          light-weight front ends on as you wish. The only logic that needs to be
          embedded in web pages is UI logic.

          --
          "Notwithstandin g fervent argument that patent protection is essential
          for the growth of the software industry, commentators have noted
          that `this industry is growing by leaps and bounds without it.'"
          -- US Supreme Court Justice John Paul Stevens, March 3, 1981.
          I rarely read mail sent to brlspam@yahoo.c om

          Comment

          • Nikolai Chuvakhin

            #6
            Re: PHP vs. Java

            "bb" <bill.blackmon@ verizon.net> wrote
            in message news:<9dqOa.223 $78.172@nwrdny0 3.gnilink.net>. ..[color=blue]
            >
            > I'm not a Perl programmer nor a Linux adherent. What are
            > the advantages of LAMP vs.the Java model for building
            > data-driven websites? I do a fair amount of development
            > using Tomcat/JSP/Servlets with Struts for clients. I see
            > more and more ads for LAMP/PHP developers. What are the
            > advantages and tradeoffs?[/color]

            One person's advantage may well be another person's drawback.
            For example, I like that PHP does not force the developer into
            an object-oriented development paradigm. I tend to think that
            Web development is quite often better done with old-fashioned
            procedural programming. So I like having an option to steer
            clear from OOP when I think OOP is inappropriate for the task
            at hand. For you, with your Java background, this may sound
            like the ultimate heresy.

            Cheers,
            NC

            Comment

            • Metnetsky

              #7
              Re: PHP vs. Java

              On Tue, 08 Jul 2003 12:39:00 -0400, Bruce Lewis wrote:
              [color=blue]
              > "Metnetsky" <mimetnet@syr.e du> writes:
              >[color=green][color=darkred]
              >> > The UI should be a natural
              >> > extension of what the user does with the data.[/color]
              >>
              >> And that's why using a MVC(2) system is best.[/color]
              >
              > With a feature-complete databse like PostgreSQL, all business logic can
              > be at the database level. The database is the back end. Put as many
              > light-weight front ends on as you wish. The only logic that needs to be
              > embedded in web pages is UI logic.[/color]

              Not to start a flame-fest, but no database is smart enough to handle half
              of the business logic that any medium size website has. Does your code
              only do simple CRUD statements? And the best part about an MVC system is
              that you can CHANGE your view (HTML/XML/SOAP/etc) without having to change
              your control or business logic.

              Comment

              • Metnetsky

                #8
                Re: PHP vs. Java

                On Tue, 08 Jul 2003 22:28:04 +0000, James wrote:
                [color=blue]
                > On Tue, 08 Jul 2003 11:40:42 -0400, "Metnetsky" <mimetnet@syr.e du>
                > scrawled:
                >[color=green]
                >>On Tue, 08 Jul 2003 12:46:44 -0700, RG wrote:
                >>
                >>[color=darkred]
                >>> "bb" <bill.blackmon@ verizon.net> wrote in message
                >>> news:9dqOa.223$ 78.172@nwrdny03 .gnilink.net...
                >>>> I'm not a Perl programmer nor a Linux adherent. What are the
                >>>> advantages of LAMP vs.the Java model for building data-driven
                >>>> websites? I do a fair
                >>> amount
                >>>> of
                >>>> development using Tomcat/JSP/Servlets with Struts for clients. I see
                >>>> more and more ads for
                >>>> LAMP/PHP developers. What are the advantages and tradeoffs? All
                >>>> opinions welcomed....
                >>>>
                >>>>
                >>>>
                >>>>
                >>>>
                >>> PHP is easier to learn, it actually reads like english. Nearly all
                >>> Linux servers are offering PHP and MySQL which means cheaper prices
                >>> for shared space.
                >>> This is of course my biased opinion because I have never even looked
                >>> into servlets.
                >>> RG[/color]
                >>
                >>PHP is generally easier. But with PHP5 it's going to become the
                >>Java-Scripting-Language as it's a near replicate minus variable types.
                >>I love PHP and I love Java. Each have their points. Generally PHP can[/color]
                >
                > But what about the memory limitations of Java 1.4.1 which requires a
                > minimum of 256Mb to simply run! As usual Sun has shot Java in the foot,
                > in the fact that it takes up too much space to allow multiple processes
                > to run....[color=green]
                >>handle everything from small to mid-size without a problem. It can even
                >>handle some huge sites (at work we're developing a massive community
                >>based system in pure PHP - but we're knocking on the walls pretty hard).
                >> For high-end systems I would suggest Java. It REQUIRES that you truly
                >>think[/color]
                >
                > For hi-end systems I wouldn't even contemplate Java - unless you can
                > afford an order of magnitude spend on hardware to cope with the demand
                > for services
                >[color=green]
                >>throw your entire systems model and forces you to have everything in
                >>place before you begin and realize you're screwed. Most PHP
                >>application s are hacks, for better or worse (depends on who you ask).
                >>And if you ask most[/color]
                >
                > I agree with this - BUT you can write good PHP - just you can write bad
                > PHP and it works - but you can't really write bad Java and get it to
                > work (it is only the memory problems which are bad with Java)
                >[color=green]
                >>the PHP's creators they'll tell you that PHP should just control
                >>template logic and all control/model patterns should be written as PHP
                >>modules in C. My point is simply this, everyone has an opinion and
                >>they're all right and wrong.
                >>
                >>Personally I like the design patterns that most Java applications make
                >>use of. That just happens to be my cup of coffee. But if you like
                >>coding directly in the pages, use PHP, it's far easier than pure JSP.[/color]
                >
                > I can't even imaging getting most of my programmes working in Java and
                > coping with the peak server load that we have on the servers I use.
                >
                > I use either mod_perl or PHP....[/color]

                Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

                Comment

                • Nikolai Chuvakhin

                  #9
                  Re: PHP vs. Java

                  "Metnetsky" <mimetnet@syr.e du> wrote in message
                  news:<pan.2003. 07.08.17.25.56. 897711@syr.edu> ...[color=blue]
                  >[/color]
                  NC> I like that PHP does not force the developer into an
                  NC> object-oriented development paradigm.[color=blue]
                  >
                  > Have you seen PHP5?[/color]

                  No, but from what I hear and read, I am not going to like it... :)

                  Cheers,
                  NC

                  Comment

                  • Bruce Lewis

                    #10
                    Re: PHP vs. Java

                    "Metnetsky" <mimetnet@syr.e du> writes:
                    [color=blue]
                    > Not to start a flame-fest, but no database is smart enough to handle half
                    > of the business logic that any medium size website has.[/color]

                    I guess the easy way to avoid a flame fest would be to post an example
                    of business logic that cannot be handled by a database. That would shut
                    up all the flamers, wouldn't it?

                    Go ahead. I'm waiting.

                    --
                    "Notwithstandin g fervent argument that patent protection is essential
                    for the growth of the software industry, commentators have noted
                    that `this industry is growing by leaps and bounds without it.'"
                    -- US Supreme Court Justice John Paul Stevens, March 3, 1981.

                    Comment

                    • mike s

                      #11
                      Re: PHP vs. Java

                      On Tue, 08 Jul 2003 19:30:22 -0400, "Metnetsky" <mimetnet@syr.e du>
                      wrote:
                      [color=blue]
                      >http://www.onjava.com/pub/a/onjava/2.../04/nukes.html[/color]

                      Ok, so one high traffic site ran into problems when they implemented
                      nuke. This supports what James said -- you can write good code and
                      you can write bad code. Coincidentally, what is good code for one
                      site might be horrendous for another.

                      If your argument is simply that PHP can't handle high traffic sites,
                      then what about Yahoo!?


                      Application, Hardware, OS, and network infrastructure are all integral
                      parts of designing a website. If you think nuke was a bad idea for
                      the site above, you should have seen what one of the world's largest
                      financial institutions did with Java. I witnessed millions of dollars
                      in revenue loss daily where the network infrastructure was extremely
                      over-designed and the Java application was underdeveloped and couldn't
                      handle it. (I don't miss working there...)

                      Comment

                      • Brandon Blackmoor

                        #12
                        Re: PHP vs. Java

                        James wrote:[color=blue]
                        >
                        > For hi-end systems I wouldn't even contemplate Java -[/color]

                        For an enterprise-level system, I wouldn't contemplate anything else.

                        Comment

                        • Phil Roberts

                          #13
                          Re: PHP vs. Java

                          With total disregard for any kind of safety measures "Metnetsky"
                          <mimetnet@syr.e du> leapt forth and uttered:
                          [color=blue]
                          > Have you seen PHP5? Pure OOP. Slightly scarey if you ask me,
                          > since it's just more text to be processed, and then executed.[/color]

                          PHP5 is not 'pure OOP' as this would break backwards-compatibility
                          with damn near every single PHP app on the net. It merely has a bunch
                          of new OO constructs is all. You're still free to hack away at
                          procedural cod if thats what floats your boat.

                          --
                          There is no signature.....

                          Comment

                          • Metnetsky

                            #14
                            Re: PHP vs. Java

                            On Wed, 09 Jul 2003 11:19:46 -0400, mike s wrote:
                            [color=blue]
                            > On Tue, 08 Jul 2003 19:30:22 -0400, "Metnetsky" <mimetnet@syr.e du>
                            > wrote:
                            >[color=green]
                            >>http://www.onjava.com/pub/a/onjava/2.../04/nukes.html[/color]
                            >
                            > Ok, so one high traffic site ran into problems when they implemented
                            > nuke. This supports what James said -- you can write good code and you
                            > can write bad code. Coincidentally, what is good code for one site
                            > might be horrendous for another.
                            >
                            > If your argument is simply that PHP can't handle high traffic sites,
                            > then what about Yahoo!?
                            > http://public.yahoo.com/~radwin/talk...phpcon2002.htm
                            >
                            > Application, Hardware, OS, and network infrastructure are all integral
                            > parts of designing a website. If you think nuke was a bad idea for the
                            > site above, you should have seen what one of the world's largest
                            > financial institutions did with Java. I witnessed millions of dollars
                            > in revenue loss daily where the network infrastructure was extremely
                            > over-designed and the Java application was underdeveloped and couldn't
                            > handle it. (I don't miss working there...)[/color]

                            PHP is going to be used as the front-end template language while PHP
                            extensions written in PURE C will be doing almost all the logic and
                            back-end management. Rasmus will be helping them with this.

                            I love PHP, always have and always will. But I also love Java, they have
                            their strengths and weaknesses. Both must be recognized.

                            Comment

                            • Drazen Gemic

                              #15
                              Re: PHP vs. Java

                              Java great measure of isolation from the operating system is the
                              advantage on microsoft operating systems, where unwanted suprises are
                              always likely to happen.

                              DG

                              Comment

                              Working...