Choosing PHP for large projects

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

    Choosing PHP for large projects

    I will be embarking on a large web project. I am still researching as to
    which language use - PHP or Perl.

    Can someone clear up some of the bad publicity with PHP in the links
    below? They are very interestiing points. Are these points moot in PHP5?





    THanks!
  • Michael Vilain

    #2
    Re: Choosing PHP for large projects

    In article <10vsej3tnkmi10 f@news.supernew s.com>, Deke <Deke@nospam.co m>
    wrote:
    [color=blue]
    > I will be embarking on a large web project. I am still researching as to
    > which language use - PHP or Perl.
    >
    > Can someone clear up some of the bad publicity with PHP in the links
    > below? They are very interestiing points. Are these points moot in PHP5?
    >
    > http://www.bitstorm.org/edwin/en/php-sucks/
    > http://www.ukuug.org/events/linux200...php/index.html
    > http://www.webkreator.com/php/commun...-and-hate.html
    >
    > THanks![/color]

    Yawn! This smells so much like a troll, I can't barely bring myself to
    give the poster the benefit of the doubt. It's as if he showed up in a
    Mac newsgroup and posted "MACS SUCK! PCs RULE". If this were cross
    posted in the perl groups, I can imagine their reaction. Perl hackers
    in those groups can be brutal.

    The URLs you posted above are all nits mostly about the abstracts of
    php's implementation. So what? The second link talks more about the
    pitfalls of building a large site and is quite useful than php vs. perl
    in general. You could just as easily have inserted "Java/Tomcat" for
    php in the 2nd URL's article.

    Anyway, why not take a step back and not even think about the language
    you're going to use at this point? Why not just do a story board of the
    site, document on the flow of information, and figure out what you're
    trying to do first?

    Find out what sort of machine you'll be running the site on (PC running
    Windows/IIS or Linux/Apache or something else). Is the system "all
    yours" or will it be shared with other users and sites on an ISP? Any
    restrictions on what's allowed to be installed on the host (some ISPs
    won't install software for you--you take what they offer or go
    elsewhere).

    Now, if you had to design something from all this in a single day, which
    language would you use? Perl or php? Which are you most comfortable
    with?

    I personally like the huge perl CPAN repository which has many man-years
    of experience behind it. I like the ability to do step-by-step
    debugging in the perl debugger. php isn't quite there yet (yes, I know
    about PEAR and ZEND's editor with built-in php debugger).

    Yet, I wouldn't want to recode my site using only perl. php is just
    enough to do individual pages on the shared machine. For CGI scripts, I
    use perl and CGIwrap. These constraints are imposed by my ISP but I can
    work with them.

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Comment

    • Deke

      #3
      Re: Choosing PHP for large projects

      Thanks for the answer. This is not a troll, by the way. Anyone have any
      good perl vs php links? Thanks

      Michael Vilain wrote:[color=blue]
      > In article <10vsej3tnkmi10 f@news.supernew s.com>, Deke <Deke@nospam.co m>
      > wrote:
      >
      >[color=green]
      >>I will be embarking on a large web project. I am still researching as to
      >>which language use - PHP or Perl.
      >>
      >>Can someone clear up some of the bad publicity with PHP in the links
      >>below? They are very interestiing points. Are these points moot in PHP5?
      >>
      >>http://www.bitstorm.org/edwin/en/php-sucks/
      >>http://www.ukuug.org/events/linux200...php/index.html
      >>http://www.webkreator.com/php/commun...-and-hate.html
      >>
      >>THanks![/color]
      >
      >
      > Yawn! This smells so much like a troll, I can't barely bring myself to
      > give the poster the benefit of the doubt. It's as if he showed up in a
      > Mac newsgroup and posted "MACS SUCK! PCs RULE". If this were cross
      > posted in the perl groups, I can imagine their reaction. Perl hackers
      > in those groups can be brutal.
      >
      > The URLs you posted above are all nits mostly about the abstracts of
      > php's implementation. So what? The second link talks more about the
      > pitfalls of building a large site and is quite useful than php vs. perl
      > in general. You could just as easily have inserted "Java/Tomcat" for
      > php in the 2nd URL's article.
      >
      > Anyway, why not take a step back and not even think about the language
      > you're going to use at this point? Why not just do a story board of the
      > site, document on the flow of information, and figure out what you're
      > trying to do first?
      >
      > Find out what sort of machine you'll be running the site on (PC running
      > Windows/IIS or Linux/Apache or something else). Is the system "all
      > yours" or will it be shared with other users and sites on an ISP? Any
      > restrictions on what's allowed to be installed on the host (some ISPs
      > won't install software for you--you take what they offer or go
      > elsewhere).
      >
      > Now, if you had to design something from all this in a single day, which
      > language would you use? Perl or php? Which are you most comfortable
      > with?
      >
      > I personally like the huge perl CPAN repository which has many man-years
      > of experience behind it. I like the ability to do step-by-step
      > debugging in the perl debugger. php isn't quite there yet (yes, I know
      > about PEAR and ZEND's editor with built-in php debugger).
      >
      > Yet, I wouldn't want to recode my site using only perl. php is just
      > enough to do individual pages on the shared machine. For CGI scripts, I
      > use perl and CGIwrap. These constraints are imposed by my ISP but I can
      > work with them.
      >[/color]

      Comment

      • Bent Stigsen

        #4
        Re: Choosing PHP for large projects

        Deke wrote:[color=blue]
        > I will be embarking on a large web project. I am still researching as to
        > which language use - PHP or Perl.
        >
        > Can someone clear up some of the bad publicity with PHP in the links
        > below? They are very interestiing points. Are these points moot in PHP5?
        >
        > http://www.bitstorm.org/edwin/en/php-sucks/[/color]

        Looks a little biased. From the points listed, the only thing that would
        make a difference, with regards to the size of the project, is the lack
        of namespace. If the project is written from scratch (i.e. not just
        gathering up a bunch of prototypes or separate projects), you plan
        ahead, and you are strict with your naming conventions (proper
        prefixing), then it is less of a problem, if at all.

        If you include more than one namespace, then you can still get name
        collisions.

        If not included but explicitly stated, then you would perhaps write
        "fooNS:fooFunc( )" instead of "fooNS_fooFunc( )". (whoop dee doo)

        But apart from that, they can be nice to have. If you have some old code
        that you want imported, you can just slap on a namespace, and there you
        go. On the other hand, in awareness of the lack of namespace, people
        usually prefix their functions and classes, if it is something worth
        reusing.
        [color=blue]
        > http://www.ukuug.org/events/linux200...php/index.html[/color]

        Pretty much same as above, has a point in "3. Using a Team of
        Developers". But developers aware of the possibility of namespace
        pollution will act accordingly. I wouldn't consider it a real problem.
        [color=blue]
        > http://www.webkreator.com/php/commun...-and-hate.html[/color]

        Hmm, upset about a tutorial that requires register_global s, written
        years ago by some random grrl, that they (Zend) don't remove from their
        site. Ok. Disagreeing with some articles on the net. Ok. Concluding that
        PHP is headed straight to hell. Uhm... what?


        Perhaps you should peek in some (larger) opensource projects both for
        php and perl, and judge what you are most comfortable with.

        /Bent

        Comment

        • Tim Van Wassenhove

          #5
          Re: Choosing PHP for large projects

          On 2005-01-31, Deke <Deke@nospam.co m> wrote:[color=blue]
          > Thanks for the answer. This is not a troll, by the way. Anyone have any
          > good perl vs php links? Thanks[/color]

          Imho, languageX vs languageY comparisions suck!

          Just choose the one that allows you to do the things you need to do the
          easiest/fastest/cheapest. From that point of view it doesn't matter
          which parts of a language suck, because you have to focus on the parts that
          are good... And if those parts are really good, other languages will
          pick that up... This way we end up with a positive and inspiring
          discussion instead of the usual flamewars...




          --
          Met vriendelijke groeten,
          Tim Van Wassenhove <http://www.timvw.info>

          Comment

          • Chung Leong

            #6
            Re: Choosing PHP for large projects


            "Tim Van Wassenhove" <timvw@users.so urceforge.net> wrote in message
            news:367d91F4qi 0foU1@individua l.net...[color=blue]
            > On 2005-01-31, Deke <Deke@nospam.co m> wrote:[color=green]
            > > Thanks for the answer. This is not a troll, by the way. Anyone have any
            > > good perl vs php links? Thanks[/color]
            >
            > Imho, languageX vs languageY comparisions suck!
            >
            > Just choose the one that allows you to do the things you need to do the
            > easiest/fastest/cheapest. From that point of view it doesn't matter
            > which parts of a language suck, because you have to focus on the parts[/color]
            that[color=blue]
            > are good... And if those parts are really good, other languages will
            > pick that up... This way we end up with a positive and inspiring
            > discussion instead of the usual flamewars...[/color]

            What if every part of a language sucks? LISP is what I have in mind :-)


            Comment

            • Al Kolff

              #7
              Re: Choosing PHP for large projects


              "Michael Vilain" <vilain@spamcop .net> wrote in message
              news:vilain-5ECDCB.08002731 012005@news.gig anews.com...[color=blue]
              > In article <10vsej3tnkmi10 f@news.supernew s.com>, Deke <Deke@nospam.co m>
              > wrote:
              >[color=green]
              > > I will be embarking on a large web project. I am still researching as to
              > > which language use - PHP or Perl.
              > >
              > > Can someone clear up some of the bad publicity with PHP in the links
              > > below? They are very interestiing points. Are these points moot in PHP5?
              > >
              > > http://www.bitstorm.org/edwin/en/php-sucks/
              > > http://www.ukuug.org/events/linux200...php/index.html
              > > http://www.webkreator.com/php/commun...-and-hate.html
              > >
              > > THanks![/color]
              >
              > Yawn! This smells so much like a troll, I can't barely bring myself to
              > give the poster the benefit of the doubt. It's as if he showed up in a
              > Mac newsgroup and posted "MACS SUCK! PCs RULE". If this were cross
              > posted in the perl groups, I can imagine their reaction. Perl hackers
              > in those groups can be brutal.
              >
              > The URLs you posted above are all nits mostly about the abstracts of
              > php's implementation. So what? The second link talks more about the
              > pitfalls of building a large site and is quite useful than php vs. perl
              > in general. You could just as easily have inserted "Java/Tomcat" for
              > php in the 2nd URL's article.
              >
              > Anyway, why not take a step back and not even think about the language
              > you're going to use at this point? Why not just do a story board of the
              > site, document on the flow of information, and figure out what you're
              > trying to do first?
              >
              > Find out what sort of machine you'll be running the site on (PC running
              > Windows/IIS or Linux/Apache or something else). Is the system "all
              > yours" or will it be shared with other users and sites on an ISP? Any
              > restrictions on what's allowed to be installed on the host (some ISPs
              > won't install software for you--you take what they offer or go
              > elsewhere).
              >
              > Now, if you had to design something from all this in a single day, which
              > language would you use? Perl or php? Which are you most comfortable
              > with?
              >
              > I personally like the huge perl CPAN repository which has many man-years
              > of experience behind it. I like the ability to do step-by-step
              > debugging in the perl debugger. php isn't quite there yet (yes, I know
              > about PEAR and ZEND's editor with built-in php debugger).
              >
              > Yet, I wouldn't want to recode my site using only perl. php is just
              > enough to do individual pages on the shared machine. For CGI scripts, I
              > use perl and CGIwrap. These constraints are imposed by my ISP but I can
              > work with them.
              >
              > --
              > DeeDee, don't press that button! DeeDee! NO! Dee...
              >
              >
              >[/color]
              To the point and right on target. To many jump in coding like mad and then
              expect someone else to dig them out of their own mess.

              The rule of thumb that has worked for me is, "For every minute you spend
              planning, you save ten writing the code."
              Then there is the corollary, "The first 90% of the project takes 20% of the
              time and the last 10% take 80%."

              --
              Thank you,
              Al Kolff

              Technical Services
              Divine Shepherd Lutheran Church
              9741 W Beloit Rd
              Milwaukee, WI 53227

              Web Site http://www.divineshepherdlc.org


              Comment

              • Martin Meng

                #8
                Re: Choosing PHP for large projects

                being the very first language I taught myself, Lisp is well loved.
                granted not the most useful language for general usage

                --
                Junxter Ad Network



                Chung Leong wrote:[color=blue]
                > "Tim Van Wassenhove" <timvw@users.so urceforge.net> wrote in message
                > news:367d91F4qi 0foU1@individua l.net...
                >[color=green]
                >>On 2005-01-31, Deke <Deke@nospam.co m> wrote:
                >>[color=darkred]
                >>>Thanks for the answer. This is not a troll, by the way. Anyone have any
                >>>good perl vs php links? Thanks[/color]
                >>
                >>Imho, languageX vs languageY comparisions suck!
                >>
                >>Just choose the one that allows you to do the things you need to do the
                >>easiest/fastest/cheapest. From that point of view it doesn't matter
                >>which parts of a language suck, because you have to focus on the parts[/color]
                >
                > that
                >[color=green]
                >>are good... And if those parts are really good, other languages will
                >>pick that up... This way we end up with a positive and inspiring
                >>discussion instead of the usual flamewars...[/color]
                >
                >
                > What if every part of a language sucks? LISP is what I have in mind :-)
                >
                >[/color]

                Comment

                • RL

                  #9
                  Re: Choosing PHP for large projects

                  Deke,

                  I used to do everything in Perl, then decided to learn PHP.

                  I like PHP as it is quite easy to learn and quick to develop web
                  applications.

                  For your BIG project, you may want to consider the following...

                  1) Testing
                  What I don't like about PHP is that it only runs in a web environment.
                  Perl can run stand alone, good for testing routines.

                  2) Processes
                  Also, Perl can spawn processes that you can control (child processes).
                  PHP is only ran when a user visits a page.

                  3) Alternative
                  Another thing you can consider is a combination of PHP and Perl.
                  This is what I chose for my BIG project

                  The web sections are all PHP (and MySQL).
                  The networking sections are all in Perl.

                  Have fun!
                  Rob

                  "Deke" <Deke@nospam.co m> wrote in message
                  news:10vsej3tnk mi10f@news.supe rnews.com...[color=blue]
                  >I will be embarking on a large web project. I am still researching as to
                  >which language use - PHP or Perl.
                  >
                  > Can someone clear up some of the bad publicity with PHP in the links
                  > below? They are very interestiing points. Are these points moot in PHP5?
                  >
                  > http://www.bitstorm.org/edwin/en/php-sucks/
                  > http://www.ukuug.org/events/linux200...php/index.html
                  > http://www.webkreator.com/php/commun...-and-hate.html
                  >
                  > THanks![/color]


                  Comment

                  • Jerry Stuckle

                    #10
                    Re: Choosing PHP for large projects

                    RL wrote:[color=blue]
                    >
                    > Deke,
                    >
                    > I used to do everything in Perl, then decided to learn PHP.
                    >
                    > I like PHP as it is quite easy to learn and quick to develop web
                    > applications.
                    >
                    > For your BIG project, you may want to consider the following...
                    >
                    > 1) Testing
                    > What I don't like about PHP is that it only runs in a web environment.
                    > Perl can run stand alone, good for testing routines.
                    >[/color]

                    PHP can run standalong just fine, also. I have several cron jobs which
                    use PHP to access a MySQL database, for instance.
                    [color=blue]
                    > 2) Processes
                    > Also, Perl can spawn processes that you can control (child processes).
                    > PHP is only ran when a user visits a page.
                    >[/color]

                    PHP can spawn processes anytime, also.
                    [color=blue]
                    > 3) Alternative
                    > Another thing you can consider is a combination of PHP and Perl.
                    > This is what I chose for my BIG project
                    > http://boomstickservers.com/gpanel/
                    > The web sections are all PHP (and MySQL).
                    > The networking sections are all in Perl.
                    >[/color]

                    Actually, this can also be a good alternative.
                    [color=blue]
                    > Have fun!
                    > Rob
                    >[/color]

                    Please note - I'm not saying one is better than the other - and don't
                    want to get into a holy war here. I'm just correcting some
                    mis-statements in your post.

                    --

                    To reply, delete the 'x' from my email
                    Jerry Stuckle,
                    JDS Computer Training Corp.
                    jstucklex@attgl obal.net
                    Member of Independent Computer Consultants Association - www.icca.org

                    Comment

                    • Gooofy

                      #11
                      Re: Choosing PHP for large projects

                      No harm, educational in fact.
                      I didn't know PHP could be run from command line :)

                      "Jerry Stuckle" <jstucklex@attg lobal.net> wrote in message
                      news:420796FB.4 B6@attglobal.ne t...[color=blue]
                      > RL wrote:[color=green]
                      >>
                      >> Deke,
                      >>
                      >> I used to do everything in Perl, then decided to learn PHP.
                      >>
                      >> I like PHP as it is quite easy to learn and quick to develop web
                      >> applications.
                      >>
                      >> For your BIG project, you may want to consider the following...
                      >>
                      >> 1) Testing
                      >> What I don't like about PHP is that it only runs in a web environment.
                      >> Perl can run stand alone, good for testing routines.
                      >>[/color]
                      >
                      > PHP can run standalong just fine, also. I have several cron jobs which
                      > use PHP to access a MySQL database, for instance.
                      >[color=green]
                      >> 2) Processes
                      >> Also, Perl can spawn processes that you can control (child processes).
                      >> PHP is only ran when a user visits a page.
                      >>[/color]
                      >
                      > PHP can spawn processes anytime, also.
                      >[color=green]
                      >> 3) Alternative
                      >> Another thing you can consider is a combination of PHP and Perl.
                      >> This is what I chose for my BIG project
                      >> http://boomstickservers.com/gpanel/
                      >> The web sections are all PHP (and MySQL).
                      >> The networking sections are all in Perl.
                      >>[/color]
                      >
                      > Actually, this can also be a good alternative.
                      >[color=green]
                      >> Have fun!
                      >> Rob
                      >>[/color]
                      >
                      > Please note - I'm not saying one is better than the other - and don't
                      > want to get into a holy war here. I'm just correcting some
                      > mis-statements in your post.
                      >
                      > --
                      >
                      > To reply, delete the 'x' from my email
                      > Jerry Stuckle,
                      > JDS Computer Training Corp.
                      > jstucklex@attgl obal.net
                      > Member of Independent Computer Consultants Association - www.icca.org[/color]


                      Comment

                      • coolsti

                        #12
                        Re: Choosing PHP for large projects

                        >From the points listed, the only thing that would[color=blue]
                        > make a difference, with regards to the size of the project, is the lack
                        > of namespace. If the project is written from scratch (i.e. not just
                        > gathering up a bunch of prototypes or separate projects), you plan
                        > ahead, and you are strict with your naming conventions (proper
                        > prefixing), then it is less of a problem, if at all.
                        >
                        > If you include more than one namespace, then you can still get name
                        > collisions.[/color]

                        I think the namecase issue can be overcome in PHP by using classes. This
                        is what I do, not specifically for the namespace issue, but to sort of
                        organize and encapsulate my code. If I have something that is an "entity",
                        such as a "project activity" or such, I make a class, and put all
                        functions that have to do with project activities (assessing the database,
                        arranging things to create output HTML tables, or parts of tables, etc.)
                        in that class. Then the function is called by instantiating an object

                        $myobject = new myobjectclass
                        $myobject->myfunction()

                        or a variable directly

                        $myobject->name

                        or if instantiation is not needed (to just access a function)

                        myobjectclass:: myfunction()

                        In effect, one could create a class just to create a namespace for a group
                        of functions.

                        // SI

                        Comment

                        • Armando Padilla

                          #13
                          Re: Choosing PHP for large projects

                          coolsti wrote:[color=blue][color=green]
                          >>From the points listed, the only thing that would[/color]
                          >[color=green]
                          >>make a difference, with regards to the size of the project, is the lack
                          >>of namespace. If the project is written from scratch (i.e. not just
                          >>gathering up a bunch of prototypes or separate projects), you plan
                          >>ahead, and you are strict with your naming conventions (proper
                          >>prefixing), then it is less of a problem, if at all.
                          >>
                          >>If you include more than one namespace, then you can still get name
                          >>collisions.[/color]
                          >
                          >
                          > I think the namecase issue can be overcome in PHP by using classes. This
                          > is what I do, not specifically for the namespace issue, but to sort of
                          > organize and encapsulate my code. If I have something that is an "entity",
                          > such as a "project activity" or such, I make a class, and put all
                          > functions that have to do with project activities (assessing the database,
                          > arranging things to create output HTML tables, or parts of tables, etc.)
                          > in that class. Then the function is called by instantiating an object
                          >
                          > $myobject = new myobjectclass
                          > $myobject->myfunction()
                          >
                          > or a variable directly
                          >
                          > $myobject->name
                          >
                          > or if instantiation is not needed (to just access a function)
                          >
                          > myobjectclass:: myfunction()
                          >
                          > In effect, one could create a class just to create a namespace for a group
                          > of functions.
                          >
                          > // SI[/color]


                          Yea PHP is decent for large projects. I would recommend you use PHP
                          MVC(model view controller). Use Smarty to seperate the content from the
                          php and use classes to isolate your functionality/business logic.

                          AP

                          Comment

                          Working...