Slashdot Mirror


Yahoo Moving to PHP

Erek Dyskant writes "Yahoo has decided to switch from a proprietary system written in C/C++ to PHP for their backend scripting. Here's the notes from a presentation by a Yahoo engineer at PHP Con 2002."

733 comments

  1. Oh my god! by SpanishInquisition · · Score: 3, Funny

    Cats sleeping with dogs, PHP useful at something!!!

    --
    Je t'aime Stéphanie
    1. Re:Oh my god! by Mandi+Walls · · Score: 1, Redundant

      mass hysteria!!!!!!!

    2. Re:Oh my god! by mr_z_beeblebrox · · Score: 5, Informative

      PHP useful at something!!!

      I didn't expect the spanish inquisition. Really, though. PHP is like PERL made for the web, it has easier access to databases than any other language I know of (which are only a few granted but Perl and C are among them).
      I would say more but Language choice tends to get religious. Everyone thinks theirs is superior and few will just yield to my choices :-)

    3. Re:Oh my god! by mntgomery · · Score: 1

      Nobody expects the Spanish Inquisition! "Do you Yahoo?" "I did before they broke it."

      --

      This comment was generated by a squadron of trained super elite albino ninja chickens for you.
    4. Re:Oh my god! by Geekboy(Wizard) · · Score: 1

      Nobody expects the SpanishInquisition!

    5. Re:Oh my god! by tzanger · · Score: 3, Interesting

      PHP is like PERL made for the web, it has easier access to databases than any other language I know of

      I disagree; Perl's DBI interface is *far* simpler (and the functions are not DB-specific) like PHP's. (I think PHP solved that in the not too distant past though)

    6. Re:Oh my god! by JebusIsLord · · Score: 2

      PEAR-db is a database abstraction layer for php. i choose not to use it (just use the mysql functions for speed) but its there, included by default, and pretty easy to use too.

      --
      Jeremy
    7. Re:Oh my god! by Scooter · · Score: 2

      Yeah _ mean _ love PHP - my own website is written in it but Yahoo? I wonder if they've thought about the performance hit - my previous news type siste was written in C and pretty damm well instant. The PHP equivalent. whilst a doddle to write, is a damm site slower. Mind you I expect they'll ahve invested in the Zend compiler.

    8. Re:Oh my god! by Anonymous Coward · · Score: 1, Insightful

      BS. Have you even used PHP for database access? Perl's DBI library, which BTW isn't even built-in to Perl unlike PHP's DB functions (which accounts for PHP's speed over Perl), is a convoluted nightmare. PHP's functions are extremely straightforward, easy to create classes for and faster.

      If you really don't want to use DB specific functions (which are way faster), then use the ODBC functions.

    9. Re:Oh my god! by Anonymous Coward · · Score: 4, Informative

      I hate how uninformed people (I'm not saying you are, but you are certainly propagating the myth) always say something to the effect that PHP is "web only". This is downright false. I've written complex shell scripts with PHP, and tend to do so most of the time over sh or Perl.

      #!/usr/bin/php works just like the Perl alternative.

    10. Re:Oh my god! by Anonymous Coward · · Score: 0

      I hate how uninformed people (I'm not saying you are, but you are certainly propagating the myth) always say something to the effect that PHP is "web only" or "web specific". This is downright false. I write complex shell scripts with PHP instead of sh or Perl all of the time.

      #!/usr/bin/php works just like the Perl alternative. I would even challenge someone to write something in Perl that cannot be done in PHP.

    11. Re:Oh my god! by gmuslera · · Score: 1

      With 4500 computers devoted to this maybe is not so bad the performance hit

    12. Re:Oh my god! by tfoss · · Score: 5, Insightful
      I wonder if they've thought about the performance hit


      Dude, this isn't some little backwater ecommerce site, this is the most hit site in the world. I think it's safe to say they considered the performance. (BTW check slides 30-34 of the link for that exact info)


      -Ted

      --
      -=-=- Quantum physics - the dreams stuff are made of.
    13. Re:Oh my god! by Anonymous Coward · · Score: 0
      I disagree; Perl's DBI interface is *far* simpler

      What color is the sky in your world?

    14. Re:Oh my god! by jchristopher · · Score: 1
      Really, though. PHP is like PERL made for the web, it has easier access to databases than any other language I know of (which are only a few granted but Perl and C are among them).

      You've never heard of ColdFusion? Or do you think ColdFusion isn't a "real" language, because it isn't hard to learn?

    15. Re:Oh my god! by Anonymous Coward · · Score: 0

      EGON
      Forty years of darkness! Earthquakes! Volcanoes!

      WINSTON
      The dead rising from the grave!

      PETER
      Human sacrifice, dogs and cats living together, mass hysteria!

    16. Re:Oh my god! by elphkotm · · Score: 1

      Perl's DBI library is a standard, mature interface that plugs into DBD modules to form a uniform object set. PHP provides several very much differing interfaces for accessing seperate database types. I'd hardly say this is a convoluted nightmare. If you've ever dealt with different databases (MySQL, PostgreSQL, Oracle, etc), DBI is a blessing.

      PHP's speed over Perl is primarily due to the fact that PHP does not have the standard CGI overhead usually associated with Perl. If you use FastCGI to implement your web applications, there is just no competition: Perl beats PHP hands down.

      --

      <Amanda`> I just went out to the parking lot in my bathrobe to exchange warez CDs.
    17. Re:Oh my god! by Pandora's+Vox · · Score: 1

      Oh my god, your sig is so funny I just about peed myself laughing. I think I need more sleep.

    18. Re:Oh my god! by mr_z_beeblebrox · · Score: 3, Interesting

      You've never heard of ColdFusion? Or do you think ColdFusion isn't a "real" language, because it isn't hard to learn?

      Actually, I learn what I am paid to learn. My employer never cared about cold fusion so I never learned it. I know often people comment about everything, but I stick to what I know and what I know is the languages which can easily gain me employment.

    19. Re:Oh my god! by Anonymous Coward · · Score: 0

      #!/usr/bin/php does NOT work just like the Perl alternative. It's a proven fact, try doing a simple substitution in a file like this in perl:

      perl -pi -e 's/\r\n/\n/' file

      ?? You can't do that in php?

    20. Re:Oh my god! by Anonymous Coward · · Score: 0

      Well, PHP wasn't built as a log file processing language like Perl was. But, of course you can run PHP from the command line and do the same thing as that. Just takes a few more keystrokes, but it is still a one-liner:

      php -r '$f=file($argv[1]); foreach($f as $line) echo str_replace("\r\n","\n",$line);' file

      Ok, that spits to stdout instead. But you get the idea.

    21. Re:Oh my god! by Anonymous Coward · · Score: 0

      And that is why your honor, most PHP developers say Perl is an ugly programming language.

      There is at least 10 solutions in Perl that are more readable than this.

    22. Re:Oh my god! by Anonymous Coward · · Score: 0

      Don't you have to pay for ColdFusion?

    23. Re:Oh my god! by Anonymous Coward · · Score: 0

      That sig is from a T-shirt. "All true wisdom is found on T-shirts".
      There are more like it on http://www.tshirthell.com/

    24. Re:Oh my god! by Edgewize · · Score: 2, Informative
      There is at least 10 solutions in Perl that are more readable than this.

      ... and that is why so few major projects are ever written in Perl. You will never find two programmers who write Perl in the exact same style. PHP may have a much more limited syntax but it enforces readability to a certain extent.

    25. Re:Oh my god! by Wolfrider · · Score: 0, Redundant
      o PHP useful at something!!!

      o Forty years of darkness! Earthquakes! Volcanoes!

      o The dead rising from the grave!

      o Human sacrifice, dogs and cats living together, mass hysteria!

      o ...

      o PROFIT!!

      :P

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    26. Re:Oh my god! by jfbus · · Score: 1

      No Zend Compiler (it isn't free), but they use PHP-Accelerator.

      The performance hit is not so great as long as you tune your code. I've seen PHP templates evaluated in 5ms (including a mySQL query) with PHP-Accelerator.

      The trouble you'll have on such sites will be more with the Apache 1 process model (1 process = 1 HTTP connection) than PHP performance.

    27. Re:Oh my god! by mr_z_beeblebrox · · Score: 2

      I hate how uninformed people (I'm not saying you are, but you are certainly propagating the myth) always say something to the effect that PHP is "web only". This is downright false. I've written complex shell scripts with PHP, and tend to do so most of the time over sh or Perl.

      When you are done hating that, grep through my post for the word only...I said it is a perl alternative made for the web. Obviously a perl alternative has to do more than webwork, but PHPs origins are that it was made for the web. Yes, it does more but before you slam someone for saying that it doesn't check to see if they said that or not.

    28. Re:Oh my god! by Anonymous Coward · · Score: 0

      Go back and read the code the other person made for doing the same thing in php, can you seriously say that it is more readable? I surely can't.

    29. Re:Oh my god! by Beliskner · · Score: 2
      Dude, this isn't some little backwater ecommerce site, this is the most hit site in the world. I think it's safe to say they considered the performance
      Or maybe they want to reverse the IT recession singlehandedly by buying all the cheap hardware around these days. Then when the recession is over, they'll migrate to FastCGI, and then sell the old hardware at a profit (assuming Sun and Intel go bankrupt). That'll look beautiful on the balance sheet. CLEVER!
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    30. Re:Oh my god! by Anonymous Coward · · Score: 0

      Short != understandable. To me, the PHP syntax is far more readable than the shorter Perl equivalent.

    31. Re:Oh my god! by Anonymous Coward · · Score: 0

      As a PHP programmer, I can say that is is perfectly readable. And futhermore, I recognize it at a glance because that's the only way that it can be done.

      Sure, it's not pretty. It's definately not concise. And it has a lot of excess work compared to Perl, which was designed to do this sort of thing. But the point is that anyone who is comfortable with PHP can glance at it and know precisely what it does.

      Give two good PHP coders the same task, and then force them to switch to each other's source code halfway through. Now try it again with two Perl wizards. $50 says the PHP guys finish first.

    32. Re:Oh my god! by Sycophant · · Score: 1

      The point with PHP is that it was designed, from the ground up, for web programming. It is optimised for this and the vast majority of the tools within it (with the obvious exceptions of the Ncurses functions and PHP-GTK) are designed with this in mind.

      I personally don't think PHPs adoption as an all around scripting language is a good thing as it will result in PHP becoming less focused on web applications and more of a general scripting language.

      We don't need every programming language to do everything. I know it is simple for people as they only need to stay current with one language, but I think that various languages have their strengths and they should not be diluted by being applied to every possible application.

      Of course, that is just my opinion, and people are more than welcome to make PHP shell scripts, or GTK apps for that mattter.

    33. Re:Oh my god! by vsync64 · · Score: 1
      #!/usr/bin/php works just like the Perl alternative. I would even challenge someone to write something in Perl that cannot be done in PHP.

      Yes, Mr. Turing, we're very impressed with your work, and we're really sorry about that apple business and all, but we already figured this out...

      --
      TO BUY A NEW CAR WOULD MAKE YOU SEXUALLY ATTRACTIVE.
    34. Re:Oh my god! by Anonymous Coward · · Score: 0

      Won't somebody please think of the children!

  2. Oh no! by sisukapalli1 · · Score: 1, Flamebait

    No XML, J2EE Engines and the like? Afterall, simple PHP?

    Would the PHB's like it?

    S

    1. Re:Oh no! by mr_z_beeblebrox · · Score: 5, Funny

      Would the PHB's like it?

      engineer:this is a rare opportunity phb: hmm?....
      engineer: PHP is not yet a buzz word...we can set the market, indicators would rise, indexes improve, shareholder confidence would surge!
      phb: WOW! I want PHP!
      Jr. Engineer: What did all that stuff you said mean?
      (clever)engineer: With Y having nearly 11M lines of code to rewrite in a new language....it means job security (and we still don't have to wear a suit)

    2. Re:Oh no! by rseuhs · · Score: 2
      Actually "PHP with Zend optimizers" sounds as great as "J2EE Engine with XML support" in the ears of PHB's.

      But that's probably the reason for choosing PHP over Perl, 3-letter acronyms are hard to beat. ;-)

      (Just kidding, I prefer PHP over Perl myself. And it's not because of the name)

    3. Re:Oh no! by Anonymous Coward · · Score: 0


      J2EE (and Java) were only recently ported to FreeBSD (yahoo servers). Like the slide says, J2EE needs good thread performance and FreeBSD (like Linux) aint got it.

  3. hmm... by seann · · Score: 2, Funny

    *applys for a job*

    --
    I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
    1. Re:hmm... by Anonymous Coward · · Score: 4, Funny
      *applys for a job*
      Be sure to spell check your resume before your applys. ;)
    2. Re:hmm... by Anonymous Coward · · Score: 0

      before your applys. ;)

      and your grammEr ... to be continued :)

  4. Who's next... by Da+Fokka · · Score: 1

    Slashdot? :)

    I know, I know, probably not.

    1. Re:Who's next... by ceejayoz · · Score: 2

      PHP-Nuke? No thanks... PostNuke (a PHP-Nuke fork) is far superior - instead of one developer, it's an OSS project... lots of features and less bugs than the original.

    2. Re:Who's next... by tzanger · · Score: 3, Insightful

      UGH

      PHP-Nuke, PostNuke and all variants are an exceedingly AWFUL way to share info -- click here, click there, stupid avatars, no threading, no straightforward text interface, searching rarely works properly, themes, ads, smileys, animations and more crap than you can shake a stick at.

      Give me newsgroups or a mailing list. But please no PHPNuke or derivatives.

    3. Re:Who's next... by Anonymous Coward · · Score: 0

      Hell. yes.

    4. Re:Who's next... by Anonymous Coward · · Score: 0

      ah, why would /. need to recode in php when they could just use phpslash...

    5. Re:Who's next... by Katalyzt · · Score: 1

      yeah but don't it look purty :)

      --
      version 0.0002
    6. Re:Who's next... by Beliskner · · Score: 2
      PHP-Nuke? No thanks... PostNuke [postnuke.com] (a PHP-Nuke fork) is far superior - instead of one developer, it's an OSS project... lots of features and less bugs than the original
      These guys at PostNuke don't seem to agree that PostNuke is very good. Random malfunctions? Degradation over time? Just because it's OSS doesn't mean it's good - if Alan Cox or Torvalds was coding it then maybe, but let's face it - an Ethiopean kid getting shot at can write OSS in one line of Perl and call it whatever he likes.
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    7. Re:Who's next... by ceejayoz · · Score: 2

      Never said it was perfect, did I?

      I've never encountered random malfunctions or degradation over time, but there are certainly a number of bugs in each release that one has to squash. That said, it's a good system for someone who doesn't know much PHP yet. I've moved off Postnuke to my own custom scripts, but Postnuke (and PHP-Nuke before it) were very helpful in getting started with PHP.

  5. Perl was ruled out WHY??? by Blimey85 · · Score: 1

    I'm not understanding the reasoning behind choosing php over perl. Maybe it's just me but I've found perl to be a more secure and easier to maintain for larger projects than php.

    --
    How is it that one careless match can start a forest fire, but it takes a whole box to start a campfire?
    1. Re:Perl was ruled out WHY??? by inerte · · Score: 5, Informative

      I'm not understanding the reasoning behind choosing php over perl

      You haven't read the article. There's a whole page for "Why not Perl?"

    2. Re:Perl was ruled out WHY??? by glwtta · · Score: 2
      and easier to maintain for larger projects than php.

      I agree, I just thought I'd point out that this doesn't change the fact that perl is HELL to maintain for larger projects :)

      --
      sic transit gloria mundi
    3. Re:Perl was ruled out WHY??? by tomhudson · · Score: 3, Insightful
      If you read the slides in the presentation, much of the site was custom c/c++ code. PHP syntax is very c-like, so it's an easier fit.

      Besides, I hate the greedy matches when doing regexps in perl, and I know most people coming from a C/C++ background will have the same dislike.

    4. Re:Perl was ruled out WHY??? by ceejayoz · · Score: 5, Informative

      Quoth the link:

      Cons
      - There's More Than One Way To Do It
      - poor sandboxing, easy to screw up server
      - wasn't designed as web scripting language

    5. Re:Perl was ruled out WHY??? by rseuhs · · Score: 3, Insightful

      Why should Perl be "more secure"?

    6. Re:Perl was ruled out WHY??? by arthurs_sidekick · · Score: 1

      Ever heard of Taint checking?

      Also this "lack of sandboxing" displays an ignorance of, e.g. the Safe module.

      This is not to detract from PHP's strides in various areas, but Perl has a few tricks up its sleeve and its performance whas at least comparable with PHP's.

      --
      "Oh, I hope he doesn't give us halyatchkies," said Heinrich.
    7. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 1, Insightful

      that's what the non-greedy regexp modifier was made for. read the fucking manual.

    8. Re:Perl was ruled out WHY??? by jqcoffey · · Score: 1

      It's not as if Perl syntax is all that FAR from C/C++. In fact, when coded correctly, it looks amazingly similar.

      I'm no PHP guru or anything, but the usability value of mod_perl and programming with perl modules in general would seem to outweigh pretty much any benefit PHP provides, unless of course they want to use the Zend IDE's.

      -Justin

    9. Re:Perl was ruled out WHY??? by Dog+and+Pony · · Score: 2

      I was going to say the same about security, then I realized that it is unlikely that Yahoo is sharing servers with someone else... in that case, they may have a point. Perl isn't necessarily *more* secure than PHP on a single server. It is, however, *very* secure. If you wish it to be. One problem may be that Perl lets you be as insecure as you like... well, that goes for most languages I guess. But Perl is very powerful, and with great powers come great responsibility. It might be good to choose something with less horsepowers too... ;-)

      What I don't understand is how they can think that mixing HTML and code as the default would make it easier to maintain. Most Perl-HTML stuff encourages separation of data, code and presentation, while PHP kinda enforces everything mixed up. In both, you can do it the other way around though.

      Perl would seem a much better and more powerful choice to me, but I suppose they had specific reasons in this specific situation.

      As long as they didn't choose ASP (or J2EE, for that matter), I'm happy. And so are they. :)

    10. Re:Perl was ruled out WHY??? by WatertonMan · · Score: 2

      There is always Python. Wasn't one of the larger Yahoo-like services done in Python? I can't recall which one though.

    11. Re:Perl was ruled out WHY??? by kriston · · Score: 1

      Taint checking? Scratch and sniff?

      Kris

      --

      Kriston

    12. Re:Perl was ruled out WHY??? by semanticgap · · Score: 1

      Yahoo maps used mod_python according to the slides.

    13. Re:Perl was ruled out WHY??? by shiflett · · Score: 2, Insightful

      More secure?

      See, this is where I cannot help but assume that you are inexperienced. If you think a language can make your applications more secure, then you have a fundamental misunderstanding about developing Web applications.

      As for maintaining large applications, I can tell you that with proper software architecture employed, PHP is going to be plenty easy to maintain. When you look at the big picture, you need an application that new employees can contribute to after the shortest amount of training possible. Can you honestly tell me that Perl has an advantage here?

    14. Re:Perl was ruled out WHY??? by xneilj · · Score: 1

      If you look at the presentation, you'll see the current site already consists of 3 million lines of perl code (on top of the 8M C/C++), so clearly they ARE using perl, and think they can improve things...

      --
      rm -rf / is the evil of all root
    15. Re:Perl was ruled out WHY??? by madshot · · Score: 1
      probably because the average computer user with some sense of programming can figure out php. Now, try to get the average computer users (non-unix) to spell PERL and then figure out that 'hello world' is more than just "echo 'hello world';"

      PERL is a POWERFUL language, but a person with a "learn PHP is 24 hours" book can do it and they can write applications that work (may not be 100% secure). But people with a "learn PERL in 24 hours" can't figure out how to do a chmod to the file in order to get apache to run it.

      in simple, PERL is too complicated for the average person, maybe Yahoo! needs something that anyone can figure out :) or maybe it has something to do with their new web hosting thing. who knows..

      --
      Obama = Socialism.
    16. Re:Perl was ruled out WHY??? by tzanger · · Score: 5, Insightful

      I agree, I just thought I'd point out that this doesn't change the fact that perl is HELL to maintain for larger projects :)

      Bullshit, or at least bullshit that Perl makes it harder to maintain than any other language.

      Code properly, document correctly and adhere to the same design rules for any other maintainable project (which includes firing the assholes who think that obfuscated perl has a place in a maintainable project) and you will have no more difficulty in maintaining a Perl project than you will any other.

      The fact that perl lets you create a mess may be open to debate, but it certainly doesn't mean it will be a mess.

    17. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0

      It seems you can't spell it either. There is no such thing as PERL. Perl is the language, perl is the interpreter. RTFFAQ.

    18. Re:Perl was ruled out WHY??? by russellh · · Score: 2, Funny

      Perl || die

      --
      must... stay... awake...
    19. Re:Perl was ruled out WHY??? by gomoX · · Score: 1

      Nope.
      When talking about language's security we talk about security in mod_perl, mod_php and their implementations.
      You wont be able to hack much if you base yourself on bugs on the web apps. You'd better go for the true software.
      Anyway, PHP roolz and IS more secure than perl for web applications, basically because *that* is what it was designed for: WWW.

      --
      My english is sow-sow. Sowhat?
    20. Re:Perl was ruled out WHY??? by consumer · · Score: 2
      Besides, I hate the greedy matches when doing regexps in perl, and I know most people coming from a C/C++ background will have the same dislike.

      Perl added a non-greedy matching operator several years ago.

    21. Re:Perl was ruled out WHY??? by Jim+McCoy · · Score: 2

      The slides mention that Y!Maps was done in Python, but the slides also conveniently did not mention that all of YahooMail was done in Python. Given that the ability of non-CS types to create code was a requirement as well as the ability to maintain code for large, multi-person development projects I am surprised that Python was not among the possibilities examined by this particular group (unless, of course, the outcome was already pre-determined before the "test" was conducted :)

    22. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 1, Insightful

      That's not totally true. Don't get me wrong, I love Perl, I use it almost every day for all sorts of things.

      I do have first hand experience with non-trivial Perl projects though and I can say they are much more difficult to maintain. Everyone who writes Perl seems to have their own style which makes the code very difficult to follow. Even with very good coding guidlines there are just so many normal things you do in Perl that make the code hard to follow.

      I use and like both PHP and Perl though. I probably write more Perl than PHP.

    23. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0
      Cirdy, I think he's referring to buffer overflows and PHP; which is something that hasn't been as much of a problem with Perl.

      But I fully agree with you about maintainance. Give me PHP any day for big sites.

    24. Re:Perl was ruled out WHY??? by glwtta · · Score: 3, Interesting
      Bullshit, or at least bullshit that Perl makes it harder to maintain than any other language.

      Undisputed. But there are languages that go out of their way to make it easier and perl doesn't. Not a criticizm of perl necessarily, just another point in the decision making process.

      I personally love perl - I use it every day and it's usually one of the first technology choices for new projects. But coding in a team environment is often still a very hard thing (not every one out there is that great at doing the wonderful things you listed, and firing people left and right is often not an option), and I'll take all the help I can get there.

      --
      sic transit gloria mundi
    25. Re:Perl was ruled out WHY??? by mcjulio · · Score: 1

      Or you could use the slightly lower precedence operator or in this context, to avoid any possible order-of-operations bugs.

    26. Re:Perl was ruled out WHY??? by starX · · Score: 3, Insightful

      Amen, I've had a professor who would churn out C code for the example projects that would curl your hair, and refused to even consider Perl as a programming language because he thought it was an awful mess.

      Perl lets you make messy code, and relies on the programmer to actually be responsible in churning out something that anyone who knows the language can pick up and read. Sure, making one liners on the fly to get something done is a neat ability, but IMHO, a good programmer will ADD the extra few lines of code for the sake of readability when readability is an issue.

    27. Re:Perl was ruled out WHY??? by puppetluva · · Score: 2
      I read the article too, and I'm baffled.

      HTML::Mason / Perl fit every criteria they had perfectly. (Including allowing them to keep their 3 million lines of perl code untouched) .Here is how I'd address the concerns:

      • There's more than one way to do it. Unless this is a coded way of saying "Perl is messy", I dont' understand why this is a con. PHP is based off of perl and has similiar issues.
      • Poor sandboxing, easy to screw up server. HTML::Mason takes care of this.
      • wasn't designed as a web scripting language. This is true, but it turns out that it can do web-scripting AND back-end processing well. One language for everyone to learn. PHP is enough like perl to confuse all of the backend people when they need to switch gears.


    28. Re:Perl was ruled out WHY??? by ftobin · · Score: 3, Informative

      Here are some key things which make Python much easier to maintain than Perl:

      • named arguments
      • exceptions thrown if called with inappropriate number or wrongly named args (I forget the technical term)
      • strongly typed
      • real exception model
      • base calls throw exceptions (e.g., array out of index)
      • docstrings

      And here's a killer:

      • a much better ability to 'analyze' language constructs (e.g., pydoc)
    29. Re:Perl was ruled out WHY??? by ralphbecket · · Score: 2

      Of course, you could always use a real language that enforced coding discipline.

      Why do some programmers insist that its more important to be able to lash up buggy code in an eye blink than to write maintainable, bug free code in the first place? Is debugging and maintenance time somehow cheaper?

    30. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0

      A properly designed PHP application uses templates or something like it.

    31. Re:Perl was ruled out WHY??? by KidSock · · Score: 1, Flamebait

      The fact that perl lets you create a mess may be open to debate, but it certainly doesn't mean it will be a mess.

      The Second Law of Themodynamics suggest that you will be proven wrong.

    32. Re:Perl was ruled out WHY??? by Cromac · · Score: 1

      A whole page? Your reply was longer than their 3 line response to the cons of using Perl. - There's More Than One Way To Do It - poor sandboxing, easy to screw up server - wasn't designed as web scripting language

    33. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      The Second Law of Themodynamics suggest that you will be proven wrong.

      This isn't physics; it's programming. As a NSPHB (not so pointy-haired boss) I can eliminate people who do not have the discipline to code cleanly, irrespective of the language.

    34. Re:Perl was ruled out WHY??? by vadim_t · · Score: 2

      Named arguments can be done in Perl, as well as checking their amount and correctness. In fact, I've got a little module just for that. You call the function like this:

      function(foo=>'value', bar=>1);

      it dies if a required parameter is missing, or has a wrong value.

    35. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      Of course, you could always use a real language that enforced coding discipline.

      What, like Python, where my indentation is part of my structure? Take that and shove it up your ass, I decide how code shall look, not the language. Or rather, I will choose a language to code in that I am comfortable with, not the opposite.

      Why do some programmers insist that its more important to be able to lash up buggy code in an eye blink than to write maintainable, bug free code in the first place? Is debugging and maintenance time somehow cheaper?

      Why do some people think that strong typing, forced formatting and other insanities are any substitute for well-disciplined programmers? I'll gladly pay for a good programmer rather than try and figure out the algorithmic nightmares some people toss off, even in strongly-typed languages.

    36. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      And here's a few reasons why I'll never have a Python project in my office:

      • forced formatting
      • forced formatting, and
      • forced formatting

      Furthermore, strong typing doesn't help you write better algorithms. Coming from a strong C background, I see no problems with typecasting away to different data types as I see fit. Of course, you have the opportunity to shoot yourself in the foot, but that's one of the risks you take when you carry a gun instead of a textbook. (I'm not ripping on Python's ability to do real work, as that is not the case.)

      Honestly, I don't know what people think is such a great deal about strong typecasting. I use perl's strict mode, full warnings and taint as a default -- but then I code my Perl to a much higher standard than the script kiddies.

    37. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      I do have first hand experience with non-trivial Perl projects though and I can say they are much more difficult to maintain. Everyone who writes Perl seems to have their own style which makes the code very difficult to follow. Even with very good coding guidlines there are just so many normal things you do in Perl that make the code hard to follow.

      I too have first-hand experience with non-trivial Perl projects -- maintain control, hire disciplined people, and there is no problem. The same is true for practically any language.

      Let's face it -- you need the discipline to write good software period -- why not use a language that you can pull out the stops with when its necessary?

    38. Re:Perl was ruled out WHY??? by khuber · · Score: 0, Redundant
      Especially since he's bitching about it you'd think he could type "greedy regex perl" into Google. God.

      -Kevin

    39. Re:Perl was ruled out WHY??? by ftobin · · Score: 2

      Does it also die if it has an 'extra' key? Also, does it allow you to mix ordered arguments and named arguments at the user's discretion? I'm aware of the common Perl practice for sending in args via a list interpreted as a hash; however, it isn't quite the same or clean as what you can do in Python:

      function('foo', 'bar', an_arg='baz', another=4)

    40. Re:Perl was ruled out WHY??? by russellh · · Score: 1

      I think I have order-of-operation bugs in my house. They are best avoided, that's for certain.

      --
      must... stay... awake...
    41. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0

      Get over with the idea that these concepts are widely accepted as Perl's cons. And a big "no-no" when designing large application.

      There's More Than One Way To Do It means: The folks I hired are less efficient.

    42. Re:Perl was ruled out WHY??? by ftobin · · Score: 2

      ML is actually a great example of strong typing: Strong Typing and Perl (Strong Typing Doesn't Have to Suck)

    43. Re:Perl was ruled out WHY??? by vadim_t · · Score: 1

      It can die, or it can not depending on how it's used. It allows mixing too if done at the beginning:

      function('foo', 'bar', an_arg=>'baz', anoter=>4); # works
      function('foo', an_arg=>'baz', 'bar', anoter=>4); # doesn't work

      It works only with a fixed number of unnamed arguments. I normally use an unnamed argument for the main parameter, and the rest as named ones. For example:

      open_file('foo.html', mode=>'read');

      When well planned this lets me extend the function without having to replace every call to it in the source.

    44. Re:Perl was ruled out WHY??? by ftobin · · Score: 2

      It can die, or it can not depending on how it's used.

      Being guaranteed to die or throw an exception is almost a must. The user needs to know immediately if he violated the function's signature. Not dying is just as bad as accessing non-existing hash keys and getting undef instead of an exception being thrown, IMO.

      function('foo', an_arg=>'baz', 'bar', anoter=>4); # doesn't work

      Doesn't work in Python either, of course. All varargs must come before kwargs.

      It works only with a fixed number of unnamed arguments.

      With Python the user of the function gets to decide how many arguments are specified by position, and which by naming.

    45. Re:Perl was ruled out WHY??? by ftobin · · Score: 2

      Statically-typed languages (e.g., Eiffel) are easier to maintain than dynamically-typed ones (e.g., Perl, Python), for they are self-documenting.

    46. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0

      And yet you can't eliminate your own mental masturbation. Somewhat ironic.

    47. Re:Perl was ruled out WHY??? by DahGhostfacedFiddlah · · Score: 1

      "There's more than one way to do it"

      If you look at the bottom panel, it gives a more detailed explanation. The problem is that with so many different coding styles, it's hard to keep developers all on the same base. It's not an insurmountable problem, but it's probably a lot easier to keep new recruits writing within the accepted guidelines when there *is* only one way to do it.

    48. Re:Perl was ruled out WHY??? by vadim_t · · Score: 1

      The exception thing is left to whoever implements the function. And with the Carp module you can make it look like it bombed in the function call and not inside the function.

      What it does is read and remove data from a hash. If after all the known arguments have been removed something remains it can produce an error. But that's left to the function's programmer to decide.

      Making it mandatory everywhere in Perl is completely impossible. Due to how arguments are passed it'd make some things really icky. For example you'd be forced to use always references. Maybe it's not perfect, but I got used to it, and anyway in any project of a respectable size you have to establish rules and conventions, so this issue can be easily avoided.

    49. Re:Perl was ruled out WHY??? by ceejayoz · · Score: 2

      HTML::Mason / Perl fit every criteria they had perfectly.

      Well, obviously it didn't. The "Why not Perl?" slide even includes the Mason logo - they considered it and ruled it out.

    50. Re:Perl was ruled out WHY??? by Metrol · · Score: 2

      I am surprised that Python was not among the possibilities examined

      I would think the same reasons that ruled out Perl would also impact Python. Neither were designed specifically with the web in mind.

      This aspect of PHP more than anything else is probably the primary consideration of a lot of PHP zealots out there... myself included. This doesn't detract in the least from where both Perl, Python, Ruby, or similar langauges shine. It's just that PHP is the only true programming language that I know of that has this kind of dedicated focus to the web.

      No, I don't count Cold Fusion either. Closed source, and support tentative on whether or not Macromedia can still pull a buck out of it. Not a warm fuzzy place to be for a project as large as Yahoo.

      --
      The line must be drawn here. This far. No further.
    51. Re:Perl was ruled out WHY??? by Metrol · · Score: 2

      PHP is based off of perl and has similiar issues.

      Umm, time for a wee history lesson.

      The original PHP that Rasmus Lerdorf wrote back in '95 was written in Perl. The second version was written in C as more folks started contributing to the project. By the time version 3.0 hit the net, it hardly resembled anything looking like PHP 1.0.

      PHP's roots do go back to Perl, but that's where the story begins and ends. The whole point was to take a different direction from what Perl was doing, and to utilize a C based structure in the process.

      Today, PHP's resemblence to Perl stems from 2 things. Both are roughly C based in their structure and PHP has a number of functions that emulate similar ones found in Perl. Mostly regexp kinds of functions.

      Bottom line, you're not going to take a PHP programmer, sit him/her down to an editor and expect Perl to come flowing out. Each language has a very different approach to how to go about doing things.

      --
      The line must be drawn here. This far. No further.
    52. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0

      "I'm not understanding the reasoning behind choosing php over perl."

      Why do people type/speak like this? Why not just say "I don't understand the reason behind..."

      Sorry, I know this is OT, but it's a pet peeve of mine. Aaargh!

    53. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      Furthermore, strong typing doesn't help you write better algorithms.
      Just because you don't like compile errors doesn't mean that you should ignore them.
      Coming from a strong C background, I see no problems with typecasting away to different data types as I see fit.
      Then shut up and write drivers like you're supposed to, at 10milLOC trust me, compile errors are a GOOD THING! The alternative is a rare runtime error when you enter seldom-used code sections (remember programs spend 90% of time in 20% of code, so 80% of your code is effectively untested for runtime ERRs)
      Of course, you have the opportunity to shoot yourself in the foot, but that's one of the risks you take when you carry a gun instead of a textbook
      In team programming, the difference is that other programmers shoot you in *your* foot
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    54. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      And here's a few reasons why I'll never have a Python project in my office:
      forced formatting
      Dude, even machine code has forced formatting - OPCODE, then optional DATA DWORD (whatever).

      I tell you what - format your machine code freely and I'll not complain, but your CPU will (in an abstract sense).

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    55. Re:Perl was ruled out WHY??? by tomhudson · · Score: 2
      I always RTFM (read the fine manual), have a whole bunch of them. My point was that regexps are non-intuitive for C/C++ programmers making the transfer to a scripting language. RTFC (read the fucking^H^H^H^H^H^Hfine comment)

    56. Re:Perl was ruled out WHY??? by Priyadi · · Score: 1

      >Besides, I hate the greedy matches when doing >regexps in perl, and I know most people coming >from a C/C++ background will have the same >dislike.

      Um, I thought almost all regexp implementations use greedy matches, including ereg_* functions in php. And maybe the first implementation that allows non greedy matches as well as greedy matches is perl. CMIIW.

    57. Re:Perl was ruled out WHY??? by tomhudson · · Score: 2
      Look, it's not as if I don't use perl on a daily basis. I use the non-greedy regexp in some of my perl code that generates php scripts that embed javascript (a bit convoluted, but it works for me). The article was about Yahoo! moving from custom C/C++ cgi to php as opposed to perl.

      They did consider perl, and rejected it because the language is (and I quote from "Programming Perl" 3rd ed. page 4) "...on the other hand, the camel has not evolved to smell good. Neither has perl" - non-orthogonal.

      It's kind of rank around the edges, but it gets the job done in many cases. However, for someone switching from C/C++, php is easier. This is why perl was ruled out, as the article pointed out.

    58. Re:Perl was ruled out WHY??? by tomhudson · · Score: 2
      grep, the "global regular expression parser", which implemented regexps before perl, isn't greedy.

      What I think you're referring to is PCREs, perl-compatible regular expressions. To be compatible, they have to implement greediness by default.

      Look, it's not a holy war. My original comment was about how, for C/C++ programmers (which was what the engineers at yahoo were), it's easier to switch to php than to perl.

      A good example - the obfuscated perl contest. It's far easier to obfuscate perl than php.

      PS: I use both on a daily basis (week-ends excepted)

    59. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      probably because the average computer user with some sense of programming can figure out php
      Ahhhh, you touch on a fascinating fundamental concept. McDonalds used to be an expensive restaurant using skilled chefs in the '50s, then they simplified their products so that a production line consisting of a large number of unskilled workers (not chefs) could make the food. Obviously they were succesful.

      In parallel, PERL requires expert coders to code and maintain an 8milLOC PERL script. Perhaps PHP by simplification and syntax-enforcement requires more LOC, but this improvement allows a large number of semi-skilled MCSEs to maintain the script. This should decrease the maintenance cost, but will result in some redundant Perl gurus.

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    60. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      Just because you don't like compile errors doesn't mean that you should ignore them.

      I don't follow. All my perl code executes with -wT and strict mode. When I have to do strange things like call subroutine by reference, I turn off the specific strict-mode bit. So my perl is less good because...?

    61. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      The script runs until the error appears, that's the problem. If you're writing to a logfile, or multiple synchronised files (e.g. writing to a flat-file with a seperate hash index file) and your Perl script hits an invalid variable after writing to one file but before writing to the other, then you have an inconsistency on disk (BAD!). With C++ this would be caught at compile-time

      The use of -wT only works in the smallest scripts. A 9 milLOC script would generate thousands of warnings, tempting you to ignore them, which makes the first argument doubly important as now you have to port the entire script to a compilable language like C++ or Java.

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    62. Re:Perl was ruled out WHY??? by Christianfreak · · Score: 2

      Perl isn't any harder than any other language to code with in a team as long as CVS (or other revision system is used) and a common set of programming rules are set up for the team and commenting is done at least to some extent. It works, I've done it.

      As far as PHP, I use it because i'm required to for my job, however I think its namespace issues are a mess. I can't say it enough times: I_really_hate_typing_function_names_that_go_on_for ever()

      With perl that function is in a package and you assign it an object variable or import what you need into the namespace.

      And what is this garbage about Perl having longer development times? I had a long discussion in person with someone on this very subject recently. "Perl takes so much more code than PHP". Has no one even heard of CPAN??? There are pre-built functions for everything, frankly I've found the opposite problem with PHP. With Perl I can find a CPAN module to do what I want. Ever tried parsing HTML in PHP? -- actually parsing it not striping it out. Or intense date manipulation? Sure some of this stuff has been written but its a pain to find and nothing is tested so if doesn't work half the time and then you can't easily install modules that can be used everywhere.

      PHP has horrible interpolation, regexes you have to call a function? Good date parsing is non-existant (sure you can display them but what about adding them and subtracting? And don't give tell me that you can convert them to UNIX timestamps and then add ... yeah daylight savings time breaks that.) And requiring or including modules is braindead if you can't include the same module twice (like if one is in one file and on is in another), gives you an error. Also for web apps it's nearly impossible to completely separate HTML from the actual code.

      Everytime I do PHP I feel like someone complained about lack of X function and so it was just slapped in rather than carefully thought out. With no way to really extend the language without dumping crap into the core. Perl is elegant and functions make sense and objects make sense. It has basic stuff in the core language and you call modules with the extensions you need.

      To stay on topic in my personal opinion Perl is far easier because it doesn't try to hold your hand, that's what the man page is for, not to mention the countless resources on the web.

    63. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      The use of -wT only works in the smallest scripts.

      Bullshit. Complete and utter bullshit. You don't inherit 9M-LOC of Perl and THEN put -wT on it, you start with 10 LOC and use -wT from the start, eliminating the warnings as you go. I've got perl scripts thousands of lines long, across multiple files and modules, all with use strict and -wT. Not a single warning. Discipline, it's what I stated from the start.

      Now your comment about "run until error" -- Isn't that what testing with the "million monkeys" data input method is all about? I don't care what language you use, you can't catch runtime errors at compile time.

      Now as far as catching syntactical errors at compile-time: you're absolutely correct. Without having a way for Perl to run over every single line beforehand, there is no way to do this. It is a downfall, IMO.

    64. Re:Perl was ruled out WHY??? by glwtta · · Score: 2
      Perl isn't any harder than any other language to code with in a team as long as [...] a common set of programming rules are set up for the team and commenting is done at least to some extent. It works, I've done it.

      Well yeah, but it's the "as long as" part that's more difficult. No one said it was impossible, just more difficult, mostly because there is such variety in perl coding styles. Like I said, not everyone is as good at doing those things in a team environment as we might like them (or ourselves) to be. That doesn't mean that they are necessarily bad programmers and should be shot, but that perhaps Perl isn't the best language to learn these things on.

      As far as Perl vs. PHP my personal (un-PC) stance is that Perl wins hands down for pretty much everything, so I guess that part of your post wasn't related to mine.

      --
      sic transit gloria mundi
    65. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      Bullshit. Complete and utter bullshit. You don't inherit 9M-LOC of Perl and THEN put -wT on it, you start with 10 LOC and use -wT from the start, eliminating the warnings as you go
      If there were more people like us during the dot-com boom, it might still be going. Ah well, it's all about team efforts nowadays, using Bridge software architecture methodology and all that. When coding Perl as part of a large team, there's always one that hacks out his code so poorly that his code works only on Fridays, and when the Environment table is deleted, and with glibc-0.0.12 because he calls the C API directly which buffer overflows somewhere. -wT and use strict were forgotten long ago. How can I integrate his code into the project? In team coding, it all falls to the lowest common denominator - the sloppiest coder, and thanks to corporate-wide hiring freezes while the CEO plays golf until the recession is over, he's irreplacable. Nice.

      So do you turn on use strict and -wT, or do you decide not to grovel to your boss and install the unstable script? Afterwards, you can blame Perl and recommend switching to PHP. Explains a lot, eh?

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    66. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      use -wT from the start, eliminating the warnings as you go. I've got perl scripts thousands of lines long, across multiple files and modules, all with use strict and -wT. Not a single warning. Discipline, it's what I stated from the start.
      Were you ever in the army?
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    67. Re:Perl was ruled out WHY??? by Anonymous Coward · · Score: 0
      As a NSPHB (not so pointy-haired boss) I can eliminate people
      Is this like the Dilbert sketch where Dilbert is sentenced to death by Catbert? Don't let the power get to your head, now...
    68. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      If there were more people like us during the dot-com boom, it might still be going.

      heh, I don't know if I'd go that far... There were a lot of things wrong with the dot-com boom.

      When coding Perl as part of a large team, there's always one that hacks out his code so poorly that his code works only on Fridays, and when the Environment table is deleted, and with glibc-0.0.12 because he calls the C API directly which buffer overflows somewhere. -wT and use strict were forgotten long ago.

      The key is not to let it get "long ago". Bi-weekly (mini) code reviews and constant interaction are important to prevent bad code from affecting a codebase in any language.

      This is all, of course, horses for courses. We can hand-wave and hypothesize (sp?) forever and not get anywhere.

      So do you turn on use strict and -wT, or do you decide not to grovel to your boss and install the unstable script? Afterwards, you can blame Perl and recommend switching to PHP. Explains a lot, eh?

      I've been lucky; I have been given the power to eliminate lousy coders who won't at least try to maintain some semblance of good coding methods, and I've been given the power to delay some things in order to make sure they are done right so that the future won't take twice as long. Others aren't so lucky.

    69. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      Were you ever in the army?

      I smile as I read this, because I don't think I'd ever fit in to an organization where I was to follow a command chain and (potentially) not know why. I've never been on an army base, although the RCF often stop by at the McDonald's in my town on their way to Borden, Ontario.

      I don't know -- perhaps I'm a self-riteous pissant who takes "my way or the highway" too seriously, but I put a lot of forethought and research into a decision and become very rigid on the implementation. It doesn't mean I won't move from it, but rather that there has to be a damned good reason to move away from what I'd set out in a project. If I'm proven wrong, I'll correct it and my belief in the new method will be no less strong than my belief in the old method was (until it was shown incorrect, that is.) :-)

    70. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      Bi-weekly (mini) code reviews and constant interaction are important to prevent bad code from affecting a codebase in any language
      Sometimes he has to tell me which language he's coding in, it's that bad.
      I've been lucky; I have been given the power to eliminate lousy coders who won't at least try to maintain some semblance of good coding methods
      You don't know how lucky you are. Guess what - due to the recession the software company I work for is diversifying into catering. That's gonna be interesting, having hot food prepared at the other end of this room while we sit here and code. Actually it's possible that'll be torture for us, hmmmmmm.... I wonder if that's happening to lots of companies these days - turning to completely different products. Instead of cooking up Perl/Java, I can cook up a Chow Mein.
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    71. Re:Perl was ruled out WHY??? by ralphbecket · · Score: 1

      It's rather telling that the first thing you think of in connection with coding discipline is concrete syntax and Python and not, say, strong, powerful type systems, enforced modularity, declarative clarity and so forth.

      As for your comment about hiring disciplined programmers, well, it's banal. And yet you present it as though it supported some point against strongly typed languages.

      Having written that, I don't know why I'm bothering to reply to you.

    72. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      Sometimes he has to tell me which language he's coding in, it's that bad.

      Any way to relegate him to less important tasks to build his skill level up?

      Guess what - due to the recession the software company I work for is diversifying into catering

      You're joking -- where do you work?

    73. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      It's rather telling that the first thing you think of in connection with coding discipline is concrete syntax and Python and not, say, strong, powerful type systems, enforced modularity, declarative clarity and so forth.

      I'm not sure how you're piecing together my view of programming dos and donts and then attacking Python with them, but let me try to clarify:

      • I like programming
      • over the years, I've developed a certain style
      • Python makes me break that style through forced formatting, so
      • I am not a fan of Python
      I never said Python was a bad language.

      As for your comment about hiring disciplined programmers, well, it's banal. And yet you present it as though it supported some point against strongly typed languages.

      I'm not trying to be unique. I have a higher standard for hired programmers than many others it seems. I'm not sure what your point is.

      As far as disciplined programmers not needing strongly typed languages: it's true. It doesn't mean that disciplined programmers won't use strongly typed languages or won't like them. I don't ever recall saying anything to the effect of "I use disciplined programmers so I don't need strongly typed languages," but rather "I don't like strongly typed languages, so I hire disciplined programmers." It's a significant difference.

      Having written that, I don't know why I'm bothering to reply to you.

      Indeed.

    74. Re:Perl was ruled out WHY??? by tzanger · · Score: 1

      Statically-typed languages (e.g., Eiffel) are easier to maintain than dynamically-typed ones (e.g., Perl, Python), for they are self-documenting.

      Depends on what you want from your documentation, I suppose.

    75. Re:Perl was ruled out WHY??? by Beliskner · · Score: 2
      Any way to relegate him to less important tasks to build his skill level up?
      I wish
      You're joking -- where do you work?
      Nope, London, England
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    76. Re:Perl was ruled out WHY??? by WatertonMan · · Score: 2
      But what does PHP do that Python can't? I admit that for having your code interspersed in your HTML rather than as separate files then PHP makes sense. However for other applications I'd think that PHP loses some benefits. While I can think of reasons I'd not want to use Perl, Python doesn't share those problems.

      After all the problem isn't what a programming language was designed *for*. It is how well it does a project. If someone judges a language based upon the origins of that language then I think they are being silly. It's like complaining about FORTH languages because they were designed for astronomy and robotics.

    77. Re:Perl was ruled out WHY??? by Metrol · · Score: 2

      But what does PHP do that Python can't?

      I'm honestly not up to speed enough on Python to say. I believe it is fair to say that Python presents itself as a general purpose language for use in a wide range of uses. PHP doesn't. It's a language with a set of commands that are very focused on creating web applications.

      To your point, PHP definitely does lose benefits stepping outside the realm of the web. It generally isn't meant to go there. With that in mind, I guess I'd have to toss the reverse question back at you.

      What does Python do specifically for web applications that PHP doesn't?

      For how I use PHP, I don't believe Python would be as suitable, but again I must disclaimer this with my ignorance of the language. PHP's native ability to process forms, integrate Apache environment variables, and even the ability to set PHP run time attributes directly within a .htaccess file are a few things off the top of my head that make PHP a stonger candidate for this type of application writing.

      Where as I'm sure Python may very well be able to do these things, PHP has this stuff natively entrenched into it's core. In Python, I would think you would not want this kind of native web server support for a general purpose language.

      I do realize that both Python and Perl have tons of extensions and modules that provide for both web and database interaction. PHP has this stuff built in from the ground up. Again, the difference lies in the focus of the projects.

      Now if I could just get the time to crack open this "Learning Python" book I purchased too long ago, I could probably come up with a better answer to your question!

      --
      The line must be drawn here. This far. No further.
  6. Dangers by briggsb · · Score: 5, Funny

    I hope the developers at Yahoo! understand fully the dangers of using PHP.

    1. Re:Dangers by Anonymous Coward · · Score: 0

      If combined with DHMO it could be real trouble.

    2. Re:Dangers by Tablizer · · Score: 1

      I took PHP in highschool and started hallucinating all kinds of funny squiggles and characters like ~,@,#,$,%,^,&,*,{,[,\, etc all bunched together, and people were programming with that funny stuff.

      It was a real trip.

      Oh wait, that was actually my Perl trip. He he, Never mind.

  7. It makes sense ... by SuperDuG · · Score: 5, Insightful
    PHP has begun to prove itself as a very mission-critical, cross-platform, well versed, and stable scripting language. For what Yahoo does and for the optimizations that have come in newer versions of php this makes a whole lot of sense. If yahoo plans on using a mod_php with apache 2.0 then I can see them even getting more performance gains. There's no way to tell as I've never actually seen the system they use currently.

    Obviously open source DOES apply to the corperate world.

    --
    Ignore the "p2p is theft" trolls, they're just uninformed
    1. Re:It makes sense ... by Anonymous Coward · · Score: 0

      For what Yahoo does and for the optimizations that have come in newer versions of php this makes a whole lot of sense.

      You mean all the DB hits and such? You'd want connection pooling and data caching more than what mod_php can provide. Solution? J2EE.

    2. Re:It makes sense ... by rseuhs · · Score: 5, Insightful
      Where have you been in the last 5 years?

      If you say that open source has a place in corporate webservers, I'd say that's a massive understatement.

      Open Source (Apache and PHP) is the standard in the webserver space already and is gaining more marketshare every year.

      Right now, only NBM (nothing but Microsoft) users and legacy systems run IIS. It doesn't offer anything valuable, except customer lock-in. (which is very valuable, but only for Microsoft)

    3. Re:It makes sense ... by edrugtrader · · Score: 1

      shit, i've never even seen apache 2.0 work with mod_php, let alone what yahoo currently uses

      --
      MARIJUANA, SHROOMS, X: ONLINE?! - E
    4. Re:It makes sense ... by T3kno · · Score: 2

      Sorry try again!!

      The correct answer is mod_perl.

      --
      (B) + (D) + (B) + (D) = (K) + (&)
    5. Re:It makes sense ... by G-funk · · Score: 3, Insightful

      Open Source (Apache and PHP) is the standard in the webserver space already and is gaining more marketshare every year.

      Apache yes, in its varied forms. But PHP is far from the standard. It may be the standard for hobbyist sites, but most commercial sites run on ASP,Perl,JSP+Servlets, or something proprietry like Vignette. Althogh PHP can be made secure by a good admin, it's often (usually?) not.

      --
      Send lawyers, guns, and money!
    6. Re:It makes sense ... by jonbrewer · · Score: 5, Informative

      Right now, only NBM (nothing but Microsoft) users and legacy systems run IIS. It doesn't offer anything valuable, except customer lock-in. (which is very valuable, but only for Microsoft)

      There's no way you can back that statement up. Corporations generally have a few outward-facing web servers, and yes, these are most likely running apache, but the vast majority of Intranet web servers are still IIS. After that you'll see Lotus Domino and iPlanet, and then Apache.

      (This is from my experience with large corporations, though the IT rags such as Information Week and Network Computing back me up.)

      IIS is the standard for Intranet web servers for a reason - it's standard. It comes with every NT server. It's easy, and setup/administration hasn't changed in years. Any clown with knowledge of Windows can make it work, and it is stable and reliable.

      In the last 7.5 years I have administered just about every popular web server written (including NCSA HTTPd, WebStar, and IIS on NT 3.51 back in the day). Of all of them, I've found IIS the easiest to work with. Coupled with Win2k workstation on the desktop, it's almost fun to administer them with MMC and watch their behavior with PerfMon.

      The reason I deploy mainly IIS servers is that I can order a server from the IT department with a standard Win2k build and have secure applications (with access control) running on it within minutes of taking delivery of the box. Try that with a Solaris, Irix, or Linux box, I dare you. (Yes, I currently deploy and manage Apache on Solaris, Irix, and Linux, just not as often as IIS on NT/Win2k.)

      Sure Open Source has a place in corporate webservers. That place just isn't big, and won't be until Apache is easy to configure and integrates seamlessly with Windows NT security. When an idiot with an IT degree from the local community college can integrate Apache on Unix with a corporate network and can authenticate users and implement access controls without opening a book, then Open Source will have arrived in the corporation, and will start to eat into IIS market share of the Intranet. Until then, it'll be fringe, relegated to use on big systems with unix sysadmins doing the implementation.

    7. Re:It makes sense ... by Anonymous Coward · · Score: 0

      So, I guess you are saying that Yahoo should be switching everything to NT running IIS?

      Oh yeah, good idea.

    8. Re:It makes sense ... by rseuhs · · Score: 2
      IIS standard for Intranet? Oh, you got to be kidding me. Seems like the Microsofties have stepped down to positions which can't be easily disproven.

      And if you don't believe the customer lock-in, try getting Microsoft copycat technologies (like ASP) frome somebody else.

      Coupled with Win2k workstation on the desktop, it's almost fun to administer them

      Do you really think that posting on slashdot will make your MSFT-shares go up?

    9. Re:It makes sense ... by AftanGustur · · Score: 2
      most commercial sites run on ASP,Perl,JSP+Servlets, or something proprietry like Vignette

      Using vignette is like being talked into buying this high-tech, over-engineered, colorful, well supported, beautiful in demos, easy to use and extremely expensive blaster gun to shoot yourself in the foot.
      Those responsible are then to embarressed to admit the mistake (and waste of money).

      --
      echo '[q]sa[ln0=aln80~Psnlbx]16isb572CCB9AE9DB03273snlbxq' |dc
    10. Re:It makes sense ... by AftanGustur · · Score: 2
      There's no way you can back that statement up. Corporations generally have a few outward-facing web servers, and yes, these are most likely running apache, but the vast majority of Intranet web servers are still IIS. After that you'll see Lotus Domino and iPlanet, and then Apache.

      I find it even less possible that you will be able to back *that* statement up with any meaningful data. (No, your personal experience does not count)

      --
      echo '[q]sa[ln0=aln80~Psnlbx]16isb572CCB9AE9DB03273snlbxq' |dc
    11. Re:It makes sense ... by G-funk · · Score: 1

      Hey I never said it was a good idea, i just said people do it....

      "Just because you can do it, doesn't mean it's to be done... You can drive a car with your feet if you want to, but that doesn't make it a good fuckin idea"

      --
      Send lawyers, guns, and money!
    12. Re:It makes sense ... by debaere · · Score: 2
      When an idiot with an IT degree from the local community college can integrate Apache on Unix with a corporate network and can authenticate users and implement access controls without opening a book, then Open Source will have arrived in the corporation, and will start to eat into IIS market share of the Intranet.
      Um... do you really want an idiot configuring your web servers? Explains a lot, doesn't it? :)
      --

      DOS is dead, and no one cares...
      If there's a Bourne Shell, I'll see you there
    13. Re:It makes sense ... by Bohiti · · Score: 1

      Actually, you can get ASP from somebody else, and integrate it into nearly any cgi-capable web server.
      I just did it last week for a personal site of mine running apache: SeliSoft ActiveHTML
      Works flawlessly, and free for personal use.

    14. Re:It makes sense ... by Anonymous Coward · · Score: 0

      First, easiest != best.

      Second, are you a clown? You say any clown can setup IIS. So, you must be a clown.

      The enterprise is run on "big systems with unix sysadmins doing the implementation" not clowns running IIS.

  8. Maintence must be easier by papasui · · Score: 5, Insightful

    I'm sure it must be easier to find someone who knows PHP then it is to find someone who does cgi-bin c/c++ to maintain their sites. We use PHP/Asp for many of our internal applications we use for monitoring network systems and integrate it with MySQL. Works very well.

    1. Re:Maintence must be easier by glwtta · · Score: 3, Interesting
      Question (not a troll, though sounds like one) - how was the decision made to use MySQL? I can't for the life of me figure out why so many people pick it for web apps.

      to trigger happy mods - again, not a troll, I'm curious.

      --
      sic transit gloria mundi
    2. Re:Maintence must be easier by papasui · · Score: 2

      Free is good, but the majority of the information collected isn't critical. So should the database fail we aren't really loosing information that will seriously hamper anything.

    3. Re:Maintence must be easier by dimator · · Score: 5, Interesting

      I can't for the life of me figure out why so many people pick it for web apps.

      I guess everyone is smoking crack except you. Seriously, why does MySQL get all this smack talk? I use it because its easy, every language I know of has bindings for it, its fast enough, and its stable. PLEASE spare me your "But XXX does that too, not to mention bla bla bla!" No, I won't switch, because I learned MySQL first (as I'm sure many others have) and so far it hasn't let me down.

      --
      python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
    4. Re:Maintence must be easier by glwtta · · Score: 3, Interesting
      I'm not trying to get anyone to convert, and you don't even have to beg me in capital letters to spare you anything.

      I'm simply curious - for most jobs that MySQL is used for, there are better free databases (sometimes not by much, but that's not the point), yet MySQL seems to be the only free RDBMS anyone's ever heard of. I am trying to picture why, and asking people involved (it seems like) with the decision process in a company actually using it, seems like a good way to find out, no?

      --
      sic transit gloria mundi
    5. Re:Maintence must be easier by mindstrm · · Score: 1

      BEcause it's fast, stable, and tiny, and does the job well.

      Yes, of course it's not a full SQL implementation, of course it doesn't have the scalability of Oracle, etctera...

      But a great many web apps have no need for a super heavyweight database.

      Every language out there has bindings for MySQL, and there are a truckload of people using it, so information is easy to come by.

      What would you pick instead?

    6. Re:Maintence must be easier by JebusIsLord · · Score: 3, Interesting

      I use it because its free, postgres isn't quite as well integrated with php, and i dont need the extra features of a more complete SQL engine for what I do anyhow (no transacts for example). Plus the documentation for MySQL is great, because there are so many users.

      --
      Jeremy
    7. Re:Maintence must be easier by Jason+Earl · · Score: 3, Interesting

      I am a huge PostgreSQL fan myself, but for mostly-read databases (like most web databases) MySQL is hard to beat.

    8. Re:Maintence must be easier by leviramsey · · Score: 5, Informative

      MySQL is faster in really only one particular case: lots of SELECTs with few UPDATE/INSERT/DELETEs. Many applications have orders of magnitude more SELECTs than other queries (I'd guesstimate that Slashdot books at least two orders of magnitude more SELECTs). Nothing beats MySQL in that environment, and there are a lot of apps where that's all that's needed (think CMS's and other such things).

    9. Re:Maintence must be easier by King+of+the+World · · Score: 3, Informative

      For me, MySQL is more cross-platform than Postgres. I develop on Windows/Linux at work, Linux at home, and then copy it to a Linux server. Postgres doesn't have good Windows support.

    10. Re:Maintence must be easier by glwtta · · Score: 2
      Personally I usually go with Postgres for any app with a lot of concurrent writes, like most of the web stuff I do (seems to handle it better than MySQL). I do use MySQL quite a bit as well (it's not like I said that it shouldn't be used) and of course Oracle is often crammed down my throat (to overstate it a bit) at work.

      Btw, it's not always true that Oracle > MySQL; I remember doing a rather simple app where I had to do simple manipulations on several dozen million of simple records - MySQL beat the pants off Oracle performance-wise.

      I also often see MySQL being applied to situations where it seems to be overkill, where simple flat files would do just fine.

      I don't know, my biggest pet peeve is just that a lot of people think "free database" == MySQL and the other guys get very little exposure.

      --
      sic transit gloria mundi
    11. Re:Maintence must be easier by glwtta · · Score: 2

      Heh, I often find myself saying "but for write-heavy databases (like most web databases), guess it's just the kind of stuff I tend to do :)

      --
      sic transit gloria mundi
    12. Re:Maintence must be easier by slamb · · Score: 2
      glwtta asked: how was the decision made to use MySQL?

      papasui answered: Free is good, but the majority of the information collected isn't critical. So should the database fail we aren't really loosing information that will seriously hamper anything.

      The question was why did you pick MySQL. I really hope that you misread it, because in that context your answer could be paraphrased as "I picked a database that is less reliable because I do not absolutely need reliability". That's stupid. What did you gain by sacrificing that reliability? What makes MySQL better than PostgreSQL for you? As opposed to "what makes one particular weakness of MySQL slightly less important for you?"

    13. Re:Maintence must be easier by Wolfier · · Score: 2

      My Postgresql projects all run on Windows, Linux, and Solaris - they all use the same code, compiles and run flawlessly. I'd say the Windows support of Postgres is VERY good.

      I still run the server only on Linux tho, just for the paranoidal reason that it is the most run and tested.

    14. Re:Maintence must be easier by Permission+Denied · · Score: 2
      yet MySQL seems to be the only free RDBMS anyone's ever heard of.

      This is probably the reason. MySQL gets the press, so PHBs are OK with it. Postgres gets no press, so PHBs are wary of it.

      I had a PHB that was wary of using a free database for some incredibly trivial web database. I explained to him how using Sybase was a bad idea since he would need a competent *nix admin perpetually in the department to do simple things like backups, and how MSSQL has a bad security record, etc. This particular app just needed to do a couple of joins from php - it didn't even need to open up the SQL server to the world, only running locally on the web server. I couldn't possibly legitimze paying something for the trivial project, but the PHBs somehow thought that if we bought an MSSQL license, we would be treated to red-carpet support directly from Microsoft developers.

      You know what convinced him to give the go-ahead to MySQL? MacOS X ships with MySQL. That means it's a serious product, not some fly-by-night sourceforge/freshmeat project written by a college kid between classes. Doesn't matter if more people use Postgres for more serious things. All that matters is if there's a big name behind it. Same thing with FreeBSD - they all wanted only Linux before Apple started advertising that their stuff was based on FreeBSD 4.4.

      That's how things work in Corporate America. Those making the technical decisions often aren't the ones with the technical knowlege.

    15. Re:Maintence must be easier by khuber · · Score: 2, Insightful
      It's a toy compared to a real RDBMS like Oracle, DB2, Sybase, even SQL Server ;). MySQL didn't even have proper transactions until recently. My gripe with the big RDBMSs is how overly complicated they are to maintain and the endless parameters that have to be set by a DBA. At least that's my experience with DB2/UDB.

      -Kevin

    16. Re:Maintence must be easier by the+eric+conspiracy · · Score: 2

      mostly-read databases (like most web databases) MySQL is hard to beat.

      For simple web databases Mysql can be very good. But as soon as your boss wants to see financial reports on an ecommerce site running Mysql, the lack of views, subqueries, stored procedures etc. is crippling.

    17. Re:Maintence must be easier by Pig+Hogger · · Score: 2, Funny
      MySQL is hard to beat.
      Oh yeah? Well, MY SQL can lick your SQL!!!
    18. Re:Maintence must be easier by Anonymous Coward · · Score: 0

      Sure, as long as your SELECTs don't have many JOINs, MySQL is great.

      I seriously can't believe that flattable SELECT speed is all that different between different databases. My understanding was that MySQL got popular because it had a more useful 'text' column type, which is all messageboards, CMS's etc really need, and admin is fairly simple.

    19. Re:Maintence must be easier by jayed_99 · · Score: 1

      Because Oracle DBAs are freaking expensive...because Postgres lost the mindshare war...because MSSQL absolutely sucked ass until version 7.0

    20. Re:Maintence must be easier by kputnam · · Score: 1

      I beleive one of the reasons MySQL is so popular as a free database engine is that it was probably the best one when PHP started to form. I think PostgreSQL had its own non-standard query language (wasn't really SQL) and I don't know about any other servers. Also, whether its true or not, I am under the impression that MySQL is less resource intensive and more light-weight than most other database servers, so its good to run on a Apache/PHP/Perl/etc integrated test machine. (Wasn't it based from mSQL which was a really tiny SQL server?) Personally, I use PostgreSQL but I find MySQL useful when programming on Windows machines (I don't need Cygwin to run MySQL server) and it seems more common on webservers so it's wise to be familiar with it if you switch web hosts.

    21. Re:Maintence must be easier by thing12 · · Score: 3, Informative
      My understanding was that MySQL got popular because it had a more useful 'text' column type, which is all messageboards, CMS's etc really need, and admin is fairly simple.

      Yep, that's pretty much it. If PostgreSQL didn't have the 8k row limit and the need for periodic 'vacuums' at the time when the web was starting to boom, it would have been the db of choice. Those problems are fixed now but it doesn't matter. It supported transactions, views, sub-selects, and most other SQL features years before MySQL did. The fact that PostgreSQL is now a better database in nearly all respects (including speed) doesn't matter because MySQL is entrenched.

    22. Re:Maintence must be easier by hendridm · · Score: 2

      > I can't for the life of me figure out why so many people pick it for web apps.

      I use it because it's free and I can develop with PHP and MySQL on my Windows XP computer at home and upload it to my Linux web host without having to change anything (except for the occasional file path). Very slick! I can mirror my Linux web site on my Windows machine for development purposed quite easily. The documentation for both is simply excellent too.

    23. Re:Maintence must be easier by autechre · · Score: 2


      Sorry, I don't understand; how is MySQL "more integrated" with PHP than PostgreSQL? I've used PHP quite a bit with both of them, and I have no idea what you mean.

      Additionally, both PostgreSQL and MySQL have very good documentation; I have always been able to find the answers I need relatively easily in either.

      On the other hand, I've actually taken classes on databases and know/care about things like normalisation, referential integrity, etc. I still use MySQL in one project where these don't quite apply (because it's so simple), but even for the Web site for our newspaper, I need what PostgreSQL does in order for it to have a good internal design. Yes, you can make up for the shortcomings of your database by doing more work in the external code (which is what the MySQL manual suggests, though not in those words), but why?

      --
      WMBC freeform/independent online radio.
    24. Re:Maintence must be easier by Bald+Wookie · · Score: 2

      Executive Summary: Inertia

      One answer:
      It's easy to find cheap PHP/MySQL hosting. Finding a host with a better DB usually means a few bucks more a month. For personal sites or small businesses without a lot of IT, cheap commodity hosting is a good thing. Keep in mind the hosting business has changed a lot in the last few years. It used to be rare to find databases included with hosting packages. When you did, it was often MySQL or even mSQL. Back then we used what we had.

      This leads to answer number two:

      Legacy code and bad database API's. There is a TON of code out there that expects MySQL. When you're writting a PHP app, all of the database calls are database specific. When you want to query mysql, you use mysql_query(). Talking to SQL Server? you use mssql_query(). That one letter makes a huge difference.

      These disorganized function names mean that retooling your old application to use another datbase takes some work. Yes, there are wrappers and database abstraction layers. Sometimes they get used, but often they are not. PHPLib was popular at one point, and now it looks like PEAR has a good one. I'm usually not crazy about them because if I use subselects or stored procedures, I'm pretty much locked into a DB platform anyway.

      I guess the last reason is that there are a lot of beginning programmers using PHP. MySQL has a reputation for being fairly easy and there are tons of examples using it. When you are cutting and pasting code, chances are it's MySQL based.

    25. Re:Maintence must be easier by technix4beos · · Score: 1

      This trend is changing, as database abstraction tools get better, and people realize that a small bit of overhead in distancing the site logic from the database interface is a good thing.

      I myself have written a -very- basic wrapper around both MySQL and PostgreSQL, by simply having all of my database functions named like so:

      DBLink
      DBQuery
      DBObject

      and so on. php then allows me to automatically include() the correct DB abstraction file for whatever database I'm currently using. One line of code, one small variable to change, and I can flip databases at will. Same goes for debugging purposes too. I set:

      define('_DEBUG_MODE_',FALSE);

      to TRUE or FALSE, and voila, my internal DBG('Foo='.$bar); function automatically knows if I'm prepared to write the results to a logfile, the same screen as the script, or whatever else I need it for, without messing up the server, or having to use multiple printf() statements.

      php rulez man. The one -KEY- difference between php and perl is that I can imbed php into the same html document, intermingling them if needed, while STILL maintaining a very structured C++ style of coding. It's fantastic to have a very rigid hierarchy of C++ style classes, and functions, while also being able to produce output to the web, whenever you want, or need to.

      One more thing... I know I'm getting off the topic of MySQL and php's interface to it, but I wanted to mention output buffering. I don't recall perl being able to buffer automatically any and ALL output intended for the web, so that you can parse it logically and properly before handing it off to Apache (or whatever other server you use.)

      Did I mention session support? It rulez too. Easy access to cookies is also a must.

      PHP goodness. I'm positive there is more to this Yahoo story than some PHB wagging a stick.

      Peace!

      --
      user@host$ diff /dev/urandom /dev/uspto
    26. Re:Maintence must be easier by AftanGustur · · Score: 2
      how was the decision made to use MySQL? I can't for the life of me figure out why so many people pick it for web apps.

      Because it's the best value of price/performance people are looking for. Nai-sayers talk about the possiblility of loosing data with MySQL, but in reality the possibility of loosing data only because of MySQL's features (or lack of them) is so slim that you never hear any horror stories from MySQL users.

      --
      echo '[q]sa[ln0=aln80~Psnlbx]16isb572CCB9AE9DB03273snlbxq' |dc
    27. Re:Maintence must be easier by Anonymous Coward · · Score: 0

      running postgresql in cygwin is what turned several people here off from it. can't be mysql's "native" windows support. sorry dude.

    28. Re:Maintence must be easier by messju · · Score: 1

      > Sorry, I don't understand; how is MySQL "more
      > integrated" with PHP than PostgreSQL? I've used
      > PHP quite a bit with both of them, and I have no
      > idea what you mean.

      Perhaps he means, that php gets shipped with builtin mysql support (the php-extension speaks
      mysql to mysqld on its own). You can comile php with mysqlsupport *without* having mysql's client libs lieing around.

      For pgsql-support you need libpq.

      But that's not such a great difference in the "grade of integration", that Joe user will
      ever notice.

    29. Re:Maintence must be easier by peterpi · · Score: 1
      Answer (not a troll, though sounds like one) - A lot of people will use MySQL because it has a sensible name. No really, I'm not kidding. How the hell do you pronounce PostgreSQL anyway? MySQL sounds like the sort of thing that can be used be a mere mortal. Spikey haird dilbertesque managers like that sort of thing.

      I've said similar things before (and get modded down half the time, heheh), and I'm sure that it's true.

    30. Re:Maintence must be easier by MattRog · · Score: 2

      Nothing beats MySQL in that environment

      Well, besides flat-files you mean?

      --

      Thanks,
      --
      Matt
    31. Re:Maintence must be easier by glwtta · · Score: 2
      I remember having a very hard time convincing PHBs that MySQL is a viable database simply because they thought the name sounded childish and not like a real database.

      Then again, one can probably convince them that it's an MS product (a la, My Documents, My Computer, etc), that should put their fears to rest :)

      --
      sic transit gloria mundi
    32. Re:Maintence must be easier by MadAhab · · Score: 2

      True, true. I'm in the middle of migrating a project from MySQL to Postgres for the usual reasons - chosen initially because someone else used and it was quick-n-easy, but now our needs are more complex and we need a real database.

      You only have to isolate a couple weird cases where it goes mega-slow on account of multiple indexes and joins and the query planner barfs - you'd know what I'm talking about. Of course, a lot of people using MySQL don't know, much less use, basic normalization and so it will take a while before they catch up to reality.

      --
      Expanding a vast wasteland since 1996.
    33. Re:Maintence must be easier by jafuser · · Score: 2
      I'm curious about this, becuase I really liked MySQL, but our IT management forced us to upgrade to Oracle on the basis that MySQL couldn't store more than 4GB worth of data (they also have the bright idea of storing all of our relevant files in the database instead of just storing the path). From my understanding (IANA-DBA), you can store more than 4GB in MySQL, but it requires a little more administration/configuration.

      So now, we're experiencing the learning curve with Oracle, and I must say it's a bit of a beast compared to the lightweight and flexible MySQL.

      I especially hate their network-address system. Why can't they just use standard IP addresses and sockets like every other client-server application in existance today? And their junk bloated management software sucks big fat choad.

      --
      Please consider making an automatic monthly recurring donation to the EFF
    34. Re:Maintence must be easier by Beliskner · · Score: 2
      I'm simply curious - for most jobs that MySQL is used for, there are better
      Why don't you use Oracle on a 128-way Unix server with custom-compiled super-fine-grained locking kernel and NUMA/Beowulf/...? Yeah, there are slower systems with less CPUs and a more standard kernel but hey why not get the best?
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    35. Re:Maintence must be easier by Beliskner · · Score: 2
      Personally I usually go with Postgres for any app with a lot of concurrent writes, like most of the web stuff I do (seems to handle it better than MySQL).
      Good, but be careful of the additional anomalies introduced by Multi-Version Concurrency Control - no READ LOCKS, nice.
      Btw, it's not always true that Oracle > MySQL; I remember doing a rather simple app where I had to do simple manipulations on several dozen million of simple records - MySQL beat the pants off Oracle performance-wise
      To make it scale well, Oracle does stuff slower than something like MySQL when using very few processors.
      I also often see MySQL being applied to situations where it seems to be overkill, where simple flat files would do just fine
      Pull the power cord in the middle of a write to a flat-file and see what happens (unless you have ext3 with full data+metadata journalling).
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    36. Re:Maintence must be easier by Beliskner · · Score: 2
      Because Oracle DBAs are freaking expensive...
      WHAT???? I've got 10 Oracle DBAs sitting here on welfare, what the hell are you talking about???
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    37. Re:Maintence must be easier by glwtta · · Score: 2
      unless you have ext3 with full data+metadata journalling

      And if you don't, on any sort of production machine, you should be strangled with that same power cord you just pulled. (though ext3 isn't exactly the only journaling fs out there

      --
      sic transit gloria mundi
    38. Re:Maintence must be easier by Anonymous Coward · · Score: 0
      To most hardcore geeks, this doesn't matter, but I think PostgreSQL needs a better name. To the new class of programmers that are coming out of school these days who are easily influenced by marketing, MySQL just sounds more friendly and easier to use.

      PostgreSQL sounds very cold, academic and pretentious as a name. If I knew absolutely nothing about both and had to pick one, MySQL just sounds better by it's name.

    39. Re:Maintence must be easier by Wolfier · · Score: 1

      Sorry for bursting your bubble dude, PostgreSQL has -NATIVE- Visual C++ makefile and stuffs.

      there is no need for Cygwin.

    40. Re:Maintence must be easier by King+of+the+World · · Score: 2

      Where's the download?

    41. Re:Maintence must be easier by Wiseleo · · Score: 1

      I build solutions with: PostgresSQL, apache, and PHP.

      Why?

      Once you learn mySQL, switching to PgSQL is pretty painless. If you use something like AdoDB or any other database abstraction layer for PHP, you don't have to worry about which DB you are developing for.

      The kicker? I built a setup.msi with Cygwin/postgres, Apache Win32, and PHP 4.2.3 that I distribute. mySQL has too many commercial restrictions for my liking :-)

      Leonid

      --
      Leonid S. Knyshov
      Find me on Quora :)
    42. Re:Maintence must be easier by Wolfier · · Score: 1

      www.postgresql.org

      there is a win32 subdirectory if you look close enough.

    43. Re:Maintence must be easier by Wolfier · · Score: 1

      Oops, not a subdirectory. But a bunch of win32.mak files which can be used directly by the VC++ make. Look closer.

    44. Re:Maintence must be easier by fferreres · · Score: 2

      Tell that to Yahoo finance (spoiler: they use MySQL)

      --
      unfinished: (adj.)
    45. Re:Maintence must be easier by King+of+the+World · · Score: 2
      Sorry, I think like most people on Windows I just want a binary. I'm not about to compile my software, let alone buy VC++.

      I'll stick with MySQL until Postgres does what I want.

    46. Re:Maintence must be easier by rwinston · · Score: 1

      Actually, MySQL can hold 8 million terabytes of data per table with the MyISAM table type. I dont know how big InnoDB tables can get. You may of course be limited by the underlying OS maximum file size.

      --
      "If we cannot be free, then at least we can be cheap" -- Frank Zappa
  9. Seems like a silly move... by FortKnox · · Score: 4, Interesting

    Going from something speedy and efficient to PHP.

    Why not switch to J2EE? Obviously, this is an extremely large enterprise web-app. They could take full advantage of all EJBs and Webapp clustering. I just don't see why you'd use PHP, when J2EE has so much more of an advantage on an enterprise level.

    On reading the slide show, the reason not to pick J2EE:
    you can't really use Java w/o threads
    Threads support on FreeBSD is not great


    Is this really a bad thing?
    Especially for the advantages EJBs give you??

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    1. Re:Seems like a silly move... by ceejayoz · · Score: 3, Insightful

      It'd be interesting to see Yahoo!'s stats - whether they get a performance/speed/efficiency boost from PHP, how it compares to the old system, etc.

      As a PHP coder, this makes my heart fill with joy... should be much easier to convince PHB's to let me do it in PHP!!! :-D

    2. Re:Seems like a silly move... by elmegil · · Score: 1

      So don't use FreeBSD. Use Linux. Or eventually move to an OS that has really good thread support; even if it's not free, seems that there may be some performance benefits to be had....

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    3. Re:Seems like a silly move... by FortKnox · · Score: 3, Interesting

      whether they get a performance/speed/efficiency boost from PHP

      PHP, even with mod_php, isn't going to give any type of boost over a proprietary C/C++ app other than maintainability. The reason I butted in suggesting J2EE was the easy clustering, database pooling, and data caching that goes above and beyond what mod_php can do.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    4. Re:Seems like a silly move... by photon317 · · Score: 5, Insightful


      Eep, why J2EE? It's slow, it's a memory hog, it doesn't deliver on the write-once-run-anywhere promise of Java because of the vendors' differences. Perhaps most importantly for them, you really can't use Java w/o threads, and thread support on FreeBSD is not great. Read that over again. That means that Java doesn't scale well for you if your OS's thread don't scale well for you. If you're running FreeBSD, then that's the case, which further limits Java's absymal performance.

      --
      11*43+456^2
    5. Re:Seems like a silly move... by TheTomcat · · Score: 5, Insightful

      isn't going to give any type of boost over a proprietary C/C++ app

      It wasn't a proprietary C/C++ app, it was a proprietary C/C++ scripting language.

      Performace should be same or better, if I understand correctly.

      S

    6. Re:Seems like a silly move... by Vaulter · · Score: 5, Informative


      Because Yahoo is one of the fastest sites on the 'net.

      EJB's are great, don't get me wrong. They are great for handling database abstractions with zero tolerance for errors. But they are not fast, and horrible overkill for a site like Yahoo. All that abstraction and IIOP communication kills performance. Which is why shops that have large EJB applications tend to run them on heavy duty sun hardware. Not i386 boxes running FreeBSD.

      --
      I don't have a sig...Do you??
    7. Re:Seems like a silly move... by glwtta · · Score: 5, Interesting
      Hm, if they are rewriting their entire app, wouldn't a move from FreeBSD to some other UNIX(-like thing) be small in comparison?

      I mean seriously, I'd love to hear the pros and cons of the "Moving our stuff off of FreeBSD" vs. "Having to maintain everything in PHP instead of J2EE" discussion.

      --
      sic transit gloria mundi
    8. Re:Seems like a silly move... by Dog+and+Pony · · Score: 2, Troll

      Because J2EE is slow to develop in, and slow at executing?

      One of the criteria was fast development and turnaround time, as they need to stay ahead of competition. J2EE is beautiful in theory, but not in practice. Anyone with that only on their resume will have to shape up the next years, when PHB's stop buying that particular buzzword and move on to the next.

    9. Re:Seems like a silly move... by sporty · · Score: 4, Informative

      Ug, as a prior php developer, who worked on enterprise level apps, i'd pray for them. PHP has it's unique problems once you have a large code base. You are more likely to require two modules in php that won't play well toegether or get errors in php itself. Php didn't like gnome-xml and ssl together at one point for example. I've had includes just die randomly when the include_once tree got too large. It'd die on a variable assignment.. strange shit.

      --

      -
      ping -f 255.255.255.255 # if only

    10. Re:Seems like a silly move... by Anonymous Coward · · Score: 2, Informative

      It's slow, it's a memory hog...which further limits Java's absymal performance.

      Standard Java stereotype. Java was slow a long time ago, not today. That gross asumption alone should get you modded down.

      it doesn't deliver on the write-once-run-anywhere promise of Java because of the vendors' differences

      Is multiplatform independence truely needed in this application? Sounds like they are using FreeBSD, and probably one webapp (I'd suggest WebLogic, because it clusters best).

    11. Re:Seems like a silly move... by ceejayoz · · Score: 2

      Yahoo! seems to be handling the move just fine. According to the presentation, their PayDirect, Classifieds, News and Travel sections were all early PHP adopters.

      Maybe it wasn't a PHP problem in your case - hardware, perhaps, or the code itself?

    12. Re:Seems like a silly move... by RickHunter · · Score: 3, Interesting

      So instead of fixing FreeBSD's threading, you advocate not using threads?

    13. Re:Seems like a silly move... by inerte · · Score: 2, Informative

      Going from something speedy and efficient to PHP.

      Also it's easier to load custom extensions on PHP, specially if they are done in C/C++, which is Yahoo's case. Code changes needed are smaller if they want to have all the old stuff working with the new.

    14. Re:Seems like a silly move... by FortKnox · · Score: 5, Interesting

      Because J2EE is slow to develop in

      I'd argue that if you use 2.0 EJBs and JBuilder, I could code just as fast as any regular language, but scripting languages are easier to slap code into.
      Now, good scripted PHP vs good abstracted OO Java. To code from scratch, PHP'ers could lay down code quicker. Java is easier to maintain and easier to add onto (if properly architected). In the end, I'd call it even ground.

      slow at executing

      Java 1 was slow. That was like 5 years ago. Go download JBuilder and run it. Made in C++, right? BUZZT! Its Java. Java has come a long way.

      J2EE is beautiful in theory, but not in practice

      Well, my job is a J2EE developer, so I guess the complex, enterprise level application that is running currently in front of me isn't java, cause it isn't beautiful in practice.

      Anyone with that only on their resume will have to shape up the next years, when PHB's stop buying that particular buzzword and move on to the next.

      Go look at monster. J2EE is one of the few languages that people have been hiring in throughout the recession. That doesn't sound like something PHB's are gonna just stop hiring.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    15. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      So instead of buying a new car you hire a mechanic to rebuild the engine on your old car, leaving you stranded for a couple months.

      Sounds good to me!

    16. Re:Seems like a silly move... by the_rev_matt · · Score: 2

      I've been on a J2EE project for over a year now (WebSphere 4) and the performance of Java is less than stellar. I would not recommend Java as a solution for anything client/server unless you have boatloads of cash to throw at a huge cluster (which Yahoo does, of course).

      --
      this is getting old and so are you

      blog

    17. Re:Seems like a silly move... by jqcoffey · · Score: 1

      I know this is going to seem like flamebait, but it really isn't meant to be. Has anyone ever been to a speedy Java based site? All the sites I've gone to that look like they're Java based seem painfully slow.

      FreeBSD performance issues have been raised, which I understand run most of the yahoo web front ends. Further, I've heard of nothing but trouble in the form of memory leaks running apache/tomcat on linux. Of course, I've never seen anything resembling java work well on a linux box.

      Really, this isn't meant as a flame...

      -Justin

    18. Re:Seems like a silly move... by nick-less · · Score: 2


      EJB's are great, don't get me wrong. They are great for handling database abstractions with zero tolerance for errors. But they are not fast


      certainly faster than php, keep in mind EJB's are compiled bytecode excuted on Hotspot optimizing virtual machines.

      and horrible overkill for a site like Yahoo

      maybe, but the main reason might be that developing with php is just cheaper...

    19. Re:Seems like a silly move... by FortKnox · · Score: 3, Informative

      Rational has a JSP based site that's pretty damn fast (unless it gets slashdotted, of course).

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    20. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      It's still a memory hog. Don't deny it.

    21. Re:Seems like a silly move... by photon317 · · Score: 2


      It's not a stereotype, it's a fact. I write code all the time, I know what I'm talking about. To start with java is fundamentally slow in theory because it's running in a JVM. With efficient optimizing compiler in both cases, native code will always be faster. However, it's slower than the use a virtual machine would indicate, which means the virtual machines aren't exactly optimal to begin with. Don't even get me started on the memory wasteage.

      Write any app in JSPs or EJBs or what-have-you, and I'll write the same app in mod_perl, mod_php, and I'll develop it faster, it will be more stable, and it will perform and scale better. C/C++ will of course trounce even perl/php on performance and scaling, but even with some solid libraries and macros at your side, C/C++ is a pain in the ass to work with for HTTP and HTML.

      --
      11*43+456^2
    22. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      the form of memory leaks running apache/tomcat on linux.

      Tomcat isn't a full J2EE based webapp server/container. Its a servlet container. Most likely, you'd run apache w/jboss, or websphere, or weblogic.

    23. Re:Seems like a silly move... by pthisis · · Score: 4, Insightful

      Standard Java stereotype. Java was slow a long time ago, not today. That gross asumption alone should get you modded down.

      Standard Java propoganda. The Java language is plenty fast (relative to the other solutions discussed), but most of the I/O libraries are still hideously slow. Ignoring that completely should get you modded down.

      Even a fairly slow computational language like Python drops Java out of the running for typical high-volume web site usage, simply because of I/O problems. Java is quite suitable in low-volume settings with stiff transactional requirements or heavy computational requirements--any setting where high I/O costs are amortized by several-order-of-magnitude higher page generation costs. It's a bad choice for a very high-volume site which basically wants to paste several database sources together into a template and shove it out the pipe; Yahoo! falls pretty squarely into that camp for most of its pages.

      They also have many components written in various domain-appropriate languages or that they don't want to rewrite for whatever reason; JNI is still pretty heavyweight, and if you have a lot of language interop requirements Java isn't a great choice (though if you're willing to sacrifice some JVM portability this can often be worked around, especially if the other benefits of Java outweigh the cost of implementation).

      On top of that, using EJB/J2EE will kill performance even more, which means that actually getting the feature benefits of Java requires handing away even more performance.

      All that's without even addressing the "requires tons of threads" problem; multiplexed I/O is pretty new to Java, and there's no good multiprocess API. Both of those are major problems, though hopefully multiplexed I/O will mature quickly. But until there's a good multiprocess API, Java's going to be unsuitable for a number of applications (and sticking to a platform-independent mentality instead of a platform-agnostic mentality makes implementing an efficient multiprocess API very difficult indeed).

      Worst of all are the memory issues, but those are well-known enough not to be worth rehashing.

      Sumner

      --
      rage, rage against the dying of the light
    24. Re:Seems like a silly move... by gludington · · Score: 1

      Since about April of this year, Ebay has been running on IBM's Websphere. (Google Search to find the related press releases.) Of course, this does not mean Yahoo made a bad choice going with PHP, which I love, just that it is possible to make speedy sites using J2EE.

    25. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      PHPs aren't native code. They suffer the same limitations as any virtual machine without a JIT.

    26. Re:Seems like a silly move... by taeric · · Score: 1

      You do realize they are considering a SCRIPTING language right? If your whole arguement was because of a VM, that is shot straight to hell.

      Now, you can bring in such advances as precompiling the pages, but I still think you grossly underestimate the advances in current JVMs.

      And if you don't think EJB's scale well, you fly in the face of the vast majority of experts out there.

      The rest of what you said is right on, though. It will take time to design the site. It also takes a fairly high skillset. If someone doesn't know the "correct" way of doing stuff, then it will be a horrible app. Same goes in most languages, though EJB's do seem to be especially non-forgiving.

    27. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      AMEN! I maintain a very large manufacturer's website and it's all java servlets/xslt in the backend with a monstrous CMS. It was billed as being easier to maintain and more scalable. Well...

      The number of people who could make changes on the site has reduced from anyone with html/perl knowledge to about 3 people at a cost of over 3 times as much to our client, and it is WILDLY unstable. We can't really touch the server during the day for fear that it would kill the machine.

      I am convinced that server side web java is not meant for anything but the absolute largest scale integration projects.

    28. Re:Seems like a silly move... by jallen02 · · Score: 4, Insightful

      You care to back up any of the claims your making? I have seen J2EE in production environments deployed with great success. There is nothing inherently slow about J2EE in general. "Java's abysmal performance"? In what context is Java's performance abysmal. I won't contest that for a number of tasks it is not optimal, for server application programming tasks it really shines.

      I just don't buy outright arguments like that at face value. It is *NOT* well understood or believed that what you state is true among any large groups of professional developers with proven experience deploying J2EE apps. Proof please.

      Trust me, I love PHP. I wrote a book on PHP and think it can do great things.. but for enterprise level applications and for quite a few tasks it just isn't there.

      Jeremy

    29. Re:Seems like a silly move... by pivo · · Score: 2

      I'd suggest that it may be WebSpehere that's slow, not Java specifically. WebSphere's a little on the crappy side. We use BEA and ATG's J2EE container and they're plenty fast.

    30. Re:Seems like a silly move... by dybvandal · · Score: 1

      their requirement was to let things run side by side. also they are not recoding their old apps but are mostly writing new stuff in php versus their old alternatives. so it makes more sense to change as few as possible in their enviornment. also the more you change the more knowhow you need to rebuild

    31. Re:Seems like a silly move... by pivo · · Score: 2
    32. Re:Seems like a silly move... by glwtta · · Score: 2

      Fair enough. They really did make this whole thread thing seem like a bigger con against J2EE than it seems to have been in their decision. It seems like it just was more of a paradigm shift than they wanted.

      --
      sic transit gloria mundi
    33. Re:Seems like a silly move... by nemesisj · · Score: 2

      My guess is that Yahoo is willing to pay a couple thousand bucks to buy more hardware to offset performance penealties they incur as its always cheaper than wasting time because your current system is too unwieldy. In a dynamic environment performance is just not a factor that people with lots of money to spend on hardware (Yahoo) care about when compared to easy maintenence and readability and quality tools.

    34. Re:Seems like a silly move... by bolthole · · Score: 3, Interesting
      So don't use FreeBSD. Use Linux. Or eventually move to an OS that has really good thread support; even if it's not free,

      Like solaris x86 perhaps!

      java is primarily designed for solaris,after all.

    35. Re:Seems like a silly move... by lateefj · · Score: 4, Interesting

      J2EE or PHP?
      I had to make this decision myself. I would like to share some of the reasons I chose J2EE over PHP.
      J2EE is a specifaction that is implemented by Java. PHP is a scripting language that runs on web servers. One of the problems I came up against was writing PHP was fast but as soon as the application left the modules that where included by PHP you would have to write them in C/C++ and compile them into PHP. This was NOT maintable and C/C++ are not RAD (Rapid Application Development). Basically PHP is limited to the running inside of Apache which for a small site is not much of a limitation but all of the website I have worked this was a huge limitation. For example there is no way to schedule a PHP script to run without outside software. Java is a langauge that provides a lot of different ways to schedule events.

      PHP has a couple major database interface problems that Java does not. One the database abstraction exist only by extention such as PEAR. Persitant connections create a connection for every Webserver process. So if I have n number of connections to the webserver I have n number of database connections. Since the query took a lot less time then it does to send the web page back to the client. For a small site this is no problem because there are very few connections at a time. But when you start dealing with multiple servers and large numbers of user connecting at the same time the database server soon cannot support he number of connections required. If you set connection pooling off this works OK for MySQL because it uses threads (this I don't get MySQL threads are ok but Java ones are not?) but Ohh.. my if one was to every use a database design for large systems such as PostgreSQL you would be creating heavy processes for every connection and again this would not scale. J2EE application servers use connection pooling :) and this is configurable so you can optimize it based on YOUR application not the number client connections.

      PHP caching I have used very little of. I used the PEAR caching system and it works OK. The J2EE caching that I have used is the Jboss implementation. The J2EE caching is so much more finegrained than the PHP caching that it is almost like comparing applies to oranges. But J2EE has a concept of row level caching vs. PHP which has a concept of query level caching. My experience is that J2EE caching is faster and much more intelegent.

      PHP supports objects ... (sorta'). In the projects I have worked on it is really nice to have name space which is something PHP does not support. As the applications get larger I found that keeping track of all the PHP functions became cumbersome. Then I started using PHP objects which at first where great except they are limiting after you have used a more fullfeatures language like Java or Python. I thought I read somewhere that you can do pass by refrence in PHP but I haven't been able to find that link. I found out that the PHP objects where by default pass by value when I ran into out of memory errors. In small sites with small object complexity PHP works fine.

      Generally I have found that large application evolve into supporting things I could have never imaged when I start working on it. If I where a C programmer then PHP might make sence because I could extend it to support all the features. But I don't have the time or knowlegde to become a really good C programmer so I use J2EE (Jboss).

      --
      Pedro For President!
    36. Re:Seems like a silly move... by bolthole · · Score: 2
      Has anyone ever been to a speedy Java based site? All the sites I've gone to that look like they're Java based seem painfully slow.

      How do you judge something "looks like it is java based" ??

      Unless you see *.jsp all over the place, you will have no idea. And note that jsp pages are not the be-all end-all of java servlet based webhosting. They are in fact a special case of java on the server side (and a case that makes it more like php to develop: dynamic, cached auto-compilation by the server when you change the page)

    37. Re:Seems like a silly move... by Dog+and+Pony · · Score: 2

      Well, good abstracted PHP may not exist (then again it may), but good abstracted Perl (as one example) does exist, and is "slapped together" much, much faster than the Java. Just because a language has most things you actually *need* as built-ins, doesn't mean it isn't structured.

      I've built apps in Java and Perl the last three or four years. I dared to look at, and actually try some of the competition.

      I didn't say Java was slow. Although that JBuilder example only is true on the latest equipment. Oh, right. You are working at a place that can afford developing in J2EE. Never mind.

      What I did say is that J2EE is slow.

      Well, my job is a J2EE developer, so I guess the complex, enterprise level application that is running currently in front of me isn't java, cause it isn't beautiful in practice.

      So what was the point in doing it in "good abstracted OO Java" vs "scripted"? And oh, I did say it wasn't in practice. Just like you.

      As for your last statement: All the best of luck to you. Seems you are settled then. :)

    38. Re:Seems like a silly move... by Xerithane · · Score: 2

      The reason I butted in suggesting J2EE was the easy clustering, database pooling, and data caching that goes above and beyond what mod_php can do.
      Damn good point with that. PHPs peristent/shared memory is a mess. mod_php works a bit better, but I never thought I'd see something as large as Yahoo! switching to PHP.

      I love PHP, don't get me wrong, but I would really love to see how their handling some of the persistence issues necessary for a large scale web application.

      --
      Dacels Jewelers can't be trusted.
    39. Re:Seems like a silly move... by meshko · · Score: 2, Interesting

      FreeBSD threading is not the main problem here. The problem is that it is different from Linux and Solaris idea of what pthreads are and Sun did bother to jump through the Linux porting loop, but didn't bother to do the same for FreeBSD.
      The port of Java on FreeBSD is actually based on Solaris source, not on Linux.
      With FreeBSD 5.0 release threads support will be even more complete and we will see 1.4 and 1.3 HotSpot working on FreeBSD in the near future, I'm sure.
      And I hope that this presentation will become the wakeup call for Sun in terms of *BSD support.

      --
      I passed the Turing test.
    40. Re:Seems like a silly move... by stu42j · · Score: 1

      Actually, it seems to be some kind of compiled scripting language. The presentation mentions, for example, having to recompile just to change bgcolor.

    41. Re:Seems like a silly move... by Slak · · Score: 2

      The presentation showed the results of Yahoo's stress tests. One of their proprietary apps was faster than PHP, the other slower. I got lost in the TLAs over whether the latest app was the faster one or the slower one. PHP was only marginally slower than the prop one.

      Regards,
      Slak

    42. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      Have you seen J2EE in production environments on FreeBSD? Or was that a production environment on Solaris?

    43. Re:Seems like a silly move... by forgotmypassword · · Score: 1

      Trust me, I love PHP. I wrote a book on PHP and think it can do great things.. but for enterprise level applications and for quite a few tasks it just isn't there.

      So according to you running Yahoo is not enterprise?

    44. Re:Seems like a silly move... by Anonymous Coward · · Score: 0
      If by abstracted you just mean a separation of HTML from code then there are templating libraries available for every web-language, including PHP.

      If you mean abstraction from code to code then that's in each language. OO in PHP sucks until PHP4.3 comes out (shush! don't tell anyone!).

    45. Re:Seems like a silly move... by jallen02 · · Score: 1

      Let me extend and clarify what I mean. For some things (code maintainability) PHP is less desirable than Java. PHP is missing some of the higher end features that make complex code with changing requirements in a high load/use environment easier.

      There are also functional pieces of PHP which are still *not* present that have been in J2EE from the ground floor. Check out Vulcan Logic SRM It is the first real attempt at handling database connection pooling and a high performance persistence mechanism for data and objects.

      PHP can undoubtedly handle it, but when you are talking large code bases and complex situations J2EE has more built in mechanisms for handling the environment better IMO. Well architected PHP can do pretty good tho.

      Jeremy

    46. Re:Seems like a silly move... by babbage · · Score: 2
      'course, if you'd actually read the PHP presentation that the Yahoo people wrote, you'd see that they're making the same point as the poster you're objecting to. If you follow the link labelled "Why not JSP, Servlets, or J2EE?" [sorry, the annoying combination of frames & javascript keeps me from providing a more direct link] you'll see that their objections are the same ones that are made again here. In particular, Yahoo has been a FreeBSD shop for a long time now, and that drives much of the rest of the decision here. Quoting their slides:
      Why not JSP, Servlets, or J2EE?
      • Pros
      • strongly typed
      • good performance (JIT), sandboxing
      • works w/lots of off-the-shelf software
      But... you can't really use Java w/o threads Threads support on FreeBSD is not great

      If you read the slide on "Language Criteria", support for FreeBSD is one of the top points raised. The points about being a memory hog & non-portable are kind of a troll, yes (who cares if it's portable if it only has to run on your own servers?), but the thread thing is a deal breaker here.

      Don't get me wrong, my pet language (Perl) wasn't chosen either, and I'd also quibble with the reasoning used there too (throwing "There's More Than One Way To Do It" back as a counterargument is kind of silly, and while "wasn't designed as web scripting language" is strictly speaking true it doesn't mean that it it's not a great web scripting language anyway [it is, in my opinion]).

      But hey, get the facts, accept your pet language's flaws, and play to the strengths. And most of all, don't feed the trolls :-) -- photon317 was inflammatory in what he said, but he was on the right track and, most importantly, he nailed Java's achilles heel for this context. If the Yahoo people have done their homework & decided that PHP is "there yet" for "enterprise level" work -- and from the looks of it, they have done their homework -- then I'll accept their judgement even if I would personally go with something else. This is a big vote of confidence for PHP, and it wasn't given frivolously. Please try to accept that.

    47. Re:Seems like a silly move... by Malcontent · · Score: 2

      There is a lively discussion about how slow and cumbersome j2ee is on javalobby right here

      These are advocates of Java complaining about how much j2ee sucks.

      I for one think that you need to be a rocket scientists to write a large j2ee application that can perform realatively fast while anybody can write php applications that can run fast.

      --

      War is necrophilia.

    48. Re:Seems like a silly move... by sporty · · Score: 1

      Well, it wasn't hardware, since all 30 web boxen were dying. The code dying on an assignment, like 10 of 15 is downright bad. I'd appreciate it my script interpreter not to do that.

      --

      -
      ping -f 255.255.255.255 # if only

    49. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      PHP is compiled bytecode as well if you are using one of the bytecode caching systems - and according to the presentation Yahoo are doing just that.

    50. Re:Seems like a silly move... by jallen02 · · Score: 1

      I do accept that. I am just trying to nullify some of the sweeping generlizations made that cast Java and Java based solutions in an mis-shone bad light. I don't have a true pet language. I have used Perl, even recently in production, to provide things that would just be difficult without the wide base of available modules for Perl. Perl is light weight, runs anywhere (arguably more places, and better, than Java) and it can be optimized rather well for many environments. I have used PHP for many projects when J2EE just didn't fit. I have used J2EE when it was truely required and it fit best with the requirements of the project. I am not a language biggot. I simply take issue to generalizations that aren't *generally* true. FreeBSD is a Java weak point. Yahoo using PHP boosts its credit level. I am not saying PHP was not the right choice for Yahoo.. it probably was. They probably invested many man hours into this decision. All is well :)

      Jeremy

    51. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      >> There is nothing inherently slow about J2EE in general. "Java's abysmal performance"?

      Garbage collection is inherently slow...

      A recent report from the middleware group showed .NET did the same work 300% faster then 2
      J2EE solutions. Having used WAS4 I don't doubt
      it.

    52. Re:Seems like a silly move... by joesao · · Score: 1

      I've delivered three large web applications in Java in the past two years, one in Websphere, and the last two in BEA Weblogic 6/Portal 4. Java *is* very slow, unfortunately. A big beefy server is required for something that would take only seconds to perform on a php system.

      It pissed me off, because I *love* Java. But I always joke that if we used php I could do our entire site (which usually takes 6-12 months) in a week.

      PHP is much quicker for development. Java can get very, very large, because you want to modularize and use all of its nice features.

      One thing that's particularly annoying is that Java doesn't run well on Solaris. You'd think a Sun language would run well on a Sun OS, but it doesn't. Doesn't run very well on Linux, either. As the poster said, there *are* differences among the vendors -- among application servers, specifically. Some don't implement all of the J2EE servlet specifications as they should be implemented.

      So, Java is very very nice, but PHP is much faster and quicker to learn. If Y! chose it, they certainly know what they're doing.

    53. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      At my company my teams PHP/Mysql supports 300-500 users a day while another departments Java/Oracle app kept crashing with 5 users. It turned out to be a combination of server config, library bugs and poor coding eating up all the memory but still, you would think that a bunch of Java certified engineers (And they are damn proud of that fact) could write software that wouldn't die...

    54. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      > Is multiplatform independence truely needed in this application?

      Well, since that was the whole "point" to Java one is left asking "Why Java?" again. You just made the whole incarnation of Java sound like a bad replay of the Monty Python dead bird skit.

      It's slow... No it's not... Yes, it is, See. But it's not... Ok, It doesn't run everywhere, you said it ran everywhere.... I didn't say that, it doesn't matter... But you did, and it does matter... No, not... Yes! why would I want something that's slower and doesn't run everywhere when I can just use C++?

      Anyway, all "scripting" languages are not created equal. Java is sandboxed C+- so much, much, more ends up getting interpreted. PHP does most of its heavy lifting by dispatching high level language artifacts to 'C' subroutines. While Java's class libraries are also written in Java and continue to be byte interpreted.

      Java, by definition, will always will be slower than scripting languages that dispatch high level languge structures to machine code.

      Dude, the Java bird is dead. Own one if you want.

    55. Re:Seems like a silly move... by the+eric+conspiracy · · Score: 2


      Anyone with that only on their resume will have to shape up the next years, when PHB's stop buying that particular buzzword and move on to the next.

      That is one of the stupidest things I've heard on Slashdot this year. Java job openings on any of the major search engines outnumber php by 100 to 1.

    56. Re:Seems like a silly move... by the+eric+conspiracy · · Score: 2

      All that abstraction and IIOP communication kills performance.

      1. J2EE doesn't require you to use EJB. I've written several J2EE sites that don't use EJB, and they work great.

      2. EJB 2.0 doesn't require IIOP. You can use a local interface. This pretty much eliminates the speed penalties with using EJB.

    57. Re:Seems like a silly move... by Pengo · · Score: 4, Informative


      All the slow EJB installs I have seen have the following problems:

      Use of remote classes where local ones would make sense. Use a session bean to aggrigate the results of a few beans and send out the result you need.

      Bad database design or just poor JAVA programming.

      I have studied EJB extensivly , and can usually get near database-query speed if I think hard enough about what I need. I have read that remote objects should only access session beans, and this is a pretty good idea for the most part.. Your calls should be fewer and pull down the data it needs rather than make LOTS and LOTS of calls...

      Anyway, it's a pretty elegent solution and really forces you to think about design. Solutions such as Caucho's Resin CMP makes it even easier to use an EJB solution for object-relational managment and , with resin imparticuarly is easier than using a roll-your-own JDBC based code.

    58. Re:Seems like a silly move... by the+eric+conspiracy · · Score: 4, Informative

      It's slow, it's a memory hog,

      Nonsense. J2EE's threaded model is far more effecient than Apache/PHP's process per connection model because of the memory sharing. In terms of speed, App servers like Resin

      http://www.caucho.com/articles/benchmark.xtp

      do just fine against PHP in terms of speed.

      it doesn't deliver on the write-once-run-anywhere promise of Java because of the vendors' difference

      True a few years ago before Sun started validating app servers. Now not so true. The ServerSide.com runs on a cluster of machines where each machine runs the same code base on a different vendor's app server.

      What I want to know is how come no PHP advocate mentions scalability? How do you pool arbitrary objects, or cache static data in PHP? How do you distribute sessions in PHP????? What happens when you want to cluster that PHP site??

    59. Re:Seems like a silly move... by glwtta · · Score: 3, Insightful
      Hm, I'll write off the "it's slow" comments to you not knowing what you are talking about - this is very obviously very false (especially for web apps)

      I just wanted to comment on the write-once-run-anywhere thing. I develop code on Linux and Windows with Tomcat and JBoss, the code is deployed in production on Solaris and Tru64 with Weblogic (in addition to the former), and I don't have to change a line of code to go between them - that's good enough for me.

      Anyway, if you claim Java's performance is abysmal (in any area except 3D graphics) you just haven't looked at the damn thing in a few years.

      --
      sic transit gloria mundi
    60. Re:Seems like a silly move... by glwtta · · Score: 2

      Actually the Overrated mod was right, this comment is just not Insightful - they aren't rewriting their old stuff. And come to think of it, that was just a silly thing to say.

      --
      sic transit gloria mundi
    61. Re:Seems like a silly move... by jallen02 · · Score: 1

      I was speaking of Java in general, not Java on FreeBSD. I do realize it is not the greatest on FreeBSD. I just had broad sweeping statements about a language in general. The language is capable. Implementations may vary some.

      Jeremy

    62. Re:Seems like a silly move... by Pengo · · Score: 2

      >Further, I've heard of nothing but trouble in the form of memory leaks running apache/tomcat on linux. Of course, I've never seen anything resembling java work well on a linux box.

      Hmm.. JAVA can be slow, as anything else. I don't know where you would be seeing memory leaks, in java? Have you profiled the code? I actually hate Tomcat (think it's a POS), but I have had it running a corp website of a company I worked at for almost 2 years with CRAZY uptime. It's running on sun's jdk 1.3.1 and gets a fair amount traffic. I have had MUCH better success with Caucho's Resin product than with tomcat both in performance and less tempermantal, but thats my opinon. The corp site hasn't had enough problems running on tomcat to even justify upgrading that system though. If I remember right it's running on a low-spec PIII too, not a 'blazing penguin' by any means.

      Not to poke at you, but 99.9% of the JAVA websites that suck suck for a couple reaons...

      VERY poor java programming, ie poor use of the database , etc.

      VERY poor JSP implimentation of JAVA Beans that where written as Objects.

      Also, if your using things like a database pool, and not handling the connections properly, it can cause problems.

      As for the performance, with JAVA in the right hands, it can definately do quite well. Especially if you can get a grip on the session managment, caching, application scope beans.

      I have used a product called OSCache (opensource), which is a tag-lib library for JSP level caching.. it gives an INSANE level of granularity. We have a server that has gone from producing 2 pages per second to almost 10 pages+ per second, VERY fast for a multiple-language/multiple-skin based system.

      We cluster these across about 10 machines, and have had tremendous success. The system is almost 2 years old, but we have very very very few problems with it. It runs on a cluster of Linux Debian servers too. (IBM JDK 1.3.1).

      Don't discount JAVA as being rotten on linux, I have found GREAT success in deploying my java apps on linux.

    63. Re:Seems like a silly move... by shepd · · Score: 1

      >Java job openings on any of the major search engines outnumber php by 100 to 1.

      Just like RPG 4 years ago.

      So, with my new RPG/400 skills (which, unfortunately, I do have), tell me, just where can I get a job?

      Clear? Good. :-)

      --
      If you could be told what you can see or read, then it follows that you could be told what to say or think - BoC
    64. Re:Seems like a silly move... by photon317 · · Score: 4, Funny


      1) I see Java-lovers have knocked me down -2 overrated so it's back down to 3. Way to squelch opposing opinion there.

      2) To ALL the repliers here: I know exactly what I'm talking about. I have coded expertly and will continue to do so in everything from x86 asm to C to C++ to Java to Perl to ..... enough to know. I have written enterprise-class multi-platform java software with 100,000 users and a terabyte database behind it. I've written dos .com program using "copy con" and the numeric keypad, and everything else inbetween. I'm here to tell you, Java is a fucking pig, and you need to realize it. Don't fool yourself with propoganda just because Java is your life and income.

      --
      11*43+456^2
    65. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      "We have a server that has gone from producing 2 pages per second to almost 10 pages+ per second, VERY fast for a multiple-language/multiple-skin based system"

      you have got to be joking

    66. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      Wow, a whole 10 pages per second! ;)

    67. Re:Seems like a silly move... by walt-sjc · · Score: 2

      Oh please. Solaris x86 is SUCH a dead product. Sun hasn't given it any respect. Yeah, they revived it from the pit of doom due to some loyal users noisy protests, but that won't fix the horrid hardware compatability, and the total lack of third party vendor support. As long as you don't use ANY commercial code, and use totally generic (old) hardware, Solaris x86 may be OK. I ran a medium large web site on it a couple years ago (~30M page views / day) with 40 Solaris x86 production boxes and a smattering of larger sparc boxes, and my experience with it is to avoid x86 solaris at all costs.

    68. Re:Seems like a silly move... by jchristopher · · Score: 1
      Right now I happen to be looking at roadrunnersports.com, a JSP site. It's horribly slow. Another one is officemax.com, also written in JSP.

      It sure does seem that when I see a JSP site, more often than not, it crawls.

    69. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      Check out the site http://avert.com

      Very slow...written in Java

      This is just one of the Java sights I know about. I have yet to see a "fast" sight.

    70. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      Why should anybody who can't spell "you're" be trusted?

    71. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      but for enterprise level applications and for quite a few tasks it just isn't there.

      Could you be more specific, please? And, what exactly is an "enterprise level application"? Complicated? Large?

    72. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      "How do you distribute sessions in PHP?????"

      Use a database, wise guy. Or, if that isn't "cool" enough for you, try PHP's msession.

      Don't assume something has shortcomings just because you don't know what you're talking about.

    73. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      I hear you. Mindless drones preaching the virtues of Java - the first and only programming language they know. They have no basis of technical comparison and just repeat Sun's mantra over and over again: Java is not slow, Java is memory efficient, Java is not slow. Java is a fucking memory pig - strings in particular. Nevermind the fact that it is a rigidly type and longwinded compiled language. You need 3 times the number of lines of Java to accomplish the same thing as PHP.
      And before you mod me down - don't forget to passivate your remote ass-entity interface. Bullshit dot bomb jargon invented for a bullshit language.

    74. Re:Seems like a silly move... by shacker · · Score: 1

      Not sure what you mean about not being able to schedule PHP scripts to run. I do just that for several recurring tasks - PHP scritps I've written to do log crunching, and to generate all the static HTML at www.kissthisguy.com once a day. The PHP scripts are run via cron just like any other script would be. I'd far rather do things like this in PHP than in perl. It's a cleaner language (to me).

    75. Re:Seems like a silly move... by lateefj · · Score: 1

      The PHP scripts are run via cron just like any other script

      So you use cron to schedule you PHP scripts not PHP. The main distinction I believe I am trying to make here is that PHP runs in a Apache process. Java runs in some type of EJB server. All the EJB servers I know of support some type of shedule event by desing. This is a more eligent implementation IMHO. Also there are a lot useful API's that can be access from Java into the EJB server than PHP into Apache. I guess it just boils down to flexablity and features. Java provides more of both for serverside programming. Threads can be created that run long past the connection closes. In PHP you do not have access to Threads.

      --
      Pedro For President!
    76. Re:Seems like a silly move... by Anthony+Boyd · · Score: 2
      What I want to know is how come no PHP advocate mentions scalability?

      The biggest Web site on planet Earth is using it. I suspect it can scale.

      How do you distribute sessions in PHP?????

      Wow. Someone needs to mod your comment down as "uninformed." PHP sessions can be written to a shared disk, or can be written to a database server. Your server farm can easily share that data.

      What happens when you want to cluster that PHP site??

      You mean, like Yahoo's 4,500 servers?

    77. Re:Seems like a silly move... by ceejayoz · · Score: 2

      The static pages loaded fine, but clicking on the "Create Profile" link took about 30 seconds to load. Refreshing it took a similar length of time.

    78. Re:Seems like a silly move... by jpmorgan · · Score: 2
      So don't use FreeBSD. Use Linux.

      Linux? Christ. Linux's thread support is worse.

    79. Re:Seems like a silly move... by horza · · Score: 2

      I thought I read somewhere that you can do pass by refrence in PHP but I haven't been able to find that link.

      Well typing "search by reference" into the search box on php.net gives this. The excellent PHP documentation is a great benefit.

      I've worked on large sites with companies that use either Java or PHP. For rapid development and pure web play apps PHP is simply amazing. I have a low end box here serving up over 900 web driven DB backed sites (around 100GB/month) and it's rock solid. The idea of using PHP for a complex app gives me the shivers though. For instance if you try and access a variable that doesn't exist, eg mis-typing a variable name, it just passes on a null value and carries on as though nothing has happened.

      I think both Java and PHP are very well designed for their jobs. If it's a web app, I wouldn't hesitate to use PHP. If it's 90%+ web, then it's worth looking at using PHP and interfacing it to the remaining 10% written in another language. For complex apps Java appears to be the way to go. Even if it requires expensive hardware to run on, a £20k server is only the same price as paying for an extra programmer needed to maintain a mass of sphagetti PHP code.

      Phillip.

    80. Re:Seems like a silly move... by jfbus · · Score: 1

      App servers like Resin do just fine against PHP in terms of speed.

      • Did you compare Resin with PHP with an accelerator (PHP-Accelerator for example - http://www.phpaccelerator.co.uk) ?
      • PHP is FREE (so is PHP-Accelerator). Resin isn't. Many big Internet companies don't wan't to buy 100+ Resin licenses (even if it's cheap)

      What I want to know is how come no PHP advocate mentions scalability? How do you pool arbitrary objects, or cache static data in PHP? How do you distribute sessions in PHP????? What happens when you want to cluster that PHP site??

      • Scalability is easy. You stack cheap boxes, like ppl from Yahoo! do (did you READ the Yahoo slides ?)
      • Caching data is easy. You've ready-to-use classes to cache output/functions/pages (jpcache, PEAR::Cache, PEAR::Cache_Lite)
      • Object pooling, clustering & distributed sessions are not an issue for most sites. If you need an elaborate session management, you probably won't end up using cheap boxes, OpenSource-only software, ... It's the same debate than the mySQL one
    81. Re:Seems like a silly move... by _underSCORE · · Score: 2

      Ummm... I work at officemax.com, and I have to tell you it's not java-based. It's on BroadVision which is just about as far from Java server pages as you can get.

      Just because a page has a .jsp extension doesn't mean it runs on java server pages.

      --
      "This is not a company that appears to be bothered by ethical boundaries."
      Attorney General Mike Hatch on Microsoft
    82. Re:Seems like a silly move... by danger42 · · Score: 2

      All the slow EJB installs I have seen have the following problems:

      Bad database design or just poor JAVA programming.

      Bad database design does not make EJBs slow any more than it makes ANY architecture run poorly.

      Use of remote classes where local ones would make sense.

      In EJB 2.0, there is an increased distinction between accessing local and remote interfaces.

      --
      -nd
    83. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      For instance if you try and access a variable that doesn't exist, eg mis-typing a variable name, it just passes on a null value and carries on as though nothing has happened.

      If you set your error reporting to maximum (as you should, atleast during developement) it will throw a fit accessing a variable that doesn't exist.

    84. Re:Seems like a silly move... by Tet · · Score: 2
      I know I shouldn't feed the trolls, but...

      So you use cron to schedule you PHP scripts not PHP.

      And you have issue with using the standard Unix scheduling tool that the rest of the world's been using for the last 30 years? I'm failing to see the problem. Instead you seem to be advocating that PHP reinvent the wheel to acquire some inherent scheduling system. Bizarre. Oh I get it. You want the world to make the same NIH mistakes that java did...

      PHP runs in a Apache process.

      Nope. PHP can run as an Apache module, but it doesn't have to. You can run it as a standalone process via cron, for example, as the original poster does.

      Threads can be created that run long past the connection closes. In PHP you do not have access to Threads.

      I can't think of a single occasion where this would be desirable. Far better would be to write the relevant information to a database while the connection is open, and process it offline via batch jobs run from cron, for example.

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    85. Re:Seems like a silly move... by Tet · · Score: 2
      Anyway, if you claim Java's performance is abysmal (in any area except 3D graphics) you just haven't looked at the damn thing in a few years.

      Wrong. I deploy Java code in the form of servlets and JSPs on a Solaris/Apache web farm, and I claim its performance is abysmal. I'm sure in certain circumstances, it's fine, but for what we're doing, it's painfully slow at times. Oh, and the requirement to include a compiler on a public facing production system really, really sucks.

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    86. Re:Seems like a silly move... by photon317 · · Score: 2


      Thank god there's at least one other voice of reason here, even ifhe is a coward. I can't believe someone modded my post funny. You really think any of that was a joke? In the interest of complete honesty, the 100,000 user java app only had 40,000 users, but it was stress-tested and designed for 100,000 to accomodate growth and for performance headroom. It ran on room-full of IBM SP/2 frames for app servers and a few E10Ks for the database. And the most of the DOS software I've written with "copy con" were extremely tiny utilities in the range of like 64 bytes long. Still, how many people do you who have ever written software directly in hex without looking at any books and without even a proper editor?

      --
      11*43+456^2
    87. Re:Seems like a silly move... by photon317 · · Score: 2


      AND... I've gained 3 new foes since I posted to this thread. Out of over 400 posts to slashdot, I've only ever acquired one foe, and then because I bash java performance the number quadruples? What a bunch of idiots.

      --
      11*43+456^2
    88. Re:Seems like a silly move... by lateefj · · Score: 1

      I can't think of a single occasion where this would be desirable.

      You are correct in web scripting there is no place I can think of either. But I am refering to application development specifically server side application development in which there is a lot of places that this is desirable. For example if you need to create a thread to communicat with SAP or any legacy application. Ofcourse PHP would be a bad choice to for integrating these types of systems (large systems). And so I digress.

      --
      Pedro For President!
    89. Re:Seems like a silly move... by angel'o'sphere · · Score: 2

      What a bunch of idiots.

      I think this is the reason why you: gained 3 new foes since I posted to this thread. Your bash java performance only shows your ignorance.

      Its technical impossible that a language/platform, where each script is per default compiled per usage and run in one process is as fast (not to talk about faster) than a architecture/language/platform where each request is dispatched by a thread and executed in *precompiled* and very likely *preloaded* native code.

      Yes, Java is compiled to byte code, however on an application server 95% of all byte code is native code after a while ... hot spot or JIT compiled during usage.

      Claiming PHP could come even close in speed to Java is like claiming a bicycle can catch up with a formular one car. Its technical impossible, regardless how "performing" the rider of the bike is.

      I asume the the existing hardware and infrastructure and "usage pattern" of a site like Yahoo does not need the speed of Java. They like to gain advantage from one of the pros they figured for PHP. Probably TOC :-) is a buzzword describing that pro.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    90. Re:Seems like a silly move... by the+eric+conspiracy · · Score: 2

      Use a database, wise guy.

      So I have to pull session data out of the database for every hit to the site? YOU HAVE GOT TO BE KIDDING!!!!

    91. Re:Seems like a silly move... by the+eric+conspiracy · · Score: 2

      Caching data is easy. You've ready-to-use classes to cache output/functions/pages (jpcache, PEAR::Cache, PEAR::Cache_Lite)

      That is only a small part of what a J2EE web server should be able to handle in terms of caching.

      Did you compare Resin with PHP with an accelerator

      There are any number of Java acceleartion strategies too; any effort to exhaustively study all vs. PHP accelerators of them in detailed comparisons would require far more resources than I have available. In any case I am sure that the speed results would depend as much on the application domain and programmer skill as anything else, so such comparisons are really a waste of time. The key point here is that I wanted to refute the persistant claim that PHP is faster than J2EE. The fact is that there is no important speed difference between the two.

      As far as the cost of Resin vs. PHP, if freedom is the important issue for you there are some perfectly free J2EE app servers such as Apache Tomcat which in it's 4.1.10 icarnation is a quite impressive product.

      In any case, if you were to read the slides Yahoo presented, thier primary reason for not chosing Java is the limitations of the OS they are using, NOT any deficiency in J2EE or superiority of PHP despite the posturing in this forum.

    92. Re:Seems like a silly move... by the+eric+conspiracy · · Score: 2


      Actually a search on Dice.com turned up 296 RPG openings, far more than the 48 PHP openings listed.

    93. Re:Seems like a silly move... by packman · · Score: 1

      Well - I am a currently doing embedded work in Java and I can't say he's entirely wrong. When you are working on embedded 68k of 386 (did both) with a small memory footprint (2 to 8mb for code+data+disk) you really know what makes java slow. The entire stream concept is very powerfull, but also very slow, and since amost all IO is done thru streaming, this has severe performance impacts. On these platforms there is also the issue that creating a new object certainly takes some time (however, on modern machines, this is not notable or even faster than not creating a new instance).

      Java as a language is very nice, but the runtime is the problem (and standard java-requirements) Indeed JIT's make it faster, but don't believe or assume that it will speed up your app that much...

      We made a Java->C "compiler" because a certain platform simply couldn't run java - so I think I know java a bit - garbage collection is hell. And since most Java application servers use "shared heap" you have lots of overhead when the garbage collector kicks in.

      On the other hand, a lot of folks here seems to underestimate the power, flexibility and speed of PHP. I also know the language pritty well, and PHP simply doesn't need such a "bloatware" runtime as java does. There also exist optimizer plugins for PHP (actually Yahoo is using one if you read the article/presentation) and you would be amazed what speed you could archieve with those. PHP also has a garbage collector, but since every page has it's own non-shared memory - the garbage collector doesn't have to be that complicated or accurate as the java-one because the memory will be regarded as "empty" on the next page request, no action has to be taken in runtime other than reference counting and auto-cleaning of objects with 0 references, and doing a bit more efford when it is really needed (but then your script is probably bugged or badly written) With the java-memory model - this is somewhat more complicated (and resource intensive).

      And last but not least - performance is very dependand on the writing style of the coder. Due to the nature of my job - I really pay attention to what I do and don't (as well in java as in any other language), and when I look into the (java) code of some guys from the web-department - it sometimes horrifies me. They assume memory and resources are there - and they shouldn't take care of that. Nothing is less true...

    94. Re:Seems like a silly move... by Anonymous Coward · · Score: 0

      I have written enterprise-class multi-platform java software with 100,000 users and a terabyte database behind it.

      Feh. "LOGIN.PHP" doesn't count.

  10. Dangers of PHP? I think not! by Anonymous Coward · · Score: 5, Informative

    I find it very funny that some people are posting comments suggesting there are security problems with PHP.

    PHP has had a few security problems but they have all been fixed very quickly, just like many other open source projects like FreeBSD and Linux.

    I find it very amusing the Perl programmers are shocked that Yahoo picked PHP instead of Perl. Perl has its uses but it is not designed for the web, PHP is.

    PHP is easy to learn, powerful and c-like which makes it good for rapid development and web based applications.

    I would have been very shocked if they picked Perl of PHP, in my experience PHP is faster, more secure, more feature rich, way easier to compile and maintain, and takes far less code to accomplish the same things as Perl.

    If you look at hotscripts.com you will notice PHP has more entries than Perl, this has only been the case for the last few months and though it is a small indicator it is obvious PHP is gaining popularity and it is well know it is the most installed apache module on the Internet.

    Furthermore if you don't code for PHP don't comment on it, you don't know what you are talking about.

  11. One Yahoo user's perspective by Waab · · Score: 5, Funny

    As long as the change doesn't cause me to lose the lead in my fantasy hockey league, Yahoo can do whatever it pleases.

    And, if I do happen to lose the lead in my fantasy hockey league, I now have something to blame it on.

    1. Re:One Yahoo user's perspective by Mantorp · · Score: 1

      hear hear. I'm in a similar situation being 11th in a league of 12. Crash site, crash. And I still think I have a decent team. Salo and Irbe are letting me down.

  12. PHP is *the* industry standard by rseuhs · · Score: 2, Interesting
    ...in the Internet space.

    It runs on all platforms, it is widely supported and deployed and you can get it at every webhoster.

    And there are running more Apache servers with PHP module than IIS servers altogether:

    securityspace

    Apache/PHP is marginalizing IIS and all other servers.

    Both Microsoft lovers and monopoly-whiners will hate it, but those are the facts.

    1. Re:PHP is *the* industry standard by BillGodfrey · · Score: 2

      PHP? Industry standard?

      Right...

      Bill, ISO/ANSI 9899:1999.

    2. Re:PHP is *the* industry standard by puppetman · · Score: 4, Insightful

      The concept of Industry Standard isn't defined by "running on all platforms".

      It means the software has a near monopoly on web development. It's popular, but so are CGIs, Cold Fusion, Flash, VB Script, Java Script, and of course JSPs.

      What irks me is that people haven't abandoned HTML for all but display. HTML was designed to be stateless; info wasn't remembered as the browser jumped from one page to the next. To overcome this, all sorts of gross, kludgy, slow and complicated technology has been created (including JSPs, PHP, etc, etc) to overcome the inherent statelessness of the web.

      The most interesting technology I've seen (and one that I hope will put these lame ducks out of their misery) is Curl, a programming language that runs in a plug-in (yes, sort of like Java, but more advanced, with fewer of the drawbacks). It was started at MIT via a US DARPA-funded project, and includes Timothy Berners-Lee, the creator of the World Wide Web and Director of the W3C, as one of the founders.

      I can't wait for the Internet to go back to what it's good at - serving up pictures of pretty, naked women.

      No, I don't work for CURL, or even for a company that uses the technology. I just think it's a better mousetrap.

    3. Re:PHP is *the* industry standard by rodgerd · · Score: 2
      HTML was designed to be stateless


      HTML was designed as a markup language. JSPs and PHP do not solve these problems. You mean "HTTP". And cookies provide some level of statefulness.

      As for Curl, let me quote Tim Berners-Lee back at himself:

      Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network


      Besides, Curl are dying and taking their technology with them.
    4. Re:PHP is *the* industry standard by NineNine · · Score: 1

      I was trying to poke around securityspace to check their numbers, but their site kept dying. Somehow, I have a hard time trusting any kind of server research company that can't keep their own servers running. You have any other stats?

    5. Re:PHP is *the* industry standard by puppetman · · Score: 2

      Yup - sorry - http, not html.

      Also made a mistake. Said: "I can't wait for the Internet to go back to what it's good at - serving up pictures of pretty, naked women."

      Should have said,

      "I can't wait for the World Wide Web to go back to what it's good at - serving up pictures of pretty, naked women."

      The Berners-Lee quote is not applicable. Curl is a plug in for a browser, and doesn't require a "best viewed with" label. Curl is an HTML replacement, but has a clean persistence framework via SOAP and XML (sending it back to a central server). Doesn't require pages to be refreshed with long URLS full of the items in someones shopping-cart.

    6. Re:PHP is *the* industry standard by Anonymous Coward · · Score: 0

      The quote is applicable. What about people who don't have the plugin?

    7. Re:PHP is *the* industry standard by shiflett · · Score: 1

      What in the world are you talking about?

      HTML, and this should not be breaking news to you, is a markup language. It is meant for display. What other uses do you think people should have for it?

      Also, HTML was not designed to be stateless, HTTP was. And, since it seems you have not heard, there is a mechanism in HTTP for maintaining state. It is called cookies. See RFC 2109, HTTP State Management Mechanism.

    8. Re:PHP is *the* industry standard by shepd · · Score: 1

      >Curl is a plug in for a browser, and doesn't require a "best viewed with" label.

      You mean that doesn't imply "best viewed with Curl"?

      How am I going to get my Arachne Curl powered?

      Thought so. :)

      --
      If you could be told what you can see or read, then it follows that you could be told what to say or think - BoC
    9. Re:PHP is *the* industry standard by puppetman · · Score: 2

      They get the plugin, I guess.

      Works on Windows (IE and Netscape), and I believe Linux is under development.

      But it doesn't work best in some browsers - works or it doesn't.

      Sort of like saying Flash (which is more ubiquitous) uses a "best viewed with browser xxx".

      Anyway, there are rumours that Curl is in trouble. Hope they open source and set it free.

  13. 4500 servers by clockwise_music · · Score: 1

    Can you imagine writing code to be deployed onto 4500 servers and get hit 1.5 billion times a day? That's nuts.

    1. Re:4500 servers by kriston · · Score: 1

      Heheh, I'm not imagining it--I'm doing it.

      Kris

      --

      Kriston

    2. Re:4500 servers by Duncan3 · · Score: 1

      15.B/4500 = 333K/day isnt even medium load.

      The problem Yahoo is that 0.5B/day of that is on the 3 servers they have for instant messaging, profiles, and chat. All of which barely work, and discard messages all the time.

      The other 1B/day are on the worlds largest porn collection known as Yahoo Groups.

      --
      - Adam L. Beberg - The Cosm Project - http://www.mithral.com/
    3. Re:4500 servers by Anonymous Coward · · Score: 0

      I've written code to run on 800+ servers getting at most a few million hits a day (ah, but not just hits, phone calls), if that counts... and yes, it's nuts. Mistakes are baaad.

  14. makes sense... by Anonymous Coward · · Score: 5, Informative

    ...considering it's initial creator is now a Yahoo! employee

    1. Re:makes sense... by rasterizerjay · · Score: 1

      wow, nifty. hopefully he'll do interesting things and coerece them into releasing the code.

    2. Re:makes sense... by Anonymous Coward · · Score: 0

      you and me both could write a web app that stores or queries links under categories in about 10 minutes.
      not to rain on your open source parade, but wtf good will the code to yahoo do for anyone (who doesn't work at yahoo that is)?

  15. Why not C Sharp by L33t-Geek · · Score: 1

    Why would they not "upgrade" to the increadable "secure" and "functional" C Sharp? LOL but seriously, PHP is a good move. I have seen alota sweet stuff done with PHP as of lately. -Geek

    1. Re:Why not C Sharp by Anonymous Coward · · Score: 0


      why do i have this strange feeling that you've never even used C#??? sure, you've seen it and played around with it maybe, but have you ever done a full blown project with it?? i doubt it big time.

  16. Time to buy SUN stocks ... by nick-less · · Score: 3, Funny

    yahoo will need more E10000's soon ;-)

    1. Re:Time to buy SUN stocks ... by tpv · · Score: 3, Interesting
      I know you're being funny, but Yahoo runs on FreeBSD.

      In fact one of the reasons they didn't use Java instead of PHP is that Java on FreeBSD isn't up to par.

      So it's time to invest in Walnut Creek... no wait it's BSDI... no wait it's WindRiver... oh damn it! I give up.
      *BSD is dying...

      --
      Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
    2. Re:Time to buy SUN stocks ... by Anonymous Coward · · Score: 0

      I think you mean EBay stocks...

    3. Re:Time to buy SUN stocks ... by Hal_9000@!!!@ · · Score: 2

      Actually, according to the slide show, Y! does have a few Sun systems that the acquired... (mail and something else). However, they may have migrated by now.

      --
      My email is real.
  17. Hot dog! by mao+che+minh · · Score: 3, Insightful
    I love hearing about the implementation of an open source technology by a major web prescence, especially a technology that is as useful as PHP. But this has more implications, such as the inevitable increased awareness of mySQL (should this move peak the interest of other companies, which will cause them to look into this while PHP thing, and no doubt come across mySQL). PHP is linked strongly to mySQL: you can't pick up a PHP book without half of it being dedicated to the open source database.

    Happy days.

  18. Is this even true?!? by Illuminati+Member · · Score: 2, Interesting

    Viewing Yahoo's press releases, you can see no information that leads us to believe that they are switching at all?
    Is this a story just to grab attention to the presentation?!?

    --
    Yeah, I'm a Republican AND a geek. It is possible.
    1. Re:Is this even true?!? by dysk · · Score: 2, Insightful

      Well, the fact that Yahoo is switching backends really is not of interest to most of the media. Looking at their other press releases, most of them are about either new services they are launching or about financial information. As far as most financial reporters go, they couldn't care less what backend it has as long as it keeps running. To the best of my knowelege this story is true, and it is backed up by the presentation made to the PHP Con 2002. Cheers, Erek Dyskant

  19. Ok so does this me Microsoft/ASP lovers will shut by smcavoy · · Score: 2, Insightful

    I'm really sick and tired of hearing about how ASP is better because it's "more professional". The largest site on the Internet thinks it's the best tool to use for it's massive, massive application, SHUT UP.

  20. Oh no, Yahoo's system works and is stable! by BillGodfrey · · Score: 2

    We just cannot have this! Let's change it to something trendy.

    And just what sort of language is C/C++ anyway?I've heard of C and I've heard of C++, but what is C/C++?

    1. Re:Oh no, Yahoo's system works and is stable! by watchful.babbler · · Score: 2, Funny
      And just what sort of language is C/C++ anyway I've heard of C and I've heard of C++, but what is C/C++?

      Code that uses malloc() and cout, of course. ;)

      --
      "Freedom is kind of a hobby with me, and I have disposable income that I'll spend to find out how to get people more."
    2. Re:Oh no, Yahoo's system works and is stable! by Anonymous Coward · · Score: 0

      It means they don't really know whether the back end was done in C or C++. :-)

    3. Re:Oh no, Yahoo's system works and is stable! by Palshife · · Score: 2, Insightful

      Well, I dont work for Yahoo! (and I'll assume that you don't either, otherwise you would have mentioned that) but it sounds to me like they would like to use something more organized than the scripting engine they've been writing for the past 7 years. What they have may appear to work just fine to the end user, but inside the vast codebase of Yahoo! there could be really serious problems.

      Think about it. After that long that thing's gotta be looking pretty ugly. With PHP they would have a more sane development environment. Writing your own C/C++ (interperet that as C AND C++, it is possible) scripting engine for CGI is just really sloppy most of the time.

      I could understand your concern if they were moving to something corporate like ASP. I would assume that Microsoft cut them a deal or something. But when someone like Yahoo! chooses PHP to develop in, you know theyre doing it for all the right reasons.

      --
      Attention deficit disorder is a complicated issue, spanning several major... HEY LET'S GO RIDE BIKES!
    4. Re:Oh no, Yahoo's system works and is stable! by Anonymous Coward · · Score: 0


      C/C++ is C++ written procedurally by an object oriented coder that is so productive that he/she does not need to waste time with inheritance/encapsulation, etc.

    5. Re:Oh no, Yahoo's system works and is stable! by edhall · · Score: 2

      More likely new and printf. At least in my experience, <cstdio> is often one of the last vestiges of C to remain in C++ code. It can be painful to go without printf-style formatting.

      -Ed
    6. Re:Oh no, Yahoo's system works and is stable! by Anonymous Coward · · Score: 0

      I have written applications in PHP/MySQL. Do you have any idea what that means?

    7. Re:Oh no, Yahoo's system works and is stable! by Anonymous+Brave+Guy · · Score: 2

      Nah, C/C++ is the language that uses malloc and delete. It's a highly evolved variant on the theme, only truly understood by the same experts who tell you that C++ has problems with memory leaks and buffer overruns.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    8. Re:Oh no, Yahoo's system works and is stable! by Washizu · · Score: 2

      I've heard of C and I've heard of C++, but what is C/C++?

      In the same vein I've heard of crack and I've heard of cocaine, but what is crack/cocaine?

      Just a thought.

      --
      OddManIn: A Game of guns and game theory.
    9. Re:Oh no, Yahoo's system works and is stable! by sandmoose · · Score: 1

      I attended this session. They never said they were reimplementing all of their C/C++ in PHP. They use C/C++ for all of the heavy duty backend processing. Currently, they have a mish mash of templating languages to call C/C++ routines and put pages together to serve up to the end user. They are simply replacing these scripting languages with PHP. Rasmus Lerdorf (who's now working at Yahoo) said in his keynote that he doesn't think implementing loads of business logic in PHP is a good idea for large sites. Instead he's a proponet of doing the intense stuff in C/C++ and using PHP as a wrapper for that code.

  21. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 5, Insightful

    PHP's biggest security problem is it's users. PHP is a powerful and easy to learn and use tool, which means it attracts a lot of new users. And the more new users you have, the more new user mistakes are made.

    PHP has made a grep step forward in disabling register_globals by default. Unfortunately, a lot of legacy code isn't built for this.

  22. No Wonder! by ender_wiggins · · Score: 1

    This must be why my yahoo mail hasnt worked for crap these past couple days....

  23. fascinating by erikdotla · · Score: 5, Interesting

    I'm glad Yahoo is moving to OSS and recognizes the dangers of proprietary software.

    I'm a Perl guy, and it was very interesting to note that:

    1. Perl beat PHP in all of their performance tests
    2. They listed TMTOWDI as a "con" yet,
    3. One of the requirements was a language that didn't require a CS degree to use. TMTOWDI helps that, I've noticed.

    I'm saddened that Perl has lost a major cheerleader but at least it isn't MS technology.

    Even so, I can actually see how PHP is more appropriate. For a site with lots of content, with code mixed in, PHP's "code in the page" model is more ideal. I've had to reinvent something similar in Perl many times, appropriate for whatever I'm working on at the time (I don't like Mason, I prefer my own solution.)

    I can see how a solution such as mine - where I prepare an output hash of data then show a webpage by opening and printing the file, using s/// to insert my hash contents with a search/replace method, isn't exactly ideal for Yahoo's high-content needs.

    While PerlScript somewhat solves this problem, I remember it being buggy and certainly not as mature as PHP in that regard.

    I can't say that I think this is a mistake on Yahoo's part - more like, I think if they wanted to, they could solve Perl's shortcomings and reap the benefits that Perl has over PHP. I guess they're just not interested.

    The presentation was a little vague, wish I knew more about the details of their decision.

    --
    # Erik
    1. Re:fascinating by ceejayoz · · Score: 2

      I'm saddened that Perl has lost a major cheerleader but at least it isn't MS technology.

      Lost? Yahoo! is switching from a proprietary system coded in C/C++ to PHP. I fail to see how that's Perl losing a cheerleader.

    2. Re:fascinating by 3am · · Score: 3, Insightful

      TMTOWTDI (from my experience with PERL) is definitely a drawback for large scale projects, and the presentation mentioned that there are 600+ engineers there.

      I would imagine the Yahoo engineers spend much more time reading other peoples' code than writing new code, and that (IMO) is where PERL is worst. Complicated tasks can lead to some truly horrendous looking code and very non-standard code organization. While it is fun to write and powerful, it can be awful to figure out what some other developer is trying to accomplish unless they are very disciplined.

      I once inherited a 1000+ line script at a previous company for analyzing IIS logs, and it was pretty difficult to get up to speed compared with comparable tools I've worked on written in Java, C/C++, or VB.

      (That said, I like PERL and use it whenever appropriate.)

      --

      A: None. The Universe spins the bulb, and the Zen master merely stays out of the way.
    3. Re:fascinating by rm+-f+DMCA · · Score: 1

      I'm glad Yahoo is moving to OSS and recognizes the dangers of proprietary software.

      Ummm....
      I'm all for open source, but this software is used within their company, and no matter what language they use, they don't need or have a reason to release it.

      And, last time I checked, the langauge doesn't make a difference as to whether the end product is open source or not. Take the Linux kernel for instance. What language is it written in? Under what compiler is it compiled? What licensing scheme does it use? Answer those and tell me how writing C programs is proprietary and using PHP is Open Source... And, is there some clause I don't know about in PHP that says you must release the source code?

      And remember:
      Proprietary != bad, especially when a company uses the proprietary code for their own use, even if the end result gets displayed publicly.

      BTW, I use PHP and some C to serve pages on my web server. The C programs run so much faster, but are of course much harder to maintain. And yes, I use Perl scripts to maintain the server

      --
    4. Re:fascinating by Anonymous Coward · · Score: 0

      Private proprietary languages are a significant problem when you consider that it is impossible to hire external developers with experience your language, that your only support for the language if it is broken is in-house, and only a few developers are actually familiar enough with the interpreter to actually debug and fix it.

      I don't consider open languages to be superior, but it's far easier to find people familiar with PHP/Perl/Java/C++ than it is with Uncle Joe Bob's Secret Scripting Language. Also, there are typically teams of engineers dedicated to getting Perl, Java, etc, working and working right whereas internal scripting languages tend to be overlooked. Maintaining your own language can become quite cost prohibitive, particularly if you need a whole separate team just to maintain it. Ugh!

    5. Re:fascinating by GigsVT · · Score: 1

      He's not talking about them open sourcing their web site code. He's talking about them using open source in general. Previously they used a closed source C/C++ scripting engine.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    6. Re:fascinating by Anonymous Coward · · Score: 0

      Mason isn't the only way to get "code in the page" There are lots of alternatives. eperl, HTML::Template, templatetoolkit, etc. There's a pretty good discussion of the pros and cons over at Apache . You might stop inventing the wheel.

    7. Re:fascinating by Anonymous Coward · · Score: 0

      I like and have written perl and php (and custom c modules for apache) for a (once upon a time) fairly large site and I would have difficultly choosing between them, if I had to choose just one.

      Problems with PHP:
      1) namespaces have to be enforced with coding standards.
      2) PEAR is a poor substitute for CPAN (and contributes to namespace pollution! PEAR's DB (database) object should be called PEAR_DB).
      3) PHP attracts more poor programmers (it attracts good ones too, but there are a lot of crap scripts out there - just take a look at 90% the templating systems for PHP).

      Problems with Perl
      1) The lack of sandboxing mentioned in the slideshow - mod_perl opens up the entire apache api to perl scripts, making it easy to leak memory or worse.
      2) Adding functionality from CPAN can cause your apache/mod_perl processes to grow quite large - the graphs on the slideshow already showed Perl using more memory than PHP.
      3) I guess it is a little easier to read obfuscated PHP code than obfuscated Perl code. On the other hand, good standards and documentation should make this a non-issue.
      4) IIRC, CPAN's database module standardizes databases, reducing them to the lowest common denominator. This makes the code more portable, but reduces its power/flexibility. (This may be completely wrong or a non-issue - I haven't looked at the Perl database situation in at least two years.)

    8. Re:fascinating by pHDNgell · · Score: 4, Insightful


      3. One of the requirements was a language that didn't require a CS degree to use. TMTOWDI helps that, I've noticed.


      I have to disagree strongly here. TMTOWTDI generally means that two implementations of the same design are different enough that someone without a lot of experience probably wouldn't be able to tell that they were the same thing.

      Having standard ways to do things makes it a lot easier to understand what's going on and makes it a lot eaiser to do things. Even in perl, people try to find a common way to do things, and it often ends up being regular expressions, even where there are far easier solutions.

      --
      -- The world is watching America, and America is watching TV.
    9. Re:fascinating by Anonymous Coward · · Score: 0

      what's up with this "proprietary" fud y'all are slinging around? why is it that when yahoo writes their own code in C++ it's "proprietary" but if they write their own code in PHP it's not?

    10. Re:fascinating by prator · · Score: 1

      Ok, I give up. I've spent more than 30 seconds on google looking for a definition of TMTOWDI. What the hell does it mean?

      -prator

    11. Re:fascinating by ceejayoz · · Score: 2

      There's More Than One Way to Do It

    12. Re:fascinating by Jeppe+Salvesen · · Score: 1

      When you write PERL, most knowledgeable Perl people tune you out.

      --

      Stop the brainwash

    13. Re:fascinating by Foogle · · Score: 2

      C/C++ isn't any more closed source than PHP is. The original poster is just Open Source Cheerleeding, and this article is only tangentially related to Open Source.

    14. Re:fascinating by GigsVT · · Score: 1

      God fucking dammit. The app wasn't written in fucking C++!!! It was written in the closed source "yScript2", with "business logic in C++".

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    15. Re:fascinating by alexpage · · Score: 1

      Discipline can be important, but IME you can tell a good perl coder by using appropriate constructs for the job - even using foreach() instead of for() when you don't need to access the iterator is a sign of good Perl, and an instance of TMTOWTDI.

      TMTOWTDI does seem like a disadvantage at times, admittedly, but it means you can use the same language in different styles depending on what is more appropriate - within a project, a coding style guide is appropriate, but generally those are useful no matter what language your project uses...

    16. Re:fascinating by alexpage · · Score: 1

      The method you described for your web generation seems to be a rudimentary re-implimentation of the Template Toolkit Perl modules, probably the best way to generate templated material in Perl, and certainly preferable (IHMO) to either having code in the HTML, or HTML in the code...

    17. Re:fascinating by erikdotla · · Score: 1

      The presentation indicates over 3M lines of Perl. I'd imagine their move to PHP is nearly total thus eliminating Perl as a major tool.

      When major companies like Yahoo are involved with Perl then they help the overall Perl effort - their vested interest in it drives them to make it better by participating in the development community. Now they'll be helping PHP, not Perl.

      And I mean that I'm glad that, when choosing which new system to use, where MS is an option, they chose not to go that route.

      --
      # Erik
    18. Re:fascinating by erikdotla · · Score: 1

      I agree totally.

      I've found that with a little extra studying of the language, TIMTOWDI isn't such a big deal. If you know the language well, you know many ways to do something, as the motto says.

      If you're programming perl and having a hard time reading some code because another programmer took an odd approach, you don't know the language well enough and shouldn't be working for Yahoo.

      I've found that TIMTOWDI gives you ways to make Perl programs short. I have a short attention span, and I'll write programs and not only forget how I wrote them a month later, but forget that I even wrote it. The size of the code is very important when I need to do maintenance.

      When most of my programs are less than one screen of code, it's damn easy to do maintenance on them.

      --
      # Erik
    19. Re:fascinating by erikdotla · · Score: 1

      Actually, I didn't mean at all what language they WERE using, since this article is all about new choices and moving forward.

      What I meant was, in their current position they had the opportunity to choose closed-source MS software for their new site. They didn't. This is good.

      You can be an open-source cheerleader by simply choosing to use PHP, even if you don't participate in the community at all. Kind of a mute cheerleader. You don't make any noise, but you're wearing the uniform.

      --
      # Erik
    20. Re:fascinating by erikdotla · · Score: 1

      I have to disagree strongly here.

      I say that it helps entry into perl for newcomers because the experience of newcomers will vary based on their prior experience. They can learn how to do things in whatever way is comfortable to them.

      If you have NO experience programming at all, I actually think Perl is a bad choice as it will promote bad habits. Structured languages are good for the newcomer to learn good habits.

      Perl is like a Dodge Viper. Raw, powerful, and can get you killed if you don't know what you're doing. But if you're experienced, careful, and think ahead, you can maintain control, reap all the benefits of the power, enjoy it, and stay safe. More structured languages are like Volvos - trying to keep YOU safe but robbing you of the experience of driving.

      --
      # Erik
    21. Re:fascinating by erikdotla · · Score: 1

      It's actually far, far more rudimentary than TT. It separates it better, but it's not as powerful as TT, there are many limitations.

      For most of what I do, this works fine - IE, a script that recieves input from a form, does some work, and outputs an HTML page with a few variables inserted into it. As long as the content of the variables is simple (IE text, not too many things like OPTION tags to dynamically generate a SELECT list) it works great.

      From what I can tell of TT, it really is mixing HTML and code. I don't like that, but it's really a personal preference.

      --
      # Erik
    22. Re:fascinating by erikdotla · · Score: 1

      TIMTOWDI, and one of those ways is inventing the wheel, if you so choose. So pbbbbtttt. :)

      I tend to prefer reinventing the wheel on projects that I'm the only person working on, and will ever work on - if it will greatly shorten and simplify my script, which makes it easier for me to maintain later.

      --
      # Erik
    23. Re:fascinating by erikdotla · · Score: 1

      I was referring to the forward-moving choice between MS and PHP, not the existing implementation. I should have been clearer. The choice to avoid MS is good (they mention $$ as a major factor in the presentation.

      --
      # Erik
    24. Re:fascinating by erikdotla · · Score: 1

      Actually, I just looked closer at TT (which I've never really looked at before), and notice that one (of many) ways to use it is pretty much identical to my method. So yes, you're right, I use a rudimentary implementation of TT.

      I should probably switch to TT since it has the benefit of mod_perl enhancement and is definitely faster, and is basically more mature.

      One thing I do like about mine is that it's literally a dozen or so lines of code with a very basic interface. Perl sends a hash of variable data to a sub which prints the page and inserts the data. Simple simple simple. TT is big and complex and unless it is WAY faster than my few lines of the same thing, I wonder if I need it. Time to run some tests! Thanks for pointing this out to me.

      --
      # Erik
    25. Re:fascinating by rm+-f+DMCA · · Score: 1

      Acronymfinder.com is a good place to look for this kind of thing.

      --
    26. Re:fascinating by Foogle · · Score: 2

      Regardless of what the Yahoo "app" was written it, it's no more "Open Source" now than it was before they moved to PHP, now is it?

  24. Why is PHP so bad? by Anonvmous+Coward · · Score: 5, Insightful

    I skimmed the comments so far and it seems like some people don't have a very high opinion of PHP. It's one thing to feel like something is better, but to despise it baffles me.

    I do programming in PHP and have found it not only to be useful, but quite an upgrade over ASP. Is there something inherently bad about PHP that should make me shy away from it, or is it more of a religious debate?

    1. Re:Why is PHP so bad? by watchful.babbler · · Score: 4, Interesting
      Is there something inherently bad about PHP that should make me shy away from it, or is it more of a religious debate?

      Praise the Lord and pass the pretty-printer! I'm not a PHP fan, but I don't think any of us can make a strong argument against it, except that it's not a general-purpose language, and thus falls into the same geek category as Cold Fusion, Office macros, and, well, ASP. There's a very strong bias against using tools crafted for the job when the job is defined as a presentation method.

      If you like, blame the tacit geek belief that any language they learn should allow inline assembler, have CORBA bindings, multithread, and let you hack a serial port monitor to control intelligent coffeemakers.

      --
      "Freedom is kind of a hobby with me, and I have disposable income that I'll spend to find out how to get people more."
    2. Re:Why is PHP so bad? by Anonymous Coward · · Score: 0

      PHP is a great language. Its easy to make dynamic web pages and such, and you can whip something up quickly.

      My beef is that it isn't robust enough for an enterprise sized web app. When you have a giant project, you want languages that take advantage of large projects. Like, normal apps, you'd use a nice OO language with libraries to choose from and industry standard, like C++.

      With webapps the choice for a large website is J2EE.

    3. Re:Why is PHP so bad? by edrugtrader · · Score: 0

      religious debate. PHP is GOD. ASP is the Devil. Java is worse than the devil.

      --
      MARIJUANA, SHROOMS, X: ONLINE?! - E
    4. Re:Why is PHP so bad? by puppetman · · Score: 2

      See my comment here

    5. Re:Why is PHP so bad? by asolipsist · · Score: 4, Informative

      PHP is not 'so bad,' but there are reasons why you might not want to use it.
      Here are a list of reasons why PHP may be suboptimal for web publishing.

      1. Lack of seperation between content and logic. Embedded logic code inside presentation can lead to a bewildering jungle of death for anyone who tries to maintain the code. Also, repeated logic must be maintained across all pages, instead of changing it in one place. (this goes for all ASP, PHP, perl type scripts)

      2. Performance problems with interpreted languages

      3. Can't take advantage of OO goodness. php is a flat procedural-like language, you can't do the robust object modeling, or any of the other spiffy OO things you can do with c++, java, (maybe .net) etc.
      4. HTML lock in. Your code will forever live in HTML, if you want a different display format (unlikely) you're stuck. ie. what if you want to have a propriatary client instead of html on your plam, you have to rewrite all the logic.

      5. Fancy features availible in Java (maybe .net) first. Oracle Objects, native DB connectors, will probably be written for Java before anyone tries to implement them (if ever) in PHP. You might not need these features of a small site, so its not that big of a deal.

      Don't get me wrong, i think PHP is great for certain types of applications, but for large sites like yahoo, I think they'd be better off choosing something else (they wont use java because they claim FreeBSD has threading problems)

      These are mostly addressed in the linked Y! eng slides. I'd be interested in hearing others opinion on this topic.

    6. Re:Why is PHP so bad? by Telastyn · · Score: 2

      PHP is much better (imo of course) than ASP or java or VB script. The problem lies in that most people that don't want ASP or java or VB want something that is either faster, or more compatable. PHP and perl are both faster and compatable, but perl is more of both compared to PHP, so most people just use perl.

      The other minor problem is just perception. Most people's perception is that PHP can only be used as a web scripting language for formmail and the such, and not for "serious" things like sys admin automation or enterprise sites, when it is largely useable for both. I've seen webservers and exchange clients in PHP. They are much slower than perl or C counterparts, but they are also about 1/3 of the code...

    7. Re:Why is PHP so bad? by Tablizer · · Score: 2

      you'd use a nice OO language

      Uh, some of us find that an oxymoron. You want to start a holy war again? OO has never proven to be objectively better.

      My beef is that it isn't robust enough for an enterprise sized web app.

      What exactly defines an "enterprise web app"?

      In fact, what defines a "web app"? I find the boundary rather fuzzy in many cases. Perhaps if there is one big fat EXE like the old days, the definition would be easier. But those days are hopefully gone.

    8. Re:Why is PHP so bad? by Anonymous Coward · · Score: 1, Informative

      There are several issues, IMHO, with PHP.

      The embedded within HTML process is a nightmare. Either your coders need to be HTML designers, or vice-a-versa. It shares this trait with both ASP, CF, and JSP. Coders tend to not be the artistic graphic artsy kind of folks that the HTML people are, and the HTML people don't think in the high level "gee, I could use a nice abstraction here rather than cutting and pasting code across 100 pages". There are certainly exceptions, but they're the exception rather than the rule.

      When I looked at it, PHP had different interfaces to different databases, which meant that the code for the mySQL DB was different than the code for Oracle. That's crazy (it may have changed). This presents a large burden should you ever decided to change your database.

      The folks writing the back end logic aren't working in the same environment as the folks USING the back end logic, which can end up in finger pointing wars. You would need to be proficient in both PHP and your back end environemnt to handle any problems. This may not be an issue with larger organizations, but with smaller companies it seems a waste to need to learn two different environments.

    9. Re:Why is PHP so bad? by shiflett · · Score: 2, Interesting

      Well, your items 1 and 4 seem identical to me, and this is also something that depends on the design much more than the language.

      My application designs always separate presentation from logic, but that's because I choose to. It might not be worth the extra complication for simpler solutions. After all, being able to embed PHP in HTML is part of why it has been so successful. However, this is just a feature of the language, not an enforced characteristic. For some reason, this seems to be a big misconception for many people.

      You can have functions that generate the presentation in your format of choice (HTML, XML, etc.), static files that you include, or whatever. I've written code in most every Web scripting language (though very little with ASP), and I never felt more or less restricted in this regard with any of them. No language automatically designs your application for you.

      Oh, and PHP has always had native database support for several databases. This is actually one of the complaints against it, as people like to write code that fits an abstraction layer instead, allowing them to switch databases. However, find some performance studies, and look at how well PHP performs with query-intensive applications.

      Your other points are all valid, though I for one have never understood the praise for OO.

    10. Re:Why is PHP so bad? by Grip3n · · Score: 4, Interesting

      I myself have been an avid user of PHP for many years and I love it, but true, there are many that despise it.

      Why?

      Because like Mr. Radwin says(the author of this presentation), PHP is simple to use. It has quite a bit of error protection and it deals with sloppy code. The elite programmers amoung us hate this - they see people whom have not spent the last 12 years of their life learning a language but producing the same (or similar) results. PHP itself is great, and the fact that a corporation like Yahoo! has decided to use it over all the other alternatives just re-enforces that.

      --
      To make a pun demonstrates the highest understanding of a language
    11. Re:Why is PHP so bad? by SoupIsGoodFood_42 · · Score: 2
      4. HTML lock in. Your code will forever live in HTML, if you want a different display format (unlikely) you're stuck. ie. what if you want to have a propriatary client instead of html on your plam, you have to rewrite all the logic.

      Bad example. If you wanted to do something for a Palm, you should code HTML, and write a browser for the Palm, and serve it a 'handheld' stylesheet.

      I also don't see how I'm locked into HTML. Yes, PHP does have a lot of pre-made functions out of the box. But that dosn't mean you have to use them.
      I've only ever programmed for the HTML/web, so could you please give me an example of how PHP would be much more work to compared to another language if somebody decided to use something other than HTML?

      Also, your code logic should not be affected that much if you're coding proper HTML and using CSS.

      Hopefully (from what I've heard), PHP5 will be better suited for OO etc.

    12. Re:Why is PHP so bad? by RAMMS+EIN · · Score: 1

      Although the parent makes an honest effort to enlighten people, I have to disagree strongly with some points.

      ``Embedded logic code inside presentation can lead to a bewildering jungle of death for anyone who tries to maintain the code.''
      While this statement is true, I find the ability to put code and content in one file a win. Need change? Edit one file.

      ``repeated logic must be maintained across all pages, instead of changing it in one place''
      I see no must here. include() and require() are there to be used. Put what you need on this page in this page's file, put what you need in multiple pages in a seperate file and include it in all the pages that need it. Simple, effective, elegant.

      ``Can't take advantage of OO goodness''
      OK. PHP is a procedural language. This keeps it simple. However, if you want objects, you can have them. True, PHP's object system is clumsy, but it's there.

      ``Your code will forever live in HTML, if you want a different display format (unlikely) you're stuck.''
      Not true. The fact that PHP was designed with HTML in mind doesn't mean it can't be used with other things. I've written PHP scripts that converted HTML to LaTeX and vice versa. The LaTeX could be fed straight to the parser to produce DVI, PDF, etc. PHP can also be used for general purpose scripting, e.g. in shell scripts. There's even a GTK add-on that allows PHP scripts to create GTK user interfaces.

      ``Fancy features availible in Java (maybe .net) first.''
      While undoubtedly true for some fancy features, it can't be true for everything. IMHO, PHP's database functions are unparalleled. This is a feature PHP has had even before .NET existed, and I don't think Java's database access functionality is quite as slick (despite Java's runtime environment being a _lot_ bigger than PHP's).

      Yes, I am a PHP zealot. Yes, I am biased. However, PHP is great, and chances are that if you try it, you will be a biased zealot, too.

      ---
      It's easier to get forgiveness for being wrong than forgiveness for
      being right.

      --
      Please correct me if I got my facts wrong.
    13. Re:Why is PHP so bad? by stu42j · · Score: 1

      1. Lack of seperation between content and logic.

      This is one of the most common critiques of scripting languages like php and perl and I certainly agree that not seperating content and logic is a major problem for larges apps but I just realized that I don't actually know what the alternative is. Afterall, there are many ways to seperate content and logic in these languages (templating systems for example).

      So, what are the alternative languages that natively support this seperation and how do the do it?

    14. Re:Why is PHP so bad? by Alarion · · Score: 1

      in response to #4

      any competent programmer can easily write their functions/classes to return raw data to allow your presentation layer decide HOW to display it.

      Granted, it was intended to be used primarily for the web, but it is quite easy to code your business logic in such a way that PHP-GTK and your HTML presentation layer could use the exact same set of functions/classes to do the exact same thing.

      The reason everyone makes this claim (about HTML and PHP being inseperable) is because one of two (or both) conditions are true:
      1. they have absolutely no clue (meaning, they don't use PHP)
      2. they are newbie programmers just learning PHP and HTML

    15. Re:Why is PHP so bad? by King+of+the+World · · Score: 1
      1 & 4 are the exact same thing, and like any language such as Perl you can intermingle code and display. The solution in any language is to template, and PHP can do that.

      2. PHP Accelerator or Zend.

      3. True. PHP's OO sucks arse. That's your only valid point.

    16. Re:Why is PHP so bad? by Alizarin+Erythrosin · · Score: 0, Offtopic

      1. Lack of seperation between content and logic. Embedded logic code inside presentation can lead to a bewildering jungle of death for anyone who tries to maintain the code. Also, repeated logic must be maintained across all pages, instead of changing it in one place. (this goes for all ASP, PHP, perl type scripts)

      Judging by all the comments in here about "100's of lines of code pasted in different files" and all that, it's obvious you've never written PHP... There is a little statement that's called require or require_once that will, GASP WHAT A CONCEPT, INCLUDE a file! You can write all this "100's of lines of the same code" in that one file and just include it in all your others! That's what I do for page layout. Call CommonHeader(), there's my navigation bar. CommonFooter(), there's my footer.

      Sheesh people, read a little about the language before you bash it

      --
      There are only 10 kinds of people in this world... those who understand binary and those who don't
    17. Re:Why is PHP so bad? by Requiem · · Score: 1

      PHP vs. perl is a religious debate, really.

      I like perl.

    18. Re:Why is PHP so bad? by glwtta · · Score: 2
      I am one of those people who "despises" PHP. Personally I started out with web apps on Apache/PHP/MySQL (heh, the "Infernal Trio") way back when PHP 4 was only coming out. I've since moved on to mod_perl and J2EE.

      So to explain, there are basically two things that contribute to this dislike. The first, and slightly more legitimate I think, is that PHP is very forgiving of sloppiness and just doesn't help instill good coding practices in those new to the field. It's sort of a side-effect of it being easy, but one tends to see a lot more bad code written in PHP than in some other languages. I realize that's not really PHP's "fault", but there you go.

      The second part has more to do with snobbery - PHP is a "beginner's" language, real developers use blah blah blah... you get the idea.

      In the end it's all that much posturing (and I'm as guilty of it as the next guy), but I do feel that it takes more discipline to write good PHP code than some other languages; and this is quite ironic given the whole "easy to use" aspect of it that's brought up so often.

      --
      sic transit gloria mundi
    19. Re:Why is PHP so bad? by the+eric+conspiracy · · Score: 2

      Is there something inherently bad about PHP that should make me shy away from it

      I don't like it for these reasons:

      1. Not strongly typed. I know that this may sound dogmatic, but it seems to me that keeping track of the data type is a job that can be done much better by the computer than the programmer.

      2. No standardized database API. Want to develop on DB a and later move to DB b? HA.

      3. I have seen (and had to support) way too much spaghetti PHP. It's powerful, but in the hands of the inexperienced can turn into a mess.

    20. Re:Why is PHP so bad? by Anonymous Coward · · Score: 0

      > The elite programmers amoung us hate this...

      I disagree. I'm elite and use PHP.

      I say it is the union minded/blue collar programmer mentality that hates this. Too easy -> less work for us.

    21. Re:Why is PHP so bad? by damien_kane · · Score: 1

      1. Lack of seperation between content and logic. Embedded logic code inside presentation can lead to a bewildering jungle of death for anyone who tries to maintain the code. Also, repeated logic must be maintained across all pages, instead of changing it in one place. (this goes for all ASP, PHP, perl type scripts)

      Try require() and include()

      2. Performance problems with interpreted languages

      Ask these guys about compiling PHP scripts. Alternatively talk to these guys about caching your interpreted, 'compiled' code.

      3. Can't take advantage of OO goodness. php is a flat procedural-like language, you can't do the robust object modeling, or any of the other spiffy OO things you can do with c++, java, (maybe .net) etc.

      Ok one point... I give you that...

      4. HTML lock in. Your code will forever live in HTML, if you want a different display format (unlikely) you're stuck. ie. what if you want to have a propriatary client instead of html on your plam, you have to rewrite all the logic.

      This is total bullshit.
      PHP fully supports ncurses for direct input.
      Also, I personally have written quite a few small daemons with PHP which had their own UI. Example code to write your own can be found under this section of the PHP manual.

      5. Fancy features availible in Java (maybe .net) first. Oracle Objects, native DB connectors, will probably be written for Java before anyone tries to implement them (if ever) in PHP. You might not need these features of a small site, so its not that big of a deal.

      PHP supports many, if not most of the standard (and non-standard) databases available.

      Not to flame, but I think you needed to be shown a little more of the world, it doesn't end at printf("Hello

      Before you flame, the parse error was intentional...

    22. Re:Why is PHP so bad? by Tablizer · · Score: 2

      1. Lack of seperation between content and logic.

      Because others have addressed this in a general sense, I will only ask for a specific example of PHP failing this. I agree that many programmers over-tie them, but don't blame the language for things that stupid programmers do.

      Note that HTML itself is a protocol. Thus wrapping a protocol with yet another protocol may be a bit too wrap-happy in some cases.

      2. Performance problems with interpreted languages

      Well in my opinion, compiled languages tend to have *human* developer performance problems. This is not 1970 any more, do we still have to pick a language that favors hardware over peopleware?

      3. Can't take advantage of OO goodness

      Well, some of us think that OO has no goodness, and is just a software engineering fad. If you are an OO fan, than stick with Java or something. Can't please everybody. Java is crappy at procedural, it requires too many path-happy annoyance dots and other pains for such. I applaud PHP for not getting too OO-happy with the rest of the buzzword lemmings.

      Maybe somewhere out there is a PHP/Python hybrid that will make both procedural/relational fans and OO fans happy.

      4. HTML lock in.

      There is NOTHING in the PHP library or language that hard-wires in HTML. If I missed it, then please name it.

      5. Fancy features availible in Java (maybe .net) first.

      You seem to be a Java fan. I think Java and its spehgetti intertwined API's suck, but if you like it, then go for it. PHP is obviously not for you.

      Your complaints seem to be philosophical rather than absolute shortcomings. PHP has a different philosophical underpinning than Java. Which one you pick as being "better" probably depends on your base philosophies about programming and software engineering. I think we would have to address these from a paradigm perspective *first* before battling out our differences at a language level. This includes how to make "large" or "scalable" applications. I tend to use the database as the large-scale glue and message-management tool, while OO fans tend to use programming code. The second does not sit well for me. But, every head is different.

    23. Re:Why is PHP so bad? by lateefj · · Score: 1

      Try require() [php.net] and include() [php.net]
      Use it all the time. I don't think it is nearly as good a packages in java in a large project. Small projects it works great.

      Ask these [zend.org] guys about compiling PHP scripts. Alternatively talk to these [php-accelerator.co.uk] guys about caching your interpreted, 'compiled' code.
      Alternatively if you want the ability to take control over you application and really do some cool stuff with caching/cluster ect.. try these guys JBoss If you read about there Interceptors you may see what kind of control I am talking about.

      PHP fully supports ncurses for direct input.
      Also, I personally have written quite a few small daemons with PHP which had their own UI. Example code to write your own can be found under this [php.net] section of the PHP manual.

      And I quote from the link you posted "This extension is EXPERIMENTAL". PHP is a web scripting language. If PHP does not become a generic scripting language it will probably suffer the same fate ColdFusion did. Why reinvent what Python already does and better. Python is a much better scripting language I am trying to use replace Python with all the stuff I currently use PHP for because I get things like... threading, OO stuff, application servers, PASS BY REFERENCE and a whole lot more.If I want to script I use Python.

      it doesn't end at printf("Hello
      Your right you can extend all you want in C!! So you can get PHP to make RPC call into you EJB server when it is time to build a maintable, scalable large application. Not that you can't do it in PHP I have tried.. And I am sure you can it is just I found it a lot easier, faster and better to do it in Java.

      Just thought I would add my flame to the fire.
      Lateef

      --
      Pedro For President!
    24. Re:Why is PHP so bad? by Reziac · · Score: 2

      Well, speaking as a lowly user [g] ... when PHP works, it leaves ASP in the dust (much faster, not near as many weirdnesses). When PHP doesn't work, there doesn't seem to be any workaround -- it's much harder to come up with a URL that gets me back into a useable part of the site. With an ASP site, I can often thrash around til I hit something useful again. That never works with PHP sites.

      Much the same with how well it gets along with my preferred (older) browser. When PHP gets along with my beloved NS3.04, I see zero problems. When it doesn't, the site is 100% unusable. But at least when it goes wrong, it doesn't crash my browser into the bargain.

      Don't know how much of works or not-works is Dumb Webmaster Tricks or js-vs-php (tho whenever I see a link on a PHP-based site displayed as "/#", I know I might as well give up and leave now).

      Anyway, my overall feeling about it as a user (and occasional HTML monkey) is favourable, for whatever that's worth.

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    25. Re:Why is PHP so bad? by Tim+Macinta · · Score: 2
      Is there something inherently bad about PHP that should make me shy away from it, or is it more of a religious debate?
      • magic quotes (a truly awful idea)
      • register_globals (OK, this mistake will hopefully start to fade away now)
      • promiscuous casting and lack of type checking (debugging can be a nightmare as a result)
      • half baked OO support
      • Way too many functions do more than one thing or do different things depending on how your config file is set up. This is a pain to deal with unless you know for sure you are only going to be running your code on servers you set up and configure forever. If you are using a hosting service, it can making moving to a different service far more problematic than it needs to be.
      Other people have said lack of separation between content and logic is a problem, but that's not a limitation of the language and is actually pretty easy to work around with a simple template library.

      People have also said that there is no standardized DB support. That's not true. There is an ODBC module that you can use to make ODBC calls from PHP and this works fine (I've used it on Linux and BSD myself).

      Despite all the reasons I listed above for why PHP irks me at times, I still use PHP for most web apps because:

      • It is very widely supported.
      • It runs on OpenBSD unlike any Java app servers (last I checked anyway, which was admittedly awhile ago)
      • It's open source
      • It's quite stable
      The bottom line is that it's not perfect but it's still the best tool for a lot of jobs.
    26. Re:Why is PHP so bad? by Salamander · · Score: 2
      repeated logic must be maintained across all pages

      That's a problem with crappy programming in any language, not specifically PHP. I've seen plenty of cut 'n' paste FORTRAN, C/C++, Java, Perl, and Python before.

      php is a flat procedural-like language

      Wrong. It's practically true of Perl with bolt-on OO bits, but has never been true of PHP.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    27. Re:Why is PHP so bad? by Sabalon · · Score: 2

      1) you can use include files and require files. Very easy to make a library, put the code in there and just call it from your program. You can easily do the same thing with perl and with ASP. Dynamic interpretted libraries anyone? :)

      2) plus and minuses with everything. Hopefully yahoo knows the diff between interpred languages and compiled.

      3) PHP does have some OO built in. I've not dealt much with it, but it seemed to be similar to Perl's OO.

      4) Uh...no. you can run PHP scripts from the command line. Now...if you make your PHP have tons of HTML in the output, then you may have some work...but that's like complaining that your KDE app won't run on the vt100 term...it was not the goal. Like #1, this is a matter of good programming and forthought vs. hacking something together for the web.

      5) Well, that all depends on where the developers though their money. Then again, when you go with any method of doing something, you have the same situation. Will such and such that I want to tie into have an interface for the tools I want to use? However, that is a "problem" with open source - you are at the whim of those who need things. You may have an interface for some obscure thing because one person who could code needed it, but for something a little more common no one had wrote the code yet. I'm at a tossup between using popen or just writing an OMAPI php mod for the ISC DHCP server. Too bad I'm lazy.

    28. Re:Why is PHP so bad? by Malcontent · · Score: 2

      "2. No standardized database API. Want to develop on DB a and later move to DB b? HA."

      In this respect it's exactly like PERL, Python, ruby, java, VB, C++, C, c# and a thousand other languages.

      Very few languages have a BUILT IN database abstraction feature. All the languages above use some sort of a LIBRARY to try and achieve database independence. PERL for example has the DBI library while the windows folks use ODBC or ADO.

      PHP offers several LIBRARIES for your pleasure. There is metabase, PEAR, ADODB, and the phplib libraries just for start.

      I am hoping that this post will once and for all clear up this stupid and ignorant critisim of PHP. Database access in PHP is as good or better then most languages.

      --

      War is necrophilia.

    29. Re:Why is PHP so bad? by kputnam · · Score: 1

      In addition to the other rebuttal post, point #2 is not a very big issue. With APC or ZendCache or whatever other methods to cache script compilation, the script is only compiled/interpreted (whatever PHP does) each time the original code changes. Furthermore, its common to cache the output of the page to a static HTML file or some other reusable cache... for instance pulling large amounts of data from a database with a complex and slow query, then formatting it with some less than efficient string parsing logic would be very slow if it had to perform this procedure every time. But if you cache the results of this operation it only happens once every so often and the most code you have to run through is checking if the output cache is still up to date.

    30. Re:Why is PHP so bad? by Malcontent · · Score: 2

      "magic quotes (a truly awful idea)"

      If you don't like it turn it off.

      "register_globals"

      If you don't like it turn it off.

      "promiscuous casting and lack of type checking (debugging can be a nightmare as a result)"

      Easy work around. Look up functions like is_numeric() or the ctype functions. I for one wrote a very simple function to retrive the value of a variable and to check for it's "correctness" in a few minutes.

      Having said all that a "strict" mode would be very nice.

      "half baked OO support"

      Nonsense. You obviously don't have a good understanding of how php objects work.

      * Way too many functions do more than one thing or do different things depending on how your config file is set up"

      Again nonsense. There are a lot of functions and that's a good thing but very few of them depend on some sort of a config setting.

      --

      War is necrophilia.

    31. Re:Why is PHP so bad? by hendridm · · Score: 2

      > and thus falls into the same geek category as Cold Fusion, Office macros, and, well, ASP

      I think ASP is fairly general purpose. VBscript can be used for system scripts (WSH), Visual Basic for Applications (VBA), web pages (ASP), and if you know VBscript you pretty much know Visual Basic 6 for making applications. Of course, for the most part, it only works on Microsoft operating systems, but in a great deal of environments that's okay.

    32. Re:Why is PHP so bad? by thing12 · · Score: 2
      1. Lack of seperation between content and logic.

      Because others have addressed this in a general sense, I will only ask for a specific example of PHP failing this. I agree that many programmers over-tie them, but don't blame the language for things that stupid programmers do.

      PHP - unlike mod_perl w/Template Toolkit or HTML::Template, or the .NET ASPx model, or JSP with custom taglibs - does not give you a method to cleanly separate your dynamic html from the code that creates the data that drives it. Sure, you can write your own, or write 3x the code (or more) to get XSLT to render XML but why not just use something that gives you a decent easy to use system out of the box. The point of separating code, content, and presentation logic is that you can have developers writing code, editors developing content and designers work on the presentation. And *none* of them need to know how to do the others job. Some people are good at all three, most aren't - that's just a simple fact. The Template Toolkit presentation language is very simple. It does just enough to make HTML dynamic without the burdon of the underlying programming logic. Likewise with ASPx or custom taglibs.

      I challenge you to show everyone just what the best way with PHP to accomplish a clean separation of presentation logic from code. And then we can count lines of code and judge the complexity.

      Note that HTML itself is a protocol. Thus wrapping a protocol with yet another protocol may be a bit too wrap-happy in some cases.

      I beg to differ... HTML is a mark up language - not a protocol. HTTP is protocol.

    33. Re:Why is PHP so bad? by Tablizer · · Score: 1

      I challenge you to show everyone just what the best way with PHP to accomplish a clean separation of presentation logic from code. And then we can count lines of code and judge the complexity.

      First I wish to ask you if the ability you seek cannot be added via a library/API/Framework. IOW, is the language (allegedly) flawed or just the libraries?

      For my views on web development, at least for the type of apps I work with, see:
      http://www.geocities.com/tablizer/webstif.ht m

      I beg to differ... HTML is a mark up language - not a protocol.

      I fail to see the difference. We seem to have a definition issue here.

    34. Re:Why is PHP so bad? by Tim+Macinta · · Score: 2
      If you don't like it turn it off.
      I can't. All of my web sites are hosted through hosting services and I don't have control over the PHP config file. This is also a serious problem for people who want to write PHP libraries because they have to take into consideration whether all these little things with side effects like magic quotes and globals are on. What I've had to do is write my own functions which work the same regardless of what the config file says. This turns off magic quotes in essence, but it's very annoying that it was necessary.
      Easy work around. Look up functions like is_numeric() or the ctype functions.
      That's not an easy fix, you still have to retrofit your code everytime a bug pops up in order to get the benefits. In strongly typed languages the compiler will let you know right away that something is wrong letting you squash bugs before deployment, whereas with PHP you could have a bug that's dormant for a long period of time and when things do break it may not be immediately obvious where you need to add the checks you suggest.
      "half baked OO support"
      Nonsense. You obviously don't have a good understanding of how php objects work.
      OK then, why don't constructors on PHP subclasses implicitly call the constructors of their superclasses?
      Again nonsense. There are a lot of functions and that's a good thing but very few of them depend on some sort of a config setting.
      Take a look at the settings in your /etc/php.ini file - there are a lot of them and quite a few of them alter the way that functions work. The magic quotes setting is far reaching and covers many functions. The stream wrapping settings are far reaching and cover many functions. Many of the other settings might effect one or two functions and in minor ways, but the subtelties can be your worst enemy at times because they are unexpected and sometimes unnoticed. And again, I cannot change my config file so I have to prepare for all contingencies as does anybody writing libraries.
    35. Re:Why is PHP so bad? by jonbrewer · · Score: 2

      If you like, blame the tacit geek belief that any language they learn should allow inline assembler, have CORBA bindings, multithread, and let you hack a serial port monitor to control intelligent coffeemakers.

      ColdFusion can connect to CORBA services. I use JacORB. ;-)

      This really is turning into a vi vs. emacs fight, all this PHP vs. Perl. But whatever. I mean, I like Pico. :-)~

    36. Re:Why is PHP so bad? by Anonymous Coward · · Score: 0

      So you don't have .htaccess support on your ISP? Sounds like it is time for a new ISP. Just about every php.ini setting can be set right in your .htaccess file.

      And no, magic_quotes_gpc affects exactly 0 functions. It has nothing to do with any functions. It simply escapes data in the user-supplied data so it can be inserted directly into a database without escaping. The current setting can be checked with an ini_get() call so building a portable app is rather trivial.

      As for the class constructor thing. That's just a design decision. Just because you are used to one way of doing things doesn't mean a slightly different approach is wrong. If you want to call the parent's constructor just do:

      $name = get_parent_class($this);
      parent::$name();

      Sounds to me like you just haven't quite done your homework.

    37. Re:Why is PHP so bad? by Tim+Macinta · · Score: 2
      Just about every php.ini setting can be set right in your .htaccess file.
      Hmmm... I did not know that. Thanks. That does make things a bit saner.
      And no, magic_quotes_gpc affects exactly 0 functions.
      Maybe not, but magic_quotes_runtime definitely does (I never said I was only talking about magic_quotes_gpc).
      As for the class constructor thing. That's just a design decision. Just because you are used to one way of doing things doesn't mean a slightly different approach is wrong.
      It also doesn't mean that the PHP approach is equally good - I would argue it's not. You weaken the abstraction barrier between the superclass and the subclass when you have to worry about whether or not to explicitly call the superclass' constructor. What happens when you decide that the superclass needs to be modified to do some initialization in its constructor when it didn't in the past? You need to go through and modify all subclasses to call the superclass constructor and you need to remember to call the constructor from any new subclasses you create. Conversely, implicitly calling the superclass constructor would automatically maintain the abstraction barrier without a significant downside, and thus would have been a better design decision.
    38. Re:Why is PHP so bad? by Malcontent · · Score: 2

      "I can't. All of my web sites are hosted through hosting services and I don't have control over the PHP config file."

      Not really true. Many of the PHP settings can be set in code at run time see the ini_set() function. Also some of them can be set in apache using .htaccess or httpd.conf.

      "That's not an easy fix, you still have to retrofit your code everytime a bug pops up in order to get the benefits."

      No you don't. Just write a function called getPostVar or getParameter or something and only use that function to fetch submitted variables. That way you can do all kinds of sanity checks and you are shielded from relying on global variables.

      "OK then, why don't constructors on PHP subclasses implicitly call the constructors of their superclasses?"

      You can call them explicitly if you like no big deal just another line of code.

      "And again, I cannot change my config file"

      Once again you can change many if not most config directives either via apache or at run time. Some settings are not changeable but that is done to protect the ISP. In other words it's a feature not a bug. If those protections did not exist then you would not be able to find anybody who even offers php web hosting.

      --

      War is necrophilia.

    39. Re:Why is PHP so bad? by mcrbids · · Score: 2
      It is generally a good idea to know what you are talking about before talking about it.

      1. Lack of seperation between content and logic. Embedded logic code inside presentation can lead to a bewildering jungle of death for anyone who tries to maintain the code. Also, repeated logic must be maintained across all pages, instead of changing it in one place. (this goes for all ASP, PHP, perl type scripts)

      There are a number of template solutions that you can use to avoid this problem. I work almost exclusively with PHPLIB's template class.

      2. Performance problems with interpreted languages

      Strictly speaking, PHP is not interpreted. PHP files are compiled before being run, and are cached for a while. This gives you a combination of great performance, much like a compiled language, with the write & immediate play of an interpreted language.

      3. Can't take advantage of OO goodness. php is a flat procedural-like language, you can't do the robust object modeling, or any of the other spiffy OO things you can do with c++, java, (maybe .net) etc.

      Did you pay attention to my answer to point #1 above? That bit about a class? Yeah, a class. PHP supports OO, in a clear, intuitive manner. Oh, and '.net' isn't a language.

      4. HTML lock in. Your code will forever live in HTML, if you want a different display format (unlikely) you're stuck. ie. what if you want to have a propriatary client instead of html on your plam, you have to rewrite all the logic.

      Only with very poor planning. You do plan your development before you start, right? There are plenty of template solutions you can choose. You can intersperse HTML for that quick 20 minute hack, use template objects for large projects that must scale.

      5. Fancy features availible in Java (maybe .net) first. Oracle Objects, native DB connectors, will probably be written for Java before anyone tries to implement them (if ever) in PHP. You might not need these features of a small site, so its not that big of a deal.

      As Yoda once said: "Hard to see the future is." - so I can't comment. But, did you know:

      • PHP is not web-only. I do large amounts of system administration and database manipulation in PHP. Its string handling abilities are concise, consistent, and powerful.
      • PHP is the most frequently installed Apache module. (As of a few months back, I couldn't locate current statistics)
      • PHP has bindings for GTK. That's right. You can write GUI applications using PHP if you like.
      • Using the Zend Optimizer, you can compile PHP scripts to binary code that can be distributed without revealing your sources.
      • PHP will be bundled with Netware.
      • A full featured Webserver has been written in PHP. Yes, the webserver itself. Features include HTTP/1.1, CGI support, name-based virtual hosts, server side includes, authentication, gzip content encoding support, Apache combined format and MySQL logging. Look out, Apache!


      Not that I'm a fanatic, or anything... but PHP is a powerful, fast, flexible language that's easy to learn, and easy to read.

      I can read somebody else's code almost immediately, unlike Perl or to a lesser extent, c, and the built-in functions for string handling allow me to get insane amounts of work done in a staggeringly short development cycle.

      Only people who don't know bitch about PHP.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    40. Re:Why is PHP so bad? by ceejayoz · · Score: 2

      When I looked at it, PHP had different interfaces to different databases, which meant that the code for the mySQL DB was different than the code for Oracle. That's crazy (it may have changed). This presents a large burden should you ever decided to change your database.

      Or, you could just use something like ADOdb.

    41. Re:Why is PHP so bad? by ceejayoz · · Score: 2

      3. I have seen (and had to support) way too much spaghetti PHP. It's powerful, but in the hands of the inexperienced can turn into a mess.

      Amusingly enough, that's been promoted as a pro of Perl earlier in this article's comments.

      You don't like PHP because it's possible to make bad code with it. Can you give a single example of a programming language in which you can't make bad code?

    42. Re:Why is PHP so bad? by ceejayoz · · Score: 2

      Well, you've just shown your lack of knowledge about PHP.

      Don't know how much of works or not-works is Dumb Webmaster Tricks or js-vs-php (tho whenever I see a link on a PHP-based site displayed as "/#", I know I might as well give up and leave now).

      That /# link is a link to an HTML anchor on the same page - usually, it's used when there's an onClick="popup()" attribute in the link code. It's purely a Javascript thing - PHP has nothing to do with it (and that particular technique is often used on static HTML, ASP, etc. sites)

    43. Re:Why is PHP so bad? by kris · · Score: 2

      1. SRM, the script running machine, is a nice and lean application server for PHP. It allows you to easily address the problem of repeated logic, and also a nice Model-View-Controller event-managing logic for your programs.

      2. PHP is bytecode-compiled just like Perl and Java. Using a PHP accelerator like the Zend Cache, that bytecode is kept around in memory for recurring requests.

      3. PHP's approach to OO was limited in Version 3, has been expanded significantly in Version 4 (Sebastian Bergmann has done very nice work in showing which Patterns apply to web programming and how they look in PHP) and will be complete in the upcoming Version 5.

      PHP still is a dynamically typed language, and the approach to programming PHP Version 5 will be much more Smalltalk than C++ or Java, though.

      4. Use XML_Transformer from PEAR or the XSLT abstraction from PEAR to create different layouts for your site, and put your content into XML pages. Cache the result using Cache_Lite or Cache_Lite_Output. Applying different transformations to your source XML will yield different output formats from a single source, and all layout will be contained in your Templates. If you do not like a functional programming language with a limited application domain such as XSLT, XML_Transformer is the tool of your choice: You can define your XML Transformations using all the power of PHP, and this includes incremental transformations, recursive transformations (not available in XSLT), and transformation targets such as PNG images or PDF documents or plain ASCII text.

      5. PHP is like the borg: It assimilates libraries. Nothing is easier to write than a wrapper around any C library that exposes the libraries functionality as PHP builtin functions. If there is a C library for it, it is available in PHP.

    44. Re:Why is PHP so bad? by ainsoph · · Score: 2

      how bout this?

      blah blah blah blah blah... yer an idiot..

      thanks for playing..

    45. Re:Why is PHP so bad? by Anonymous Coward · · Score: 0

      hahhahahhaaahaha
      hohohohohohohoooooh

  25. Why I'm excited about this. by heldlikesound · · Score: 5, Insightful
    Not that I give two rips about Yahoo, but I am glad to see PHP being embraced by companies that are considered "heavyweights" in the industry. It helps dispel the myth that ASP is the "industry standard" and paves the way for PHP / OS databases to be accepted or at least considered when beginning a project.


    It will be nice to go to a large corporate client that is looking for an enterprise solution (what the hell does that even mean) and say something like:
    "I'd reccomend using PHP and Postgres on the backend of the project, given Yahoo's recent success, I think the platform is powerful, sucure, and cost-effective."


    I realize that what Yahoo does in reality is irrelevant, but executives like to hear that kind of shit. Of course that assumes Yahoo can make it all work well, time will tell.

    --


    Cloud City Digital: DVD Production at its cheapest/finest
    1. Re:Why I'm excited about this. by Anonymous Coward · · Score: 0

      It also assumes Yahoo uses Postgres, which they don't...

  26. hah by Anonymous Coward · · Score: 1, Funny

    well, we'll see how much yahoo! likes dealing with the Exploit-a-Month club that is PHP. :-( buncha insecure-code writing hacks...

    1. Re:hah by Anonymous Coward · · Score: 0

      this will pretty much force them to get their act togethor then... hopefully.

  27. I was just writing php.... by friedmud · · Score: 1

    And took a break to come over here and see what's going on... but I just can't escape it!

    Seriously though, I love php. It has done a lot for me (several jobs while I am in college), and it makes my life easier (I use it to do all of my shell scripting and personal websites too).

    The language is good and solid - it is great to see it being used in places such as Yahoo, this means it is really coming to be accepted by large businesses and will mean it will be around for a while.

    Derek

  28. PHP Papers: PHP and security by Anonymous Coward · · Score: 0

    A few papers at this site involving php and security. Php has got to be one of the worst. www.cgisecurity.com/lib

  29. You won't see www.yahoo.com/index.php anytime soon by ntr0py · · Score: 3, Informative

    It should be pointed out that they have no plans of rewriting the entire site in PHP.

    Click on the "Early Adopters" section near the bottom:

    Most Y! properties integrating slowly
    - no plans to rewrite entire site

    So "Moving to PHP" could be a bit misleading.

  30. Yahoo moving to PHP by Frankierx · · Score: 1

    How does this effect my yahoo email account?

  31. PHP by Anonymous Coward · · Score: 1, Funny

    PHP: almost object oriented

    PHP: a problem for your problem

    PHP: at least its faster than java

  32. Typo? by Anonymous Coward · · Score: 0

    I think you meant losing. Loosing = To become loose.

  33. Hey, uh.... by autocracy · · Score: 2
    Just so everybody knows - now that they're using PHP instead of C++ doesn't mean it's not proprietary anymore. I'm pretty sure they're not going to go follow slashcode anytime soon...

    Since when is C++ proprietary anyway?

    --
    SIG: HUP
    1. Re:Hey, uh.... by lukew · · Score: 1

      You're absolutely right. They've mixed their terms up. The code they've written in C/C++ is proprietry in the sense that it's custom inhouse code. Moving to PHP will not change that in any sense. Moving to an OS platform doesn't mean they're going to OS their code. :)

    2. Re:Hey, uh.... by Anonymous Coward · · Score: 0

      Actually, if you would read the article, they are using a proprietary C/C++ scripting language, not actually using C or C++.

    3. Re:Hey, uh.... by Anonymous Coward · · Score: 0

      No , They are not using PHP instead of C++. They are replacing their proprietary in house scripting language (which was written in C++) whith PHP.

      The back end business logic continues to use C++. Also I imagine PHP itself is written in C++.

  34. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 0

    Go follow the link. It could be considered humourous!

  35. "hard to hire engineers who really understand it" by Anonymous Coward · · Score: 0

    Somewhere under "Costs of Proprietary Languages" in the slideshow, he says that it's "hard to hire engineers who really understand C++"? What? Listen, butthead, if they don't understand C++, they're not fucking programmers at all. They're idiots: Web-designers at best, pizza-delivery boys or sysadmins at worst. C++ is nothing an intelligent person can't learn thoroughly in a reasonable period of time.

    What he's really saying is that you need idiot-friendly toy languages like Perl and PHP so you can hire people who are not engineers of any description, because they're cheaper.

    Once that point has been clarified, it's a reasonable point and it makes perfect sense. No competent programmer wants to waste his time designing web pages; that's why PHP exists: So we can hand over the dog-work to losers who'll be glad not to be flipping burgers any more.

    Five'll get you ten, 95% of their PHP "engineers" first walked into the office with a pizza in their hands: "Thanks, guy, here's your tip. Oh, hey, wait a minute... Want a job working on our web site?" "Uhhh... duhhh... done it pay good?" "Yeah, yeah, shut the fuck up and sit down over there, okay, read this O'Reilly book tonight, I want to see some code tomorrow..."

  36. Interesting that they are not using linux by Anonymous Coward · · Score: 0

    I'm not saying that Linux is always better than BSD, but this also isn't the 2.0 kernel days where linux couldn't handle a load like BSD could. Plus Linux scales better and also has much more going on in the cluster area then BSD does.

    Again no flame, but performance wise linux is just better than BSD. I wonder if its a license issue?

  37. Lack of understand of how PHP works? by Inoshiro · · Score: 5, Informative

    "The drawback of using a code in template system, is that your code and HTML output quickly become forever intertwined."

    You see, the funny part here is that I write PHP, and I do not intermingle my XHTML and PHP at all.

    How does it work? Very simply! Your request handler parses the request, reads in any cookies, sets and changes, reads in the template from disk or cache, fills in the new variables, and pushes it to the client.

    Look, mah, no PHP/XHTML mingling! You move from a "myFirstPHP" model of HTML with PHP shoved in, to a proper model of a complete HTML document produced in anything with %%variables%% strewn throughout which are replaced at runtime by the PHP engine. With this separation of application logic and appearance, you get all the benefits of PHP with all the benefits of a separate interface code level (.NET WebForms does something similar, and Perl can easily do this too).

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
    1. Re:Lack of understand of how PHP works? by lanky_boy_2000 · · Score: 1

      I took the plunge and started using the SMARTY templating system with PHP. Complete separation of PHP and HTML. It's easy and powerful. Of course, with no more need to mingle code and markup, you almost wish you could use something more powerful than PHP. Python maybe.

      --
      What's not to be worried about? Everything!
    2. Re:Lack of understand of how PHP works? by levl289 · · Score: 1

      so maybe I'm too much of a PHP noob, but what about situations where you're not so much reading from session variables, but, instead, you're building a table from data in a database.

      The intertwining of code seemingly becomes necessary because you may need to provide a "seed" of html for something like a for() loop. So while you're shaving time off for not printing out each line of static html, it's html nonetheless.

      Beyond that, the ability to jump out of PHP is for me, the only reason why I'd need it. I could just as easily write a Perl CGI which parsed template files. CPAN by itself would be enough reason to do this.

      --

      Q: What do you think about American Culture?
      A: I think it's a good idea.
      (adapted from Gandhi)

    3. Re:Lack of understand of how PHP works? by TomServo · · Score: 1

      Good point, but I think that falls under the same umbrella as the "con" of There's More Than One Way To Do It.

      If you've got 600+ coders, I imagine the challenge of a) getting them all to agree not to mix up the Controller and the View (stuffing code in your HTML) and b) getting all of the coders to agree on style guidelines for perl code are very similar.

      I've inherited a lot of Mason code that has perl code interspersed throughout the HTML, and it's caused more than its fair share of headaches. It's even uglier in Mason than it is in PHP ;)

    4. Re:Lack of understand of how PHP works? by SnatMandu · · Score: 2

      You fix that by having a nice templating language like smarty, for example.

      Smarty outputs a value stored in foo: {$foo}

      Smarty loops over an array of hashes:

      {section loop=$foo name=var}
      {$foo[var].baz}
      {/section}

      The downside is that your templates sometimes end up looking like an uglier version of some ColdFusion page written by a drunken 6 year old.

    5. Re:Lack of understand of how PHP works? by Inoshiro · · Score: 2

      Uhm.. you merely collect your results in a variable. It's very simple.

      1) You load your template.
      2) You set your variable array up..
      In your case, you add $variables["searchtable"] = .. loop from db.
      3) You ereg_replace based on $variables key/value (where the %%key%% is replaced with value).

      $stringDbOut .= "<div type=\"DbOut\">"
      for()
      {
      $stringDbOut .= $dbStuff;
      }
      $stringDbOut .= "</div>"

      Viola! Assuming your CSS is ok, you have a complete section of code whose presentation is controlled via CSS, and is inserted into your document when the rest of its variables are populated.

      You should also be using divs and spans over tables. Tables are deprecated.

      --
      --
      Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
    6. Re:Lack of understand of how PHP works? by slamb · · Score: 2
      Smarty loops over an array of hashes. [...] The downside is that your templates sometimes end up looking like an uglier version of some ColdFusion page written by a drunken 6 year old.

      Actually, I can think of a couple other significant downsides: the information for the entire page must be gathered in memory before you can begin to send it out. A big part of perceived performance is latency, so that's bad. And the memory usage could also be bad. I wouldn't want to use your model on really big pages for those reasons.

      I'm working with Jakarta Struts and something roughly like the "Model 2X" mentioned a couple places on the web. It sounds similar to what you're doing, despite a complete different programming language: in my Actions, I do all updates and stuff that can totally change the layout of the page. The results of it (JavaBeans tied to the page, much like your arrays of hashes) are sent to a servlet of mine. The servlet produces SAX events from those and pumps them through XSLT, an incredibly flexible (and unfortunately sometimes overly wordy) template language.

      And here's where it differs: my servlet can produce SAX events from arbitrary queries as well. With an incremental XSLT engine (Xalan), it can process a single row and then discard the information; it's no longer needed. I don't think that's quite the structure the Jakarta people envisioned and it does have at least one downside. Error handling of those can't be as smooth since it has already sent out a good deal of the page. But it decreases latency and memory usage, and I think it's worth it. The queries I put there are not likely to error out and an unlikely fugly page is an acceptable compromise.

      The whole setup is very much a work in progress. I've got a messageboard currently implemented with one giant, ugly servlet that produces SAX output and sends it through some really nice XSLT [1]. This is my way of keeping the XSLT (which I was proud of) and get rid of the single giant ugly servlet (which I was definitely not).

      Plus, using XSLT has some other big advantages:

      • correct escaping; no cross-site scripting attacks. With most ways of producing HTML, you have to explicitly quote stuff. [2] Here, it's different: you have to explicitly treat stuff as XML fragments for that to happen. That way is much better from a security perspective.
      • it's more standard. Lots of people know it.
      • it's impossible to produce non-well-formed XML, short of disabling output escaping (which I don't). This is because of the first reason and because an XSLT template is itself an XML document which must be well-formed to run.
      • templates are much more reusable. I've got a standard resultset schema I use for SQL resultsets and a template that produces a nice, shiny stock table from it with greybarring and everything. I just need to override it for the exceptions, so it's much less redundant. A big part of why I'm so proud of my XSLT.

      [1] - feel free to check out the xslt if you like. It, the database schema, and the database queries (processed through xslt from the raw xml) are what I'm proud of. The rest of the architecture I've described is being written right now, really.

      [2] - I'm not sure if that's true for Smarty. It's certainly true for HTML::Template in Perl, which my first version of this software used. I was tired of having to specify escaping everywhere to be correct.

    7. Re:Lack of understand of how PHP works? by Dirtside · · Score: 2
      You should also be using divs and spans over tables. Tables are deprecated.
      According to what? The HTML 4.01 spec doesn't say anything about tables being deprected. I must have missed it. Can you point it out, please?
      --
      "Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
    8. Re:Lack of understand of how PHP works? by ip_vjl · · Score: 2

      With your method, you've just moved presentation code back into the logic.

      I'd rather let a few simple php elements be in my presentation template than let presentation code be baked into application logic.

      <? if (foo) { ?>
      display this
      <? } ?>

      seems to be far easier to maintain than wondering why there are references to old stylesheet elements and uses of deprecated tags appearing in your output just because some smartypants decided that it was easier to load a whole table worth of information into a pre-HTML-formatted variable

      <? echo loadsAndLoadsOfCrap ?>

  38. 3m LINES OF PERL? by _ph1ux_ · · Score: 1, Flamebait

    3 Million lines of perl?!

    Well I am sure there are some perl monkeys on slashdot who will proclaim "Hell I can reduce that 3 millions lines down to 50 in perl!"

    1. Re:3m LINES OF PERL? by Anonymous Coward · · Score: 0

      I can reduce it to two.

      #!/usr/bin/perl
      $one_big_ass_line = "That sure does kick ass!"; $kicks_ass = 1; if($kicks_ass){print "$one_big_ass_line\n"; }

    2. Re:3m LINES OF PERL? by Anonymous+Brave+Guy · · Score: 2
      Well I am sure there are some perl monkeys on slashdot who will proclaim "Hell I can reduce that 3 millions lines down to 50 in perl!"

      I'm not sure about 50, but I reckon I can do 75 if I'm allowed to use the p/$@%/ operator and write seventeen consecutive instructions on one line separated only by logical operations. ;-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  39. Optomization by Daveman692 · · Score: 1

    Maybe with Yahoo using it they will decide to make the language a bit faster. There is a lot of slow parts in it such as function slashDot is different then function slashdot which is different from fucntion SlashDot. There is also a huge speed difference between echo and print. I want a language that is lean and mean.

    1. Re:Optomization by Anonymous Coward · · Score: 0

      ?

      Surely case sensitivity ("slashDot" being different to "SlashDot" etc) *improves* speed as it doesn't have to do any case conversion?

      Also, the speed difference between echo and print is negligible, and only then because print returns a value. Set up a script to test it out and use ab to check your thinking - you'll find little to no difference at all.

      Finally, note that Yahoo use ionCube's PHPA to cache their scripts - this reduced the "huge speed difference" even further.

  40. This will good for PHP by ejunek · · Score: 2, Interesting

    Besides being a move to an open-source-based solution, which is good for the community as a whole, this will be good for the development of Enterprise Level PHP. It has been my observation (perhaps a someone inaccurate one?) that PHP has long been overlooked as a solution for high-volume sites...and perhaps rightly so with PHP in its current state. But no doubt Yahoo! intends to make PHP work for them. I can just hope that some of their innovation trickles back down to the mainstream devlopment of PHP where it can be used to further improve its implementation.

  41. look at sourceforge by drugdealer · · Score: 3, Interesting

    Take a look at the top downloads at SourceForge. What is the most downloaded server-side web application?

    For those of you too lazy to click the link, the answer (at the moment) is phpBB. #2 is Webmin (Perl), #3 is phpMyAdmin, and #4 is PHP-Nuke. (I'm not counting JBoss as #4 because JBoss is the server itself rather than a web app designed to run on a server).

    So, we have
    1) PHP
    2) Perl
    3) PHP
    4) PHP

    BTW You can get #1 and #4 bundled together as LiquidNuke.


    1. Re:look at sourceforge by Anonymous Coward · · Score: 0

      Wow, that's super link clicking. The only thing you left out is a proof that popular == better. I guess because a million monkeys want r4d BBs on their s1t3z (phpBB, PHPNuke) and don't know SQL (phpMyAdmin), everyone should believe that PHP is better suited to Yahoo's needs than perl.

    2. Re:look at sourceforge by shiflett · · Score: 1

      For that matter, look at SourceForge itself.

    3. Re:look at sourceforge by drugdealer · · Score: 1

      looks like I need to address comments from two separate posters:

      > This doesn't tell me anything about the quality of these products. I cant speak for the others, but have you ever looked at the source for PHPNuke? It is a horrendous mess. Not only that, but the thing is routinely riddled with secuirty holes and other bugs. I had the displeasure of running it on my site for awhile, what a mess.

      > Wow, that's super link clicking. The only thing you left out is a proof that popular == better. I guess because a million monkeys want r4d BBs on their s1t3z (phpBB, PHPNuke) and don't know SQL (phpMyAdmin), everyone should believe that PHP is better suited to Yahoo's needs than perl.

      I made no claims about quality and I didn't claim that popular == better (nor am I about to supply a proof that popular == better).

      I'll repeat what I said:

      --START--
      Take a look at the top downloads at SourceForge [sourceforge.net]. What is the most downloaded server-side web application?

      For those of you too lazy to click the link, the answer (at the moment) is phpBB. #2 is Webmin (Perl), #3 is phpMyAdmin, and #4 is PHP-Nuke. (I'm not counting JBoss as #4 because JBoss is the server itself rather than a web app designed to run on a server).

      So, we have
      1) PHP
      2) Perl
      3) PHP
      4) PHP

      BTW You can get #1 and #4 bundled together as LiquidNuke.
      --END--

      As you can see, I didn't make much in the way of claims at all, except that certain software packages happen to be popular and that they use certain programming languages.

      As for "I guess because a million monkeys want r4d BBs on their s1t3z (phpBB, PHPNuke) and don't know SQL (phpMyAdmin), everyone should believe that PHP is better suited to Yahoo's needs than perl."

      Well, you said it, not me. I didn't make any such claim. If you're making this claim, well, I'm sure someone here will argue against you. And if you're not making this claim, why state it?

      But now I pose a question (again, not a claim). Why do we see PHP (as opposed to other languages) used in 3 out of 4 of the most popular (as far as we can measure by using SourceForge's statistics - of course, many popular programs are not made available through SourceForge) server-side web applications? Again, I'm not claiming that it is more popular because it is better (though others may make this claim). I'm not ascribing any reason to its popularity. I'm merely pointing out that PHP is popular, wondering why, and trying to keep an open mind about the possible explanations for its popularity rather than jumping to conclusions.

    4. Re:look at sourceforge by user2048 · · Score: 1

      Most Perl software would be downloaded from CPAN, not sourceforge.

  42. You gotta like this guy: by Rareul · · Score: 0, Redundant

    A corporate presentation with this included on page 20:

    "Why not ASP or Cold Fusion?
    Pros
    - lots of 3rd-party integration
    - professional support

    Cons
    - CF has ugly syntax
    - $$ for languages
    - $$ for Microsoft Windows "

    Bold added by me for emphasis
    ?sp

  43. There are many good reasons. by Anonymous Coward · · Score: 5, Informative

    I work for Yahoo!.

    We chose PHP because our proprietary scripting language didn't give us any performance advantage anymore. PHP is a language with a lot of use and a large group of people in the workforce that know it. We wrote our proprietary solution at the time because nothing else could give us the performance that it could. Things have matured, and with accellerators such as Zend, PHP is a fit for us. There are many more reasons outlined in the presentation. Read it.

    Some people here appear *angry* that we didn't choose [their favorite language] and all I can say to you people is "grow up." PHP is a fit for us. Your solution is a fit for you. Get over it. We know *quite well* how to run enterprise sites, and the decision to go with PHP was not made by the clueless.

    Yes, we use PHP. We use Perl. We use Python. We use TCL. We use C/C++. We use Java. We use Apache. We use FreeBSD. We use Solaris. We use Windows. We use Linux. We use GCC. We use GPL software. We use BSD software. We use proprietary software. We use a lot of things. This isn't really news.

    1. Re:There are many good reasons. by hondo77 · · Score: 0, Flamebait

      ...all I can say to you people is "grow up."

      Spoken like a courageous Anonymous Coward. Wait a second...

      --
      I live ze unknown. I love ze unknown. I am ze unknown.
    2. Re:There are many good reasons. by selectspec · · Score: 3, Funny

      Your fired.

      -your boss-

      --

      Someone you trust is one of us.

    3. Re:There are many good reasons. by Anonymous Coward · · Score: 0

      I work for Yahoo!.

      Riiiiiight AC, keep dreamin'

    4. Re:There are many good reasons. by T3kno · · Score: 5, Funny

      Um...just because you have an email address @yahoo.com doesn't mean you work for Yahoo!

      --
      (B) + (D) + (B) + (D) = (K) + (&)
    5. Re:There are many good reasons. by DavidNWelton · · Score: 1

      I would have liked to have at least seen Tcl listed in the "why we didn't choose X" section, as there are a lot of good reasons to use it, that jive very nicely with the reasons he gives for using PHP. AOL
      uses Tcl in their (free software) web server, for instance. There is also the stuff (disclaimer - I work on it) at:

      tcl.apache.org

      There are reasons not to use it, too, but it's a pity that it wasn't even investigated.

    6. Re:There are many good reasons. by G-funk · · Score: 1, Redundant

      Hmm, I think perhaps his boss may have a better grasp of english. It's You're not Your.

      --
      Send lawyers, guns, and money!
    7. Re:There are many good reasons. by glwtta · · Score: 2
      We know *quite well* how to run enterprise sites, and the decision to go with PHP was not made by the clueless.

      The problem is that most people on here are in fact clueless and they (oh hell, we) assume that everyone else must be as well ;)

      Besides, it's fun to bitch about shortcomings of languages (which all languages have) - it beats doing work, and makes us looks smart at the same time. I think.

      --
      sic transit gloria mundi
    8. Re:There are many good reasons. by Mr.+Piddle · · Score: 2, Funny

      I work for Yahoo!.

      When you say this in person, do they force you to sing it like a cowboy?

      --
      Vote in November. You won't regret it.
    9. Re:There are many good reasons. by Mr.+Piddle · · Score: 1

      It's been a while since I've used Tcl...does it still require programmer intervention to get useful error messages?

      --
      Vote in November. You won't regret it.
    10. Re:There are many good reasons. by DavidNWelton · · Score: 1

      Not really. Don't think they are quite as good as in some languages, but no worse, either.

      Tcl's not perfect, but it's worth considering for a lot of things, especially when you need something to use from C, or where you want to extend it in C. Think of it as a C library that provides a programming language.

    11. Re:There are many good reasons. by Anonymous Coward · · Score: 0

      Hmm, I think perhaps his boss may have a better grasp of english.

      Obviously never met my boss...

    12. Re:There are many good reasons. by Anonymous Coward · · Score: 0

      tcl? Rejected for the same reasons that LISP was. It sucks, and only academics use it.

    13. Re:There are many good reasons. by Anonymous Coward · · Score: 0

      your fired too

      -You're boss-

    14. Re:There are many good reasons. by Tablizer · · Score: 1

      I would have liked to have at least seen Tcl listed in the "why we didn't choose X" section, as there are a lot of good reasons to use it....

      First you cry over not being picked, and now you are crying over not being officially rejected? Jeez!

      This must be what it is like to run for president in a country with 30 tightly-bound ethnic groups. Now I understand why India's economy is so f___d. I have been enlightened today.

    15. Re:There are many good reasons. by ChiChiCuervo · · Score: 1

      I WANNA work for Yahoo!

      What are the chances you guys are going to bring in experienced PHP developers? or are you guys going to simply insist your dev staff add it to their repertoire.

      I'm seeing lots of companies moving to PHP based online development, but rarely are they aquiring PHP developers in doing so.

      Yes I'm bitching... I hate being unemployed.

    16. Re:There are many good reasons. by Reziac · · Score: 2

      I don't care if Yahoo uses tin cans and string so long as it WORKS, and doesn't break any existing functionality... AND doesn't become bogged down or browser-specific. One reason I still use Yahoo for certain things is because it doesn't give my *preferred* (old) browser or my shit 26k dialup a hard time.

      [insert burning desire to smack the moron who thought it'd be kewl to foist a portal onto tv.yahoo.com users, which BTW is completely broken at this very moment]

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    17. Re:There are many good reasons. by Anonymous Coward · · Score: 0

      You're can't spell

      -you're boss-

    18. Re:There are many good reasons. by Anonymous Coward · · Score: 0

      Works fine for me in Linux-Mozilla right now. What is broken?

    19. Re:There are many good reasons. by Anonymous Coward · · Score: 0
      I WANNA work for Yahoo!

      What are the chances you guys are going to bring in experienced PHP developers? or are you guys going to simply insist your dev staff add it to their repertoire.

      I'm seeing lots of companies moving to PHP based online development, but rarely are they aquiring PHP developers in doing so.
      This is probably because one of the typical motivations behind switching to PHP is so anonymous contractors can do the front-end work that your middle-tier/back-end engineers normally misspend their time implementing.

      No, mods, I am not baiting flames here. This is reality.
  44. HF2K ?? by gbitten · · Score: 1

    What does it mean?

    1. Re:HF2K ?? by Anonymous Coward · · Score: 0

      HF2K was the new version of their original scripting language. The original was named HTMLForms.

      Brandon

  45. Next Obvious Question... by DarkHelmet · · Score: 5, Funny

    If Yahoo can do it, why can't slashdot?

    --
    /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
    1. Re:Next Obvious Question... by Alarion · · Score: 1

      something about...

      my god can kick your god's ass

      err in this case
      my language can kick your language's ass.

    2. Re:Next Obvious Question... by Tablizer · · Score: 1

      my god can kick your god's ass

      Oh yeah, well my god is so great that he/she/it outgrew an ass. Has none. Asses are for transitional gods.

      However, he/she/it can emulate one using object-oriented closures wrapped in functional matrix agitators parsed through a relational set generator, all this without semicolons even.

    3. Re:Next Obvious Question... by Anonymous Coward · · Score: 0

      However, he/she/it can emulate one using object-oriented closures wrapped in functional matrix agitators parsed through a relational set generator,

      Dude, you watch way too much Star Trek

  46. For Y!'s Next Trick - PHP-Nuke by R-2-RO · · Score: 1

    Ok. Maybe not. But would have been funny.

    --
    Thank you. Drive through. (:wq)
    1. Re:For Y!'s Next Trick - PHP-Nuke by Alarion · · Score: 1

      no, that would have been a nightmare

      PHP-Nuke has to be about the best example of PHP newbie-ism at work :p A guy has an idea, he learns PHP and codes without half a clue as to how the language really works.

      I am one of the founders of Postnuke, and while I admit Postnuke isn't exactly my idea of "beautiful and efficient" PHP code, it is 1000x times more so than PHPNuke is.

      I guess I should note, I am no longer a member of the PN project ;)

  47. From slide 37: by Anonymous Coward · · Score: 1, Informative
    *.inc for function and class libraries
    Anyone wanna bet you can download all the good stuff plain text just by guessing the right url? (Sure, you can get sued over that nowadays, but still...) :)
    Might be awfully nice and useful info to have... (And since they're "giving back to the community anyway"...)
    Besides, who knows, they might just have made the classic beginners mistaken and put the database connectionstring (including username/password) in an .inc file as well...
    1. Re:From slide 37: by Anonymous Coward · · Score: 0

      Or perhaps Yahoo are actually clueful and understand how to block direct access to .inc files. Using a non-php extension for code that isn't intended to be executed directly is the correct way to handle this so all signs point at them actually understanding what the hell they are doing.

    2. Re:From slide 37: by jaydub2001 · · Score: 1

      actually, you just specify an include path(s) that is outside of the document tree of the webserver. PHP itself takes care of including the files it needs and the enduser isn't able to directly access them. This is basic PHP stuff here folks....

    3. Re:From slide 37: by King+of+the+World · · Score: 1
      Using a non-php extension for code that isn't intended to be executed directly is the correct way to handle this
      Prove it. It's PHP code. Why not .php?
    4. Re:From slide 37: by Alarion · · Score: 1

      in order to use an include file, it has to be recognized by Apache as a PHP file. As such, if you tried to invoke the file from the web directly, Apache would parse it as a php file and return you a nice pretty blank HTML page.

      nice try though ;)

    5. Re:From slide 37: by Anonymous Coward · · Score: 0

      Because if the code is written to be executed within a certain context, running it outside of that context could be a security problem. Better to completely eliminate that issue by not allowing files designed to be included to be executed directly. So naming include files .php and sticking them in your docroot is a bad thing to do.

      And no, someone said that Apache has to recognize a file as a php file in order for php to include it. That's obviously completely wrong.

    6. Re:From slide 37: by dhalgren · · Score: 1

      No, that's not true at all--try it. The webserver does not even come into the equation, since PHP is the one including the file, not the server.

      That said, if you have a policy like 'use .inc for library code', you'd *better* bloody well set a PHP handler for it in the web server config. I guess that would fall under the 'discipline' slide.

    7. Re:From slide 37: by Anonymous Coward · · Score: 0

      Giving back to the community? One of his slides actually say that they DON'T give back to the community. RTFA!

  48. Just dont use the pow() function by daver_au · · Score: 1

    I hope they don't need to use the pow() function on Yahoo. It's been broken in every release from 4.1.2 to 4.2.3. Sure, they fix the bugs, but never actually put the bug fix out. Maybe, just maybe, we will have a working version of the pow() function in 4.3.0

    1. Re:Just dont use the pow() function by Wonko42 · · Score: 2

      pow() sure seems to work just fine to me...

  49. one language fits all? Don't think so by Tablizer · · Score: 3, Insightful

    but I don't think any of us can make a strong argument against it, except that it's not a general-purpose language

    I personally don't think a "general purpose language" is possible, nor desirable. If you try to optimize for everything, then it will end up being optimized for nothing. There ain't no free lunch.

    Besides, you are going to activate LISP fans to start entering these kinds of debates, and you don't want to do that.

  50. Think about the costs by truth_revealed · · Score: 1

    Let's see... PHP is free and WebLogic is, well, the exact opposite of free. Are you willing to wager a guess how much it would cost for licenses and yearly maintenance for 4,500 WebLogic servers? Let me give you a clue - it is not cheap. Yahoo has done as well as it has in large part by keeping its costs low - using FreeBSD, as an example.
    On the technical side, unlike Java, PHP does not have a compilation step so webpage development turnaround time is much quicker. Nevermind the fact that you can usually do most tasks in half the number of lines of code and half the development time in the PHP scripting language as you do with the statically typed Java language. Compare the two languages' associative array syntax, as an example.
    PHP has the ease of use of Javascript with much of the power of Perl. It's syntax is short and sweet with no need to declare variable types.
    That's why web developers and content providers love using it.

    1. Re:Think about the costs by broody · · Score: 1

      Let's see... PHP is free and WebLogic is, well, the exact opposite of free.

      So they use Jboss and suddenly it's the same price range. At least compare apples to apples.

      --
      ~~ What's stopping you?
    2. Re:Think about the costs by Anonymous Coward · · Score: 0

      JBoss is not even close to WebLogic in functionality. Apples and oranges.

    3. Re:Think about the costs by broody · · Score: 1

      I didn't say it was but it provides a hell of lot more functionality than PHP or .NET.

      --
      ~~ What's stopping you?
  51. Oh! Now this all makes sense.... by Anonymous Coward · · Score: 0

    [2:32am] *PHPDev (phpdev@dev.yahoo.com) has joined #php

    [2:32am] [PHPDev] hey, can i get some help with echo() ?

  52. AOLserver? by eager_agony · · Score: 1

    I wonder if they considered AOLserver and if so, why they ruled it out.

    1. Re:AOLserver? by R-2-RO · · Score: 1

      I agree. I've heard tons of great things about AOLserver. I hate the name, but what stopped me personally from using it before is tcl. Not a big fan of tcl.

      --
      Thank you. Drive through. (:wq)
    2. Re:AOLserver? by cpeterso · · Score: 2


      I doubt they would use AOLserver because FreeBSD's threads are pretty weak. In the presentation, that was the reason they gave for dismissing Java/J2EE.

  53. ... I disagree with a few points by cr@ckwhore · · Score: 3, Insightful

    I read their presentation, and its good. They make a good case for PHP, and I believe PHP is well suited for the task. However, I have to disagree with one of the slides.

    Looking at the "Coding PHP Takes Discipline" slide, they make a point that "The drawback of using a code in template system, is that your code and HTML output quickly become forever intertwined"

    Well, I disagree captain! PHP can be coded in many different styles. Coding PHP directly into your HTML files is common, but a really poor way of doing things. In fact, there is a better coding style.

    I do a lot of development with PHP. In almost everything I do, I separate the code from the output, meaning that the HTML takes the form of a template, and contains no PHP. The PHP scripts perform all data processing, and then pass the data through an abstracted interface to a templating system. Whatever the templating system does with the output is beyond the scope of the PHP scripts themselves.

    This is a similiar principle as ODBC... database is abstracted from the code.

    For example, yahoo's new scripts could pass the processed data into XSLT transforms, then out through any other page display mechanisms they choose.

    I do have to give credit to them however, because they did mention using "smarty". For those that don't know, smarty is a popular PHP templating system, one of many. But it seems like their mention of Smarty is more of an afterthought, than the attention they gave to discussion their dicipline in coding PHP inline with the HTML.

    To make this point short, PHP is far more capable than the inline style of coding that a few PHP developers use. In fact, that stems from PHP's old school days. Now that the product is extremely mature, the code can stand completely by itself. Since PHP has C/c++ style semantics, and contains most standard ANSI C functions, converting their existing codebase ought to be a rather boring task. I hope Yahoo! takes a serious look at the fundamentals of engineering their new system.

    --
    Skiers and Riders -- http://www.snowjournal.com
    1. Re:... I disagree with a few points by sd4l · · Score: 1

      Coding PHP directly into your HTML files is common, but a really poor way of doing things. In fact, there is a better coding style.

      In almost everything I do, I separate the code from the output, meaning that the HTML takes the form of a template, and contains no PHP. The PHP scripts perform all data processing, and then pass the data through an abstracted interface to a templating system.

      When I started programming in PHP, the previous programmer at my company coded this way.

      The advantage of this was is that the code is in one place (so I as a programmer can alter it) and the design is in another (so the designers can alter it).

      After a while it seemed to be a nightmare to maintain due to having to hunt around to see which files used which templates, so we went to coding in the HTML. This seemed easier to maintain, but the ideal of the former way seemed nicer. It was great being able to go straight to the script specified in the URL and see the code.

      Finally we have settled on using separate class files (mything.class.php) and just put the method calls and property displays in the HTML page. This means that the code can be changed in one place for the actual working of all pages, but it's easy to add in another property display in a specific page.

      Of course, when I started programming PHP it was on version 3 and the OOP code was, well, slow to say the least. Now in version 4, it's great. Shame you still can't have grandchildren classes (more than one level of inheritance), but that should come with Zend Engine 2 (and the version of PHP that will be based on it!).

      --
      -- Andy Jeffries Scramdisk for Linux (Change the orgy to org to reply)
  54. Yay for FreeBSD by Anonymous Coward · · Score: 1, Informative

    Yahoo is a great poster child for FreeBSD, the world's most robust free operating system.

    1. Re:Yay for FreeBSD by Anonymous Coward · · Score: 0

      "the world's most robust free operating system"

      Umm its not 1996 and its no longer more robust then Linux anymore. FreeBSD is a good OS, but its hardly universally the "most robust" free OS.

    2. Re:Yay for FreeBSD by Anonymous Coward · · Score: 0

      since when is Linux free, and since when is it an OS?

  55. Is yahoo still profitable? by Mustang+Matt · · Score: 3, Insightful

    I'm honestly surprised they've survived this long.

    --
    The man who trades freedom for security does not deserve nor will he ever receive either. - Benjamin Franklin
    1. Re:Is yahoo still profitable? by freaker_TuC · · Score: 3, Funny


      #1: make search engine
      #2: make portal in cgi
      #3: profit
      #4: make portal in php
      #5: more profit

      yes it is still profitable if you follow this businessplan :)

      --
      --- I am known for the ones who want to find me on the net. Is that a privacy risk or a privilege? One might wonder..
    2. Re:Is yahoo still profitable? by TheDormouse · · Score: 0

      Now get it right!
      It's:

      #1: make search engine
      #2: make portal in cgi
      #3: ????
      #4: profit
      #5: make portal in php
      #6: ????
      #7: more profit

    3. Re:Is yahoo still profitable? by ceejayoz · · Score: 2

      According to HarrisDirect, they've had positive cash flow since 1998 and have $926 million cash on hand.

  56. You forgot about Java... by Anonymous Coward · · Score: 1, Insightful

    Open Source (Apache and PHP) is the standard in the webserver space already

    Right now, only NBM (nothing but Microsoft) users and legacy systems run IIS


    I think you're forgetting about the hordes of people who run some sort of Apache+Java app server.

    For medium-large web businesses, I've mostly seen Java. I've only seen PHP for small businesses.

    1. Re:You forgot about Java... by Anonymous Coward · · Score: 1, Funny
      That's because large businesses go after hype, which they equate with reliability. PHP doesn't have the power of Sun's huge Java hype machine behind it, so large corps are reluctant to adopt it (Yahoo has always been innovative, using MySQL etc.). That's really all there is to it, everything anyone else will tell you is part of the hype machine.

      Nobody is better at hype than Sun, gotta give them that. Always overpromise and never deliver. Weren't we all supposed to be using Java thin clients and Java-rings right now surfing JXTA based P2P networks with our JINI powered devices? Right. The whole economy will be better off the day Sun finally goes away.

    2. Re:You forgot about Java... by urmensch · · Score: 0

      or maybe it's because JSP allows their engineering and production staff to be *cleanly* separated. perhaps this is more hype but I've never seen an easy way to seperate the code from the format in PHP. JSP was built that way.

    3. Re:You forgot about Java... by Pengo · · Score: 4, Interesting


      Some of the larger projects I have worked on , where integration is important and a key to the success of the product, JAVA seems to be the best bet.

      Not to say that things couldn't be done in PHP, probably can... but I have had a lot of luck in writing all my business logic and middleware in JAVA and then using JSP or Servlets + Velocity for presentation. The thing is, it's not something that someone can do without a middleware engineer and a implimentation engineer.

      I have been coding java middleware code ware for almost 3 years now, some of it integrates into web based services, some of it ties into legacy workflow systems and even tied into a IBM mainframe, I just can't IMAGINE doing all of that in PHP... I would of been laughed out the door of my company as a matter of fact with a pink slip in my hand.

      The strength of being able to pull in other 3rd party libraries for various tasks that come up, JAVA is first rate.

      I worked for a company that had a pretty complex logistics based system that integrated with a German logistics ocmpany.. was ALL done in PHP.. I couldn't believe it when I saw it to be honest, but to say the least... was VERY dificult to manage the application as it grew to many hundreds of classes and pages. The company ended moving to an EJB/JSP solution on websphere I think, and eventually was able to cut out about 1/2 of their engineers because the API became quite manageable by fewer people.

      You can't call JAVA hype any more than you can call COBOL, FORTRAN c/C++ hype, because the level of profound impact JAVA is having on the industry at the moment is to those levels IMHO.

      NOW.. if the project doesn't really reach beyond basic web applications, yes, even very large companies have such projects.. I see nothing wrong with PHP. It's actually a breath of fresh air when I need to hack something out quick and simple. I use HORDE+IMP for my own personal email and the email server for my wife on my linux box.

    4. Re:You forgot about Java... by Anonymous Coward · · Score: 0
      Nobody is better at hype than Sun, gotta give them that. Always overpromise and never deliver.
      Gee... you must have been asleep the past ten years while Microsoft promised a fast, half-way stable, half-way usable Windows-based OS for the consumer desktop. Only came out a year or so ago...
  57. Java nonsense.. by ProtonMotiveForce · · Score: 1, Interesting

    Their reasoning for throwing out Java seems like utter nonsense. What on Earth does FreeBSD have to do with anything?

    They used a red herring argument abuot thread support on FreeBSD (they should change OS's anyway) to discount what's obviously the best choice - Java technology.

    I hope more than this one PHP cheerleader is making the decisions on this.

    1. Re:Java nonsense.. by Anonymous Coward · · Score: 1, Insightful

      4500+ FreeBSD servers doesn't seem like an irrelevant reason to me.

    2. Re:Java nonsense.. by Anonymous Coward · · Score: 0

      You can't just change OS's on a dime. The cost of transitioning and having two active OS's at the same time is just too painful. We have considerable internal knowledge and infrastructure built around FreeBSD. It would have to be a damn good reason to make it worthwhile to change.

      Java isn't exactly open source. The license, the size of the monster etc also count against it. If/when PHP breaks, somebody can sit down with the code and actually have a good chance of finding what is wrong and fixing it. On the other hand, if the JVM blows up, you are certainly in the deep end. For the purposes of scripting, Java isn't that far out in front to make it compelling.

      There is no PHP cheerleader. The decision was agonized over for months by lots of folks.

      Just be thankful that it isn't M$/IIS/ASP.

    3. Re:Java nonsense.. by sg_oneill · · Score: 2

      Dude, your just saying that.
      The guy gave a fairly cogent reason that Java does not scale well on FreeBSD because of screwey threading.
      The problem is, it's true. FreeBSD is not a friendly environ for Java.
      Get over it and live with it. The anger will pass.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    4. Re:Java nonsense.. by ProtonMotiveForce · · Score: 0

      I can agree with the FreeBSD issue, I guess... The rest I don't, but the point's moot.

      I'm actually more thankful it isn't Perl. Good lord, I wish people would quit trying to develop "real" applications with that lumbering piece of merde. It's great for scripts, it's crap for real software development.

  58. Alot of this is pure crap by brunes69 · · Score: 4, Informative

    Points #1 and #4 are totally off base. It is very simple to seperate presentation logic from processing logic in PHP. Don't diss the whole language just because 95% of people don't know how to use it properly. you can either go the simple route, and use a special Display class for all your displaying ( easy to modify, easy to swap out for a totally different page), or as I did, you can use PHP's XML/XSLT functionality to totally seperate your logic form display, but having all logic code return XML strings and only at the funal step transform them using XSL.

    As for your point $3, see my exmaple above. PHP has a nice OO clas structue, which is great once you've used it for awhile and being to understand how it is "OO Designed for Web Development", not "OO for Application Development", which are two different things.

    1. Re:Alot of this is pure crap by lewp · · Score: 2

      There are a lot of traps and pitfalls in OO PHP that most people would call all-out bugs. The Zend team likely agrees as 99% of the gripes that I've heard about PHP's OO are fixed in the forthcoming Zend2 engine (you can pick up alpha releases using it on php.net).

      Most people who've written a whole lot of PHP start out by writing a lot of procedural code. Then they write a whole bunch of classes. Usually, they finally end up going back more towards the procedural side when they realize that trying to get a big hierarchy of classes to play nice together when you're throwing around object references and such is more trouble than it's worth.

      Classes in PHP, for myself, are more useful as an analog to the package statement in Perl. That is to say, I find it more useful as a way to put sets of functions in different namespaces than I do to actually build apps out of tree of objects.

      --
      Game... blouses.
    2. Re:Alot of this is pure crap by SquirrelCrack · · Score: 1

      You *can* use XML/XSLT with php, but without the ability to cache your parsed xml objects, perf can suffer greatly.

    3. Re:Alot of this is pure crap by G-funk · · Score: 2

      If you think PHP supports OO, then my friend, I'm afraid you don't really know what the term "Object Oriented" means.... It could pass as object-based, but it's definitely not object oriented.

      --
      Send lawyers, guns, and money!
    4. Re:Alot of this is pure crap by asolipsist · · Score: 1
      XML/XSLT is indeed a good way to seperate things in very simple cases, however it still doesn't come close to providing the flexibility of something like java tag libraries. Your XSLT engine is also going to get reamed if you get any decent traffic.

      PHP has a nice OO clas structue,


      What!? PHP's class structure is worse than VBA or JavaScript. Just because something has a supposid 'class structure' does not mean that its OO. Can I write a transaction processing layer in PHP and have it maintain concurrency with a RDBMS? PHP is great for simple things, but just not built to do anything really robust.
    5. Re:Alot of this is pure crap by Azghoul · · Score: 1

      No 'ability' to cache parsed XML? Perhaps not as a native, built-in, C-written function, but you can do it with the PEAR Cache library. It's really trivial once you get the hang of it.

      (I'm doing it all the time)

    6. Re:Alot of this is pure crap by SquirrelCrack · · Score: 1
      Excellent, I'll have to check it out. What's the memory footprint like?

      Thank you. :)

    7. Re: Alot of this is pure crap by Anonymous Coward · · Score: 0

      I'm not very experienced in OO programming, but I know PHP's current OO implementation is trash regardless of what you're using it for.

      You can still separate logic and presentation without devoting yourself to pointless OO crap in PHP. Write small functions that are do specific tasks and keep them in separate "library" files. Not only is it as easy to maintain as object-oriented code, it'll run faster -- and speed DOES matter when you have dozens of users hitting the same file simultaneously on a server that is doing many other things at that moment.

    8. Re:Alot of this is pure crap by Salamander · · Score: 2
      There are a lot of traps and pitfalls in OO PHP that most people would call all-out bugs.

      You could replace "PHP" in the above with the name of just about any other language (that supports any kind of OO) and it would be (at least) equally true. Most OO models take some getting used to, and PHP's model is less troublesome than some of the common alternatives.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    9. Re:Alot of this is pure crap by Salamander · · Score: 2

      So, what exactly does a language need to count as "object oriented" in your book, that PHP doesn't have? This should be interesting; there's a difference between not supporting your style of OOP (probably based in having learned OOP in some other language and gotten used to its warts) and not supporting OOP at all.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    10. Re:Alot of this is pure crap by Anonymous Coward · · Score: 0

      Judging by your spelling, I guess you're not allowed to "diss" English!

    11. Re:Alot of this is pure crap by Malcontent · · Score: 2

      Let's see now.

      Php supports writing of objects. It support inheritance. It's highly dynamic in that you can add to objects at runtime (like ruby). You can do mixin type things.

      So exactly what are you looking for?

      --

      War is necrophilia.

    12. Re:Alot of this is pure crap by Malcontent · · Score: 2

      "Can I write a transaction processing layer in PHP and have it maintain concurrency with a RDBMS?"

      Why not? What exactly is preventing you from doing that?

      --

      War is necrophilia.

    13. Re:Alot of this is pure crap by G-funk · · Score: 2

      Bzzzt! Nice try, it's not my definition, there is an actual definition of what and object oriented language must support, and it includes (among other things) encapsulation and polymorphism, which last time I looked at PHP (4.something) were both lacking. I have a book which references the actual list, if I can be arsed I'll have a look when I get home from work.

      --
      Send lawyers, guns, and money!
    14. Re:Alot of this is pure crap by G-funk · · Score: 2

      In short (see my other post) polymorphism and encapsulation, both required to qualify as an object-oriented language.

      --
      Send lawyers, guns, and money!
    15. Re:Alot of this is pure crap by Malcontent · · Score: 2

      Once again how is php lacking in polymorphism?
      How is php lacking in encapsulation?

      --

      War is necrophilia.

    16. Re:Alot of this is pure crap by lateefj · · Score: 1

      One thing may clear this up. Have you used any one of these languages Java,Pyhton or C++? If I understand you posts correctly you are suggesting that PHP OO can hold a stick to Java. If this is the case I wonder how much Java web development have you done? Have you used any of these Velocity,Jython, Taglibs, or EJB? How many 100K objects do you pass around in you PHP applications? Passing by reference ? Last time I tried PHP with lots of object I kept getting out of memory errors. Well I guess I should have thought to myself it make complete sense that PHP would pass be value instead of by refrence. And I should use a _work_around_ to fix it. And I should build my own intelegent object caching.

      Oh one more thing how do you get connection pools form PHP or does every Apache proccess have to create a database connections?

      --
      Pedro For President!
    17. Re:Alot of this is pure crap by G-funk · · Score: 2

      PHP supports some parts of polymorphism, in that you can override methods, but it does not support multiple inheritance, virtual classes, or encapsulation. If you need to ask "how is php lacking in encapsulation" then you either A) know dick all about PHP, or B) do not know what the term encapsulation means.

      I'll assume it's B, so in short terms, encapsulation is the support for private,protected, and public methods, lacking from PHP.

      --
      Send lawyers, guns, and money!
    18. Re:Alot of this is pure crap by Malcontent · · Score: 2

      "but it does not support multiple inheritance, virtual classes, or encapsulation. If you need to ask "how is php lacking in encapsulation" then you either A) know dick all about PHP, or B) do not know what the term encapsulation means."

      A lot of OO languages don't support multiple inheritance including java, ruby, and C#.

      PHP does not support virtual classes (nor interfaces) but then again it does not really need them because it has mix-in type facilities.

      As for encapsulation I say that it does support encapsulation as defined here so once again tell me how php does not support encapsulation.

      --

      War is necrophilia.

    19. Re:Alot of this is pure crap by G-funk · · Score: 2

      I don't know about ruby or c#, but in java interfaces are a form of multiple inheritence. And encapsulation as an OO term is data hiding. Containing things is not what encapsulation means when you're talking about OO... Just because I can say "polymoprhism is the ability of a small alien creature to change shape in order to feed on your emotions" doesn't mean that particular definition is applicaple outside of red dwarf.

      --
      Send lawyers, guns, and money!
    20. Re:Alot of this is pure crap by ceejayoz · · Score: 2

      If you need to ask "how is php lacking in encapsulation" then you do not know what the term encapsulation means.

      http://www.webopedia.com/TERM/E/encapsulation.html

      In programming, the process of combining elements to create a new entity. For example, a procedure (a.k.a. function) is a type of encapsulation because it combines a series of computer instructions. Likewise, a complex data type, such as a record or class, relies on encapsulation. Object-oriented programming languages rely heavily on encapsulation to create high-level objects. Encapsulation is closely related to abstraction and information hiding.

    21. Re:Alot of this is pure crap by Malcontent · · Score: 3

      " One thing may clear this up. Have you used any one of these languages Java,Pyhton or C++?"

      Yes.

      "If I understand you posts correctly you are suggesting that PHP OO can hold a stick to Java."

      Are you sure you are replying to the same post? I said no such thing.

      " If this is the case I wonder how much Java web development have you done?"

      TONS.

      "Have you used any of these Velocity,Jython, Taglibs, or EJB?"

      Some.

      "How many 100K objects do you pass around in you PHP applications? "

      None.

      "Passing by reference?"

      Sometimes if I feel the need for it.

      "Last time I tried PHP with lots of object I kept getting out of memory errors."

      Perhaps you don't know php well enough.

      "Well I guess I should have thought to myself it make complete sense that PHP would pass be value instead of by refrence."

      Whether it makes sense to you or not is irrelevant. It's a published specification of the language and many things have been written about it. Some languages use copy on assign and some use references it's up to you to read the documentation and learn the language so that you can use it properly. PHP is not java and only an idiot would expect it to behave exactly like java.

      "And I should use a _work_around_ to fix it."

      No just learn the language you are trying to use.

      "And I should build my own intelegent object caching. "

      Or use a library written by someone else. Which language support automatic object caching natively? In java you have to rely on HUGE frameworks with extremely complicated setup and configuration to achieve such a thing. Did you write velocity? did you write your own EJB container? Java does not have built in object pools either.

      "Oh one more thing how do you get connection pools form PHP or does every Apache proccess have to create a database connections?"

      PHP frees me from having to think about database pooling because it takes care of all the dirty work for me. I simply write code as if my database connection was the only one was being opened fresh every time (even though it's being pulled from the pool). All database function in php have a "pconnect" function which goes into the php pool for the database connection. All I have to do is to set an ini entry specifying how many connections I want to maintain. I also use ADODB database abstraction layer which makes my code very easy to port to other databases. Add to this the ability to stream just about any object to string and cache them locally I can skip many trips to the database altogether. I frequently generate comboboxes and grids which are database generated (but not frequently changed) and cache them on the local drive which saves a round trip to the database server.

      Coding data driven web sites in PHP is a downright joy compared to the insane headaches one has to go through to do the same thing in EJBs or even velocity. If I really want to use something like taglibs I can use the Krysalis framework which is a velocity look alike. If taglibs are not up my alley I can use smarty templates. If don't want either one I can use an application framework such as binarycloud. I have more choices then a java web developer.

      PHP is also much faster then any solution coded with EJB. In fact any solution coded with EJBs is significantly slower then just about any other technology. If you don't believe me go visit theserverside.com and read some the their benchmarks. Java is also a downright annoying language if you ask me. Any language with forces me implement an interface just to define a filemask is too stupid to use.

      --

      War is necrophilia.

    22. Re:Alot of this is pure crap by Malcontent · · Score: 3

      "but in java interfaces are a form of multiple inheritence."

      Intterfaces are not the same thing as multiple inheritance. In multiple inheritance you write the methods and the inheriting class has access to them. In interfaces you promise the methods but don't implement them leaving that job to the inheriting class. C++ and some of the more "pure" object oriented languages like smalltalk support multiple inheritance but it is generally considered a dangerous thing. Java does not support it, the .NET framework does not support it, python, ruby, perl, and php don't support it either.

      "And encapsulation as an OO term is data hiding."

      Are you refering to the fact that PHP does not have private variables? IF so this is a minor thing IMHO. The variables have a "private enough" scope to avoid any namespace problems and you don't have to access them if you don't want to. I simply write my php objects as if the variables were all private and use my object by calling getters and setters just like java.

      Personally I much prefer the php objects to java objects because I can change objects at runtime. PHP shares this dynamism with languages like objective-c and ruby. Until you experience it I can't really explain it to you but it's really cool.

      --

      War is necrophilia.

    23. Re:Alot of this is pure crap by Salamander · · Score: 2

      Yes, I've seen definitions in books too, and that's precisely why I took you to task. When you do get around to checking the book, you'll find that PHP fits the definition better than you seem to think. For example, it does have object polymorphism; I've used it. It does not have function polymorphism, but that has fuck-all to do with OOP anyway and IMO its absence is a good thing. PHP is not C++, it's not Java, it's not Smalltalk, it doesn't have specific features that those do, but anyone who can see beyond mere prejudice would see that it does support OOP in a meaningful way.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    24. Re:Alot of this is pure crap by lateefj · · Score: 1

      The discussion is I thought was about J2EE vs. PHP not Java vs PHP. So I was comparing J2EE functionality to PHP. However ofter a night of sleep and reading you post. I should not expect PHP to act like an OO language. I should expect it to act like a web scripting langage.

      The reason I don't use PHP on big projects is based on fine grain of control and flexablity. If you have used both Java and PHP then it is clear which supports a larger and more powerful set of OO features. There are a lot of application that are simple and thus can be solved using PHP. Applications that require complex processes, use of threads, network communication (not just within a quick web page), data mining and clients that are not web based such as GUI's and external applications I believe that the choice is clear.

      I have found that large applications leave the limitations of the web server. External processes are need and that is why Java I have found is a much better solution than PHP.

      "PHP frees me from having to think about database pooling because it takes care of all the dirty work for me."
      JBoss frees me from thinking about database poooling too. I don't get your point.

      "PHP is also much faster then any solution coded with EJB. In fact any solution coded with EJBs is significantly slower then just about any other technology. If you don't believe me go visit theserverside.com and read some the their benchmarks."
      For applications that don't have complex state and complex client to client or client to server interactions PHP is much faster. PHP caching and the caching you have describe probably works great for sites that have lots of reads and very few writes. Just like MySQL is faster than PostgreSQL because it reads fast. Once you have lots of writes MySQL dies. This is true about when PHP has lots of writes the data gets old really fast. If you where caching from a row level your cache would not get stale. In message boards this is probably fine but in a stock application it is a lot different.

      I think truely the devil is in the details.

      --
      Pedro For President!
    25. Re:Alot of this is pure crap by Azghoul · · Score: 1

      No idea whether you'll see this or not (forgot to check to post a reply), but the way I'm using it, PEAR Cache saves results as files (in a script-specified directory).

      File access is much much quicker that parsing large XML files every time. It's the difference between waiting for PHP to load the XMl file, load the XSL file, parse the two so you get one HTML file, vs. just loading the pregenerated HTML results.

      The trick is to use a Cache ID value that takes into account the file modification time of the XML and XSL files, so that when they change, you refresh your cache...

    26. Re:Alot of this is pure crap by brunes69 · · Score: 2

      If your XML is generated on the fly, as is mine (and most dynamic content), you wouldn't want to cache it under most circumstances anyways

  59. But you get no bragging rights... by Wee · · Score: 2
    I love php. It has done a lot for me, and it makes my life easier. ... The language is good and solid - it is great to see it being used in places such as Yahoo.

    Yeah, but you get no bragging rights or buzzword compliance. Do you realize how much some people here have paid (are paying) for their CS degrees? It's a club, and it requires certain things for access. Now anyone with $30 for a PHP book can buy membership. How can you ever be a snob again? How can you show your virtual face online anymore, knowing that you didn't have to build an expensive, enterprise-class system just to let people log into secure areas of your site? Woe is you...

    Seriously, I'm with you. It's all about right tool for the job. If PHP works fine, then use it. I've noticed that most of the people that dismiss PHP (or Perl, or ASP, or anything else) out of hand are the ones that tend to not follow the "right tool for the job" advice. They know J2EE/Oracle, or Win2K/CF/Access, or whatever, and any project gets that -- regardless of how complex it actually is. See, everything has to scale, or it's merely a toy.

    In tha past year, I've used servlets, XSLT/XML, Perl, PHP, MySQL and PostgreSQL and each one does exactly what we need it to do. It's all good.

    -B

    --

    Ash and Hickory, straight-grained and true, make excellent bludgeons, dandy for the cudgeling of vegetarians.

  60. Big Whoop. by brunes69 · · Score: 5, Informative

    This doesn't tell me anything about the quality of these products. I cant speak for the others, but have you ever looked at the source for PHPNuke? It is a horrendous mess. Not only that, but the thing is routinely riddled with secuirty holes and other bugs. I had the displeasure of running it on my site for awhile, what a mess.

    1. Re:Big Whoop. by Tablizer · · Score: 1

      I cant speak for the others, but have you ever looked at the source for PHPNuke? It is a horrendous mess.

      Well, what do you expect from something with the word "nuke" in its title?

      Tried ChyrnobolWorks yet, BTW?

    2. Re:Big Whoop. by horza · · Score: 2

      I cant speak for the others, but have you ever looked at the source for PHPNuke?

      Do you think more than 5% of its users have? Do you think they care what's underneath? Someone can drag and drop some files in a directory, enter their mysql username and password in one file, and they have a fully-operational magazine with registration, slashdot-style comments, forums, Yahoo!-style directory, file downloads section, and goodness knows how many other things. Security is poor, but if you run a personal blog or a tiny niche magazine then you really aren't to worried. Someone trashes the mag then it's 5 mins to put back PHPNuke and a few more mins for the sys admin to restore last nights db backup. It's not like it's going to be used for anything critical, but it gives newbies a very easy entry into the world of online publishing. Those that don't get bored and let the mag die after a few weeks/months will then grow up and move onto more serious software.

      Phillip.

    3. Re:Big Whoop. by dmnic · · Score: 1

      PHPNuke and PostNuke are both a big mess. we originally used PHPNuke, then switched to PostNuke, but have since come to the grips that its not that great anymore. weve now begun completely handwriting all our scripts.
      for example, our main database query script with PHPNuke was 1000+ lines of nonsense code with includes: our new script is 25 lines with NO includes, queries faster and is more customizeable as to output format.
      there are some features of *Nuke that we like and we are going through figuring out what we like and what we want/need.

    4. Re:Big Whoop. by Anonymous Coward · · Score: 0

      Sorry I'm too lazy to register.
      With all due respect, going from 1000 to 25 lines of code (w/ includes!) is a bit hard to believe.

      marcinmilan

    5. Re:Big Whoop. by Dracos · · Score: 2
      Well, what do you expect from something with the word "nuke" in its title?

      Correction: what do you expect from an open source project with 1 developer who sells subscriptions to people who want the code 5 days before its public release?

      PostNuke was very close to getting rid of all the legacy (PHPNuke) code in the .8 branch. The .7x branch is nowhere near that accomplishment.

      Then the Great Flame War of August(TM) happened, and 95% of the managment team picked up our toys (the .8 branch) and went home. We've been regrouping since then.

      BTW, Xaraya is not a preservative, applehead.

    6. Re:Big Whoop. by wolf- · · Score: 1

      Hello, my name is Wolf, and I'm a recovering phpNuke user. I have been weened from phpNuke with a daily dosage of postnuke. The resultant weight-loss and increased collection of CPU cycles is amazing. The doctors say that within a few more weeks I can replace the postnuke treatment with Xaraya. In initial testing, Xaraya doesn't appear to have the emotional side affects of postnuke.

      Ok, in all seriousness, phpnuke contained a lot of bloat. In all fairness, the original postnuke developer team inherited that bloat when they forked. Their roadmap always included serious pruning and their intended .8 target was beginning to look good.

      The Xaraya tarballs are looking pretty good. Perfect? Naw, its early code, but the potential can be seen.

      www.phpnuke.org
      www.postnuke.com
      www.xaraya.co m (www.dinerminor.com)
      www.cofax.org (not php, not a blog, nice CMS/publishing features)

      --
      ----- LoboSoft specializes in Digital Language Lab
  61. Open to debate? by Anonymous Coward · · Score: 1

    There's no debate. Perl LETS you make a bigger mess than any other language, ever!!

    1. Re:Open to debate? by djeaux · · Score: 1
      There's no debate. Perl LETS you make a bigger mess than any other language, ever!!

      Of course, whether one chooses to make a mess or not is a bit of freedom that Perl allows. And as many others have posted, freedom of choice is not usually desired in a team programming setting.

      My gut hunch -- based totally on reading too many Scott Adams cartoons -- is that the pointy-haired boss came in & said, "This PHP stuff is all over the net. It's new & trendy. We will use PHP." :-D

      --
      "Obviously, I'm not an IBM computer any more than I'm an ashtray" (Bob Dylan)
  62. They passed on Java because FreeBSD is crappy? by doomdog · · Score: 5, Insightful


    According to the slides, the only negative thing they had to say about Java (J2EE / JSP / etc.) is that FreeBSD has really lousy thread support (and proper J2EE solutions require threading)...

    To me, that seems like a really stupid, short-sighted way to approach the problem. If Java is the best solution for them (which I think it would be), then why not move to an operating system that properly supports it?

    Why hamstring yourself to an inferior solution just because you don't want to give up FreeBSD? That's like complaining that your Pinto is too slow -- but you'd rather fill it with Premium gas to get a little performance boost instead of getting a better car.

    And what's up with 4500 servers? What a nightmare! Who in their right mind would want to deploy and manage 4500 servers? If they were really serious about this, they'd upgrade to a couple dozen big-iron IBM mainframes (like one of these!), where it can run hundreds of virtual Linux instances (if needed)...

    I guess it goes back to the old saying "When you only have a hammer, everything looks like a nail"...


    1. Re:They passed on Java because FreeBSD is crappy? by agent0range_ · · Score: 1

      To me, that seems like a really stupid, short-sighted way to approach the problem. If Java is the best solution for them (which I think it would be), then why not move to an operating system that properly supports it?

      Why hamstring yourself to an inferior solution just because you don't want to give up FreeBSD? That's like complaining that your Pinto is too slow -- but you'd rather fill it with Premium gas to get a little performance boost instead of getting a better car.


      Their presentation was quite reassuring to me, beacuse I prefer using JSP/servlets for web applications. If the only drawback they could find was the thread performance of FreeBSD, then I'm sure my applications will be fine for speed and scalibility (assuming I code them well). All I need is a good OS to back me up.

      To extend that metaphor a little, it's worth nothing that they would be putting premium gas into their FREE car when they could go out and get better FREE car.

    2. Re:They passed on Java because FreeBSD is crappy? by the+eric+conspiracy · · Score: 2

      If Java is the best solution for them (which I think it would be), then why not move to an operating system that properly supports it?

      I agree. The general engineering rule is to pick the software you want to run, THEN pick the platform that runs it best.

      The recent work on Linux processes by Ingo Molnar makes me believe that one choice that Yahoo should consider is in fact Linux.

    3. Re:They passed on Java because FreeBSD is crappy? by inerte · · Score: 1

      why not move to an operating system that properly supports it?

      And what's up with 4500 servers? What a nightmare! Who in their right mind would want to deploy and manage 4500 servers?


      Congratulations, you've saved me a lot of time answering your question. They don't want to change from FreeBSD because they've hundreds of servers with it. And even if it was a change for J2EE do you think they would magically dump every code ever written for BSD?

      No, they will do it gradually, like most enterprise software changes are made. You change one part, then another, then another. Yahoo! simply can't throw away everything they've ever written, just to use J2EE.

    4. Re:They passed on Java because FreeBSD is crappy? by slamb · · Score: 1
      According to the slides, the only negative thing they had to say about Java (J2EE / JSP / etc.) is that FreeBSD has really lousy thread support (and proper J2EE solutions require threading)...

      I find that especially sad because I think good threading support on FreeBSD is not far away. 5.0 is supposed to have Kernel Scheduling Entities; a new, high-performance way to accomplish threading. I believe they're now going for a November release. (It was originally intended to have been released well before now.) Add in a few months for safety and that's only February. Still not very far in the grand scheme of things.

      But I guess they don't want to plan on a solution that doesn't work now. Which is why I tend to think you are right; a switch from FreeBSD to Linux would have been worth being able to use J2EE well, if FreeBSD's existing threading support can't last them that long.

    5. Re:They passed on Java because FreeBSD is crappy? by doomdog · · Score: 1


      I never suggested they "magically dump" everything written for BSD. Conversion to a better platform could easily be done a piece at a time. After all, they're making the switch to PHP, which entails rewriting a few million lines of code. When you look at the cost for developers to crank out *millions* of lines of code, the price of a few mainframes isn't that big of a deal...

      You said "Yahoo! simply can't throw away everything they've written, just to use J2EE". Well, they're doing it *just* to use PHP? What's the difference?

      And what's wrong with your blog? How much extra work did you have to do to get it to render properly with Opera and Mozilla, but die horribly under IE ???

      [[ from your blog: O dólar continua subindo - E eu não estou nem aí! ]]

      So it doesn't bother you that your country's currency is quickly becoming worthless? Let the Real become another cruzeiro, or cruzado (or horrors, even a cruzado novo?) Or are you too young to remember the "good ol' days" of 2000% annual inflation?

    6. Re:They passed on Java because FreeBSD is crappy? by inerte · · Score: 1

      1) But it would be a magical dump. A J2EE software wouldn't run under the current servers. It is extra work. And the advantages of the closeness with the C/C++ languages means better adaptation. J2EE might be a fine language on its own but changing corporate values is an extremely hard, if not inviable, task.

      2) Didn't know it died under IE, I will check it out, thanks. Can you tell me OS/IE version, please?

      3) OT, but here we go: My website is highly political, and so are some of my writings and views. Yes, it bothers me that the currency is losting value. Yes, I am too young to remember 2000% anual inflation, but I do understand the benefits of a stabilized econony. It's just that from a political point of view, with the recent election of Lula, this really doesn't matter. Dollar's value will find its more "real" value in a couple months, and not on this troubled economical times, with the "market" having so many doubts about what he's going to do.

      The last 8 years of Cardoso were highly centered on the economical aspects of a governament administration. Newspaper's frontpage titles were daily presenting how much dollar went up or down. With a new president, I simply have other priorities to look for, like the Senate composition (2/3 of the senators are new), or the parlament (parlament? I don't know the english word for Congresso). If Lula will have acceptance and powers to administer the country.

      It's not that I don't care about the value of the dollar. It's that TODAY, I do have better things to look for.

      BTW, how did you "get" the blog's text so easily? Can you understand portuguese?

    7. Re:They passed on Java because FreeBSD is crappy? by jfbus · · Score: 1

      And what's up with 4500 servers? What a nightmare! Who in their right mind would want to deploy and manage 4500 servers? If they were really serious about this, they'd upgrade to a couple dozen big-iron IBM mainframes (like one of these! [ibm.com]), where it can run hundreds of virtual Linux instances (if needed)...

      Cost !

      • TCO : (harware/OS/maintenance contracts) costs are muuuch lower with intel boxes; Automated admin/deployment can be easy if you have the right ppl/tools.
      • if you have 16 coloc sites (like Yahoo!), you'd need 32 mainframes for redundancy (your IBM rep might offer you a new car)
    8. Re:They passed on Java because FreeBSD is crappy? by doomdog · · Score: 1

      And do you have any hard numbers (and a link) to back up your assertion? Whiles PCs are generally cheaper, I find it hard to believe that 16 mainframes could be more expensive to maintain than 4500 PCs...

      If you have 16 colo sites, you'd need 16 mainframes. You don't need an extra box for redundancy, because _everything_ inside of a mainframe is already built for redundancy.

      Upgrading the mainframe is easier too -- just activate a few more CPUs and define a few more virtual linux partitions and you're ready to go (most mainframes ship with more CPUs than what you need; when you want to upgrade, you call IBM and they turn on those unused processors! Try that with a PC!)

      Mountains PCs are generally better at raw CPU power, but serving up web sites is all about I/O -- and mainframes are the kings of I/O.

    9. Re:They passed on Java because FreeBSD is crappy? by doomdog · · Score: 1

      (1) Yes, changing corporate values is indeed hard; people tend to stick with what they know (better to have the devil you know than the devil you don't) -- one of the reasons people stick with Microsoft, by the way

      (2) Windows 2000 / IE 5.5 (Worked fine with Opera 6.05 and Moz 1.1)

      (3) I understand your point -- after all, it does get annoying when the primary focus of the news is the value of someone else's currency. The Estado de Sao Paulo shows the dollar's value every day on the bottom of the front page.

      Personally, I think Lula is going to screw you over royally. He's a communist who idolizes Fidel Castro, believes in isolationism (and believe me, when he repudiates Brazil's external debt, you _will_ be isolated like you never thought possible), and was only elected for two reasons:

      1. He moderated his statements during the election cycle so he would be more appealing (I guess losing 3 or 4 elections previously taught him that an overt communist would never win). Of course, he didn't really change his views (as you will soon find out), he only changed his marketing...

      2. Things have improved greatly in Brazil since the 80's and I think the people are complacent with their new-found comfort. The Real has been around since '94 -- quite an accomplishment for a country that went through 4 currencies in 6 years before it was introduced. Imports have increased greatly, letting Brazilians buy things they never had before. Incomes have risen dramatically, even among the poor (although the gap between rich and poor is still abnormally wide). And for the first time in decades, a middle class emerged in Brazil... There _was_ no middle class in the 80's.

      BTW, how did you "get" the blog's text so easily? Can you understand portuguese?

      Claro :) Drop me a note at "thedoomdog @ yahoo.com" if you want to hear about what life was like with 2000% inflation....

      (parlament? I don't know the english word for Congresso)

      Congresso = congress = den of thieves; England has a Parliament, the US has a Congress. Neither is to be trusted.

    10. Re:They passed on Java because FreeBSD is crappy? by doomdog · · Score: 1

      Err.... Mountains of PCs

    11. Re:They passed on Java because FreeBSD is crappy? by tangi · · Score: 1

      Java is for sure more scalable than PHP A sufficient justification to this statement is its servlet model allowing shared memory (objects) between threads, which is the only real key to scalability. The counterpart is the need of a CS degree. Yahoo's situation is quite special: adding another language to their toolkit was simpler than changing the OS on such a huge web farm. So, yes, PHP, being a very efficient brute force scripting language, may be better for Yahoo. Conclusion: - the best language is the one that suits your needs. - if two people argue about the BEST programming language, they don't know enought about programming basics.

    12. Re:They passed on Java because FreeBSD is crappy? by doomdog · · Score: 1

      I find that especially sad because I think good threading support on FreeBSD is not far away

      What *I* find sad is that FreeBSD has gotten by for so long _without_ decent thread support. I mean, OS/2 had *wonderful* thread support back in 1992, and Linux has been pretty solid for a while. What took the BSD people so long?

    13. Re:They passed on Java because FreeBSD is crappy? by Anonymous Coward · · Score: 0

      I don't even understand the argument. What is he saying? That all requests to a PHP script always run within exactly one and the same thread?

      How can you NOT serve webpages using multiple threads?

      loz

    14. Re:They passed on Java because FreeBSD is crappy? by doomdog · · Score: 1

      You don't need multiple threads to serve webpages. You can have a single threaded web server, if you want (and run it under DOS, even). Or you can have multiple processes running your single-threaded web server and accomplish the same thing as multiple threads.

      However, it won't be as efficient. A single-threaded DOS webserver could get bogged down quite easily, and running multiple processes won't be as fast as multiple threads, because a context switch between threads is faster than a context switch between processes...

  63. lol by SHEENmaster · · Score: 1

    and we still don't have to wear a suit

    I quit because of the fucked up dress code. First a private school, then my first programming job(after making enough to get my iBook).

    Oh well, only three years of high school to go, two if I schedule my classes right.

    --
    You can't judge a book by the way it wears its hair.
    1. Re:lol by Anonymous Coward · · Score: 0

      This is the sophomore whore that "codes HTML", everybody. Pat the child on the head.

    2. Re:lol by Wolfrider · · Score: 1

      Yep, and she's probably already working on her SECOND Million... [g]

      .

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
  64. how ironic by jfinke · · Score: 2, Funny

    I got an ad for visual studio .net when I pulled up the story...

    1. Re:how ironic by PDHoss · · Score: 2

      Attention Mr./Mrs./Ms./CowboyNeal Slashdot user,

      Comments regarding the irony/humor of seeing Visual Studio ads on /. pages will no longer be tolerated, as the seeing of these ads is no longer ironic nor humorous. Violators will be shot -- no exceptions.

      Sincerely,

      The Management

      --
      ======================================
      Writers get in shape by pumping irony.
    2. Re:how ironic by togofspookware · · Score: 1

      /* no exceptions */

      Ah. You're a fan of using Perl, then...

      Oh. Nevermind.

      --
      Duct tape, XML, democracy: Not doing the job? Use more.
  65. C++ is not portable by dananderson · · Score: 2
    Yes, it would seem easy to move to another OS with more robust thread support (for example, Solaris, definitely not Linux--at least yet).

    However, jumping to another UNIX is difficult because of C++. Unlike scripting languages, or even C, C++ is hard to port between platforms. Implementations vary widely.

    1. Re:C++ is not portable by jpmorgan · · Score: 2
      Unlike scripting languages, or even C, C++ is hard to port between platforms. Implementations vary widely.

      Not really. If you keep in mind portability, it's easy to design a C++ application which will take minimal rewriting, particularly if you make use of libraries like the stl, boost or the mtl. As for implementations... use gcc. :)

      With a decent design, moving between Linux, FreeBSD and Solaris is practically trivial. And if you're aware of the pitfalls beforehand even moving from a UNIX to Win32 isn't particularly hard. The whole 'C++ isn't portable! Waah! You have to completely rewrite your application!' is a load of bs.

      C++ is a language of great flexability and if used properly it can be anything you want it to. Oh yeah, and unlike Java or PHP you get the benefit of strong static typing. =)

      You want RAD? *bam* use a RAD library. You want garbage collection? *bam* use a garbage collection library.

  66. Re:Dangers of PHP? I think not! by TomServo · · Score: 2, Interesting

    Mostly valid points, and as far as security is concerned, I think more security problems come from the code written by the engineers themselves, not from the underlying language. I've seen some pretty insecure Perl code in my day.

    The only reason I'm replying to you is because of this sentence: "...in my experience PHP is faster, more secure, more feature rich, way easier to compile and maintain, and takes far less code to accomplish the same things as Perl."

    As far as faster goes, according to the benchmarks that are included in the article, YSP, which seems to be their mod_perl solution, was faster (though not by a huge amount) than PHP. The one place where it did worse than PHP was memory footprint, though that seemed to be by the same small margin that it beat PHP by in speed.

    Secure: I refer to my previous statements, I think security is a bigger issue with the end code than the underlying language. Either way, both of these languages have been very good about getting fixes for security problems out, and publishing security problems so we can avoid being victims of them.

    Feature Rich: CPAN is my only point here. From my experience, CPAN has more modules and more mature feature sets than PHP. I'm sure that will change over time, but I have found it much easier to get new functionality/features from CPAN than any other language.

    Easier to compile and maintain: Compilation isn't really all that much of an issue with perl or PHP. If you're talking about compiling in mod_perl vs. mod_php, both of them were easy as could be for me, and both can be done through RPM. If you're talking about your actual application code, I honestly don't think that is an issue for either language, and a moot point. As far as maintenance is concerned, well written perl code is very easy to maintain. PHP code tends to have HTML & code in the same file, which I've found causes no end of headaches when working on a project that has seperate template/HTML coders and PHP/Perl coders. It can be written to seperate those two, and IMHO, should always be written that way, but in my experience, it rarely is. Similarly, I'm not a fan of Mason with mod_perl because I find the same problem crops up there.

    far less code: Honestly, I can't comment on this one, so I'll take your word for it. I can generally get a lot of things done with little perl code, however, and I've never sat there for days working on the same function wishing that I had to write fewer lines.

  67. Re:Dangers of PHP? I think not! by SirSlud · · Score: 2, Offtopic

    > PHP has made a grep step forward in disabling register_globals by default

    as usual, theonion.com has covered this ;)

    --
    "Old man yells at systemd"
  68. AOLserver is an out-of-date toy by dananderson · · Score: 2

    AOLServer is an out-of-date toy. It's not being actively maintained, at least to a level to keep up with Apache or IIS. AOLServer is great for small sites and relatively easy to setup, but it doesn't scale well.

    1. Re:AOLserver is an out-of-date toy by DavidNWelton · · Score: 1
      @ashland [~] $ serversoftware www.aol.com
      AOLserver/3.4.2
      Good enough for me. As far as I know, Jim Davidson is still at AOL, also. So I'm not sure what you are going on when you say that.
  69. Because it costs too much to use Perl by tlambert · · Score: 2

    Because it costs too much to use Perl. Perl has a very high cost of ownership, compared to even C++.

    For small projects, and for throw-away code, Perl is the ideal language.

    For large projects, and code with a long life expectancy, it is very hard to maintain.

    As they pointed out "there's more than one way to do things". For maintenance programming, this means that you have to know every way of doing things, or you aren't going to be able to read all the code.

    One of their earlier slides pointed out that they didn't want to have to pay for highly educated people... the specific item was point 12 on slide #20: "Doesn't require a CS degree to use".

    While it's possible to hire people so skilled at Perl that they can do the necessary maintenance work for you without a lot of effort, hiring those people costs a lot of money (see slide #18, under the bullet item "Y! is a cheap company").

    -- Terry

  70. What is the deal with Unix and threads? by Sloppy · · Score: 1
    (Note their comments on Java and FreeBSD.)

    Are there any Unixes that have fast-spawning threads?

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  71. God is Great! I Love PHP by snatchitup · · Score: 2

    I love PHP. I learned Web Programming with PHP. It was a more intuitive move for me from C++ and Powerbuilder development.

    The main reason I love it, is that it greatly accelerated my HTML learning curve.

    For my career to really take off, however, I passed the Java Certification (which by the way, had zero HTML). Now, I was able to quickly ramp up Java Programmer to J2EE developer with thanks in part to PHP.

    Now, I was on PHP3. And there was only one drawback I had with it, I'm sure has been solved. I found it hard to develeop large modular systems because if the way you use the #include directive. It seemed even more picky than C's #include in the order. It was tough to get around chicked befor the eggs problems like.... Hey, you use this method from one php3 module, but that method uses a method from another module. Everything had to be in the right order.

    J2EE is a deployment nightmare, nothing against the actual spec... It's the verdors' implimentations that can be a real pain.

    The power is definitely there with PHP. Enough similarities with Perl to please all I feel.

    I hope Yahoo can definitely give something back to PHP, particularly, catering the language to be flexible to develop huge systems.

    1. Re:God is Great! I Love PHP by the+eric+conspiracy · · Score: 2

      J2EE is a deployment nightmare, nothing against the actual spec... It's the verdors' implimentations that can be a real pain.

      Well, yes. But the spec itself gives you a tremendous amount of capability. The ability to do a deploy and have one pass through a for loop executed in one code version, and the next pass in a new code version is as far as I know unique on the serverside to Java.

  72. I'm glad I'm not alone by lewp · · Score: 2

    poor sandboxing, easy to screw up server

    This is my biggest (and really only) problem with mod_perl. While the power and interface that mod_perl gives you is extremely powerful, far too often shooting myself in the foot as I am wont to do results in Apache exploding.

    I wish there were a more intermediate solution. I suppose (*sniff*) I don't *need* the all access power of mod_perl, but Perl CGI doesn't really float my boat either.

    --
    Game... blouses.
  73. Nice ad whoring OSDN by Anonymous Coward · · Score: 0

    I like how the link to Yahoo goes thru doubleclick.. I understand OSDN/Slashdot/et al need funds, but if I wanted to support doubleclick, I'd click a banner, not a link on a site I visit regularly..

  74. Big Mistake by Pinball+Wizard · · Score: 5, Funny

    Clearly, they should have used Cobol.NET.

    --

    No, Thursday's out. How about never - is never good for you?

    1. Re:Big Mistake by pjrc · · Score: 2
      The part I like the best is the quote:

      Users should be able to move all of their business logic written in Cobol and significant portions of their other Cobol code directly to the .Net environment without the need to rewrite the code, so long as they haven't targeted any special or proprietary application programming interfaces, Billman said.
  75. Very interesting news by AxelTorvalds · · Score: 4, Insightful
    This is interesting news. Very interesting. I'm not a web developer, I'm a bit twiddler. I've been trying to work on that area simply so I can do more, it's fun to learn and as a consultant you need to be able to do that stuff for clients from time to time.

    I've mostly explored JSP, Zope, and PHP. JSP is cool, tons of support, it feels like and acts like it's the enterprise solution. As such, it's a logical choice for a lot of things because if you need a hammer it's nice to have a sledge hammer. The reality, at least as I've seen it, is it's a bitch. It's huge, it's slow, it takes a super computer to really run, I've seen a fair share of sloppy JSP. It's cool, has all the gizmos that java has and it also has all the gizmos that java has. It seems like you need a ton of crap to build a lot of java stuff, even things from Sun like the JMAPI need 3 or 4 30MB downloads before you can build them and get them working, maybe that's just me complaining though. I'm also not sure what kind of vibe I get about Sun and java as a whole technology any more, I'm not saying it's going away or anything like that but it's not the goose that laid the golden egg anymore either. I don't know I'd tie my cart to java if my cart was as big a yahoo! Again, just my opinions, my C++ and assembly (of all things) skills have taken me farther the last couple years and got me jobs when there weren't any, java has just filled out the resume. While I'm knocking one of the most popular platforms out there let me also throw out the java developer base issue. Java was like a dot.com programming language, in no time it instantly had a huge developer base; how quickly do you think they'll run to the next great thing when/if it happens? I've wondered what would happen if sun started charging for the JDK. Or if .Net 2.0 really rocks and mono takes off.

    Zope. What to say about it. It's the bomb. It's also Python which is huge and on the cusp of going really huge, but hasn't yet. It's its own custom thing. It has a ton of cool parts you can drop in to it. It's probably my favorite. It is also a pain in the ass going to zope.org downloading something and trying to get it to work. It's like they have their own little sourceforget.net running in zope space and it makes the number of available parts look bigger than it really is. It's getting better but there is a lot of dead stuff on there. It also won't drop in to Apache that easily, you usually use their custom server and transport layer. It's not so bad but it's nice to be on mainstreet; it's more trustworthy. Other than that, it rocks, it's just a bit tough to sell it to someone who knows some of the buzz. If it were all up to me Zope would be the next big thing but it doesn't look like it's all up to me.

    Then I stumbled on to PHP and it kind of rocked my world when I first started screwing around with it. For simple kinds of web things, like dumping some tables out of a database or something it's kicks the hell out of anything else I've seen. It seems like a few lines of PHP and it's done. No magic web server/container, just the apache server on your redhat box.. Then some of the tools and kits that have been put together with it make it a much more compelling application platform. Zope really appeals to my aesthetic sense of software engineering, I like python, I like the structure and the object nature it just hasn't caught on like the wildfire I think it is. PHP is close to it in terms of pontential and reusable stuff and it's like the second coming of perl. There are still the stock issues, is it fast enough? can it scale? will it last? It seems like those answers are yes. Can it scale better than JSP? I bet for a shop like yahoo! there isn't a comparison; I bet PHP wins unless they triple the amount of RAM that they have or switch off of FreeBSD boxes to S/390s or Sun "Enterprise servers." Also, PHP has such a grass roots following and has really grown up slowly compared to java, I don't see a lot of PHPers really dumping it anytime soon as it is. Now that Yahoo! is involved, PHP may go up to that next level.

    1. Re:Very interesting news by Anonymous Coward · · Score: 0

      has all the gizmos that java has and it also has all the gizmos that java has

      So which is it?

    2. Re:Very interesting news by Anonymous Coward · · Score: 0

      Then I stumbled on to PHP and it kind of rocked my world when I first started screwing around with it. For simple kinds of web things, like dumping some tables out of a database or something it's kicks the hell out of anything else I've seen. It seems like a few lines of PHP and it's done. No magic web server/container, just the apache server on your redhat box.

      Yes, and then you will get all those great features like tying your code to a certain type of database, and merging data and presentation. Programmers in a hurry love this because this means less work at the moment when you don't have to think about boring stuff like making a good design. I'm sure this will help Yahoo scale in the future. Java making quick hacks more difficult of course makes it an inferiour language.

  76. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 0

    PHP is easy to compile? That's great to hear. I've been having so much difficulty compiling my scripts.

  77. GOOD! by nanotron · · Score: 2, Interesting

    Perhaps this will lessen the snobbery that exists regarding PHP over more bloated languages. The same snobby attitude that would have stopped HTML in it's tracks in the 90's.

    Let's bring back the pioneering attitude that made the web what it is today...

    GO YAHOO!

  78. Honestly, why? by fsck! · · Score: 1
    A few years ago, I wrote a CMS in PHP3 that's still in use today, along with a handfull of other lesser web apps. When I last used it, there were a number of misfeatures that made it uncomfortable to use.
    • Nothing like CPAN.
    • No DBI or ODBC, eash DB has it's own API.
    • Hardly anyone uses it outside the webserver context.
    • Few if any bindings for GUI interfaces.
    Have any of these improved?
    1. Re:Honestly, why? by Anonymous Coward · · Score: 1, Informative
    2. Re:Honestly, why? by fsck! · · Score: 1
      3) Your point being????
      Code reuse. If you're the first person to even think about using PHP in a given context, you can bet you'll have to write just about everything from scratch.
  79. Re:Dangers of PHP? I think not! by OzRoy · · Score: 1

    Actually proir to PHP 4.1 it was very easy to create PHP scripts with security holes in them.

    Now with PHP 4.1 it is much improved, as long as you follow all the instructions and turn off register_globals.

  80. Missing the point by m00nun1t · · Score: 2, Interesting

    [preparing to get modded to -20]

    Seems a bit strange that when you have 612 developers (!) you would rule out ASP simply because of the cost of buying Windows - plus, I'm sure MS would give them a sweet deal. Surely developer productivity and turnaround time is the most important thing?

    I'm not saying they should have used ASP, just saying it's a strange basis for a decision. And they didn't even look at ASP.NET which solves the separation of code from layout better than anything I have seen.

    1. Re:Missing the point by Anonymous Coward · · Score: 0

      Um, they have 4500+ machines. Buying a Windows Server license for that many machines would be on the order of 4 million USD.

      Not to mention they have 600+ developers familiar with unix based development. Moving to Windows would be suicide in that environment. Look at the trouble that Hotmail had doing that, and that was just one application and was being done by MS themselves.

      Brandon

  81. Java is not suitable for Web stuff by Anonymous Coward · · Score: 3, Interesting

    Let's see, web development is a) parsing strings, and b) concatenating them. Which of these is Java good at? Well, neither. For the former, nothing beats a language with built-in regular expressions. Yes, I've used the ORO library from the Apache Foundation. Yes, it's a solid implementation of Perl 5 regexes -- but it's implemented in Java (slooooowww), and it's a pain in the ass to escape everything twice, once because it's a Java string literal and again because it's a regular expression. And even aside from those two problems, compare the following snippets:

    String foo = "bar"; Perl5Util re = new Perl5Util(); if ( re.match( "/\\s*b\\+z/", foo ) ) foo = re.substitute( "/[ \\t]+/g", foo );

    ...and in Perl:

    my $foo = 'bar'; $foo =~ s/\s+//g if ( $foo =~ /\s*b\+z/ );

    Cleaner, tidier, more readable, and the Perl will execute in one-fifth of the time. I got stuck working on a large project with JSP, and we ended up pushing a lot of stuff out into Perl scripts because working with strings in Java is so slow. I'm not talking about small improvements; I'm talking about "when we did this in Java, the user thought the server had hung, but now the user doesn't notice the wait".

    And I HATE Perl. But after using Java, I hate Java more. The only thing Java's got that Perl ain't got is OOP features. No, Perl has no OOP features. They have a hilariously ill-conceived imitation that's such a pain in the ass to use that the tutorial says "most Perl programmers will never define a class; only wizards do that". Yeah, well, in any well-designed language (or even a lame but rational one like Java), defining a class is trivial. If you fuck up a feature so badly that only "wizards" have the patience to learn it, yeah, sure, only wizards will use it. That just proves that the language designer is a fool. Frankly, I doubt very much that Larry Wall or anybody else involved in the design of Perl 5 had a firm grasp on what OOP is about, what it's for, and why people use it. It's like asking an Eskimo to design a garage. Go ask an Eskimo to design and igloo, and you'll get one hell of a solid igloo (as Perl is one hell of a procedural quick'n'dirty-text-processing language), but when you want a garage, hire an architect who owns a house that has one, and keeps his car in it, too. Common sense.

    PHP's not Perl, though. I'm not thrilled with it as a language. I hate Microsoft even more than Larry Wall, but ASP with JavaScript is not a bad way to do web pages (JS is less text-friendly than Perl, but far, far more so than Java, and it's vastly better suited than Java to the kind of quick development these Yahoo! guys are talking about wanting; it's got proper closures (better closure implementation than Perl, by far) and a clean, simple, and powerful OOP implementation -- you can define new classes pretty much on the fly. JS is a very expressive and pleasing language to write code in, and any halfassed JS interpreter will be at least somewhat faster than even the best JVM). ASP.NET (so-called) apparently has FINALLY, after YEARS of cluelessness, learned from JSP and started including some of the cool architecture that JSP has (letting pages inherit stuff from a parent class, for example, which is real nice in a large project; there's also other modularization goodies) -- but now you don't have to wade through Java shit to use it. Too bad it's a Microsoft product. But you take it as it comes, eh?


    Oh, and those 4,500 servers? Much lower TCO than those Big Iron dinosaurs. Furthermore, they can be replaced gradually and (once again) cheaply. You don't need it all happening in the one box, because it's a million separate Apache processes spitting out little HTML pages to a million different clients. Centralizing that buys you nothing. No one Apache process has to give a damn about any other.

    1. Re:Java is not suitable for Web stuff by Voytek · · Score: 2, Insightful

      Let's see, web development is a) parsing strings, and b) concatenating them.

      I write J2EE web apps for a living, and I can't remember the last time I bothered with parsing/concatenating strings. You must not do any interesting or challenging development.

      The only thing Java's got that Perl ain't got is OOP features.

      The ONLY thing? That's like saying that the only thing Mt. Everest has on your local anthill it height...

      All you seem to care about is text processing ... have you heard of databases?

      Whatever it is you do viz web app development you're overpaid.

    2. Re:Java is not suitable for Web stuff by doomdog · · Score: 2, Insightful



      That's an impressive amount of ignorance to display in a single post! No wonder you posted AC...

      1. Web development is just "parsing and concatenating strings" ??? Interesting... And here I was thinking that it also involved database lookups, pulling streaming data off of message queues, querying external sources for status and information and data validation, among others.. Why didn't you just say that software development is just typing on a keyboard?

      2. Regular expressions are "built-in" to Java now -- ever since the 1.4 release (which has been out for a while now)...

      3. If your user thought that your server had hung while processing your Java code, I'd say it was because you wrote REALLY LOUSY code. Unless you're using Swing, there's nothing wrong with Java's speed.

      4. You HATE Perl and you hate Java even more ??? Seems like ample proof that you have no idea what you're talking about, and are just _pretending_ to be a programmer. You're clueless, and most likely couldn't code your way out of a paper bag. Java and Perl are tools -- there's no reason to hate either one. Both have their place and excel at different things. Obviously, you're one of those "I only have a hammer" kind of people, and you simply don't know how to use more than 1 type of tool (and as you mentioned above, you _surely_ aren't a competent Java/JSP developer).

      5. Java is a "lame but rational" language? Just more proof that you don't have a clue. Java is very well designed; it isn't perfect and needs improvement in certain areas, it is still very nicely done.

      6. 4500 PCs have a lower TCO than mainframes? Where exactly is your proof? And what qualifies big iron as an automatic "dinosaur" ??? They are simply another type of tool that can be used. They have their places where they make far more sense than a bunch of PCs stuffed into a rack, and they also have places where they aren't the best idea. But for some reason, you seem to be stuck on this "there's only one right way to do _anything_ trip"....

      As I said, you've managed to pack an impressive amount of ignorance in just one post.... Next time, put your name alongside your drivel.

    3. Re:Java is not suitable for Web stuff by doomdog · · Score: 1


      And so, unable to support your arguments (and being exposed for the fool that you are), you quickly descend into being a troll...

    4. Re:Java is not suitable for Web stuff by Anonymous Coward · · Score: 0

      What are you talking about? - His first post was also a troll! And a angry and hateful one, that is!

    5. Re:Java is not suitable for Web stuff by doomdog · · Score: 1


      Sadly enough, you're right. And I try soooooo hard to not feed the trolls....

    6. Re:Java is not suitable for Web stuff by pjrc · · Score: 2
      Ok, reading your message trying to figure out which language(s) you're endorsing:
      And I HATE Perl

      I hate Java more.

      PHP's not Perl, though. I'm not thrilled with it as a language.

      I hate Microsoft even more than Larry Wall

      ASP with JavaScript is not a bad way to do web pages .... Too bad it's a Microsoft product. But you take it as it comes, eh?

      What a fresh departure from [my favorite language] is the best. Looks like you just hate everything. I'd mod you up if I had the points!

  82. PDF version of slides available by bartash · · Score: 4, Informative

    http://public.yahoo.com/~radwin/talks/yahoo-phpcon 2002.pdf

    --
    Read Epic the first RPG novel.
  83. I thought they were reducing man hours.. by Inoshiro · · Score: 2

    If you're moving to PHP, you could do well to start with a small core of senior programmers who set standards for variables. Using pair programming, programmers could always review each others' code throughout the work week. Additionally, checks can be made to ensure that on check in to the central repository, the code being handed to them is pure HTML (if it is an HTML template being checked in).

    With the apropos methodology and a little discipline, it shouldn't be hard to firmly establish the One way to do it in PHP.

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
  84. Bad Syntax? by joesao · · Score: 1

    I can surely understand all of their reasoning. However, why are they complaining that their proprietary scripting language has an "unpleasant syntax"? If they developed it themselves, couldn't they have made it as nice as any other nice language?

  85. Oh, ok... slowlaris x86. by Anonymous Coward · · Score: 0

    That's a good idea. About as good as the EJB overhead on intel Pentium III's (i.e. the test platform mentioned in the slides, which should mimic their real boxen environment) - that guy must code for IBM mainframes or something.

    Why wouldn't you go with FreeBSD? Anyone who claims linux is faster hasn't tried both.

    1. Re:Oh, ok... slowlaris x86. by Anonymous Coward · · Score: 0

      One of the stated reasons for not using Java is because FreeBSD's thread support isn't good enough.

  86. Shit, no pre tags. Here's the code again: by Anonymous Coward · · Score: 0

    That'll teach me to preview, eh?

    Oh, shit. The idiots who wrote Slashcode are a bunch of mouth-breathers: This "ecode" thing only allows one level of indenting. HELLO, ASSHOLES? Jesus Christ, leave even the simplest, most trivial task to a Perl "programmer", and watch it turn to shit before your very eyes... It's rare to find anybody stupid enough to fuck up something like that. Morons! If their "senior" programmers were working for me in entry level positions, I'd fire the jackasses in a week. No refs, either. Fuck 'em. Back to the gas station, boys. You just ain't cut out for a real job.

    In Java:

    String foo = "bar";
    Perl5Util re = new Perl5Util();

    if ( re.match( "/\\s*b\\+z/", foo ) )
    foo = re.substitute( "/[ \\t]+/g", foo );

    ...and in Perl:

    my $foo = 'bar';
    $foo =~ s/\s+//g
    if ( $foo =~ /\s*b\+z/ );
    1. Re:Shit, no pre tags. Here's the code again: by meadowsp · · Score: 1

      I didn't know Joe Pesci had started posting to Slashdot.

  87. Bea Weblogic?!?... by Anonymous Coward · · Score: 0

    Did somebody put Java on a memory diet which would make it viable for the relevant intel platforms recently? [The test platform was a pentium III on FreeBSD. Would you recommend the most popular site in the world trash it's investment and move to "big iron"?]

    How about that High-Po Java unicode string parsing? This is about pumping out ascii strings isn't it? Of course they could just do the byte array manipulation workaround. [Well at least that would be "C" like, another "goal" of their effort]. Sounds like they have a lot more practical experience than you and chose what would work for them.

  88. Java: The Britney of Programming Languages by Anonymous Coward · · Score: 0

    Java's not any kind of scripting language at all. They're looking for a scripting language, not a language that has all the drawbacks of a compiled language (they've got those already, homes), with none of the speed advantage. PHP's faster to execute than Java, and much faster/easier to write in. Java's not much more user-friendly than C++ (except the garbage collection, but that's a brutal speed penalty, plus any moron who knows his job can manage memory just fine without it -- the time I spend finding and fixing memory leaks is a small fraction of the time a Java programmer spends drumming his fingers on the desk, waiting for his code to run... but only a fool would use C++ for rapid web development, and for exactly the same reasons, only a fool would use Java for that job).

    Java has proven to be useful for exactly nothing. It failed on the client because it's so slow and because it's one of the least portable languages ever developed; it's failing on the server for the same reasons. Bottom line? Don't write all your libraries in an interpreted langage: Libraries are used by everybody, so they justify the extra effort to write them in C or C++ for speed. Every interpreted language but Java takes advantage of that "economy of scale", and guess what? Perl, Python, and PHP have succeeded dramatically with no marketing budget and continue to grow, while Sun's billions still can't seem to plug the hemhorrage in Java's user base. It's just to damn slow. Furthermore, it's not good for anything. It has no practical uses in the real world. What advantages do you gain in return for the slow speed? None. It was designed without a single thought for usability, and as a result it is virtually unusable (ideology is no substitute for real-world experience with people writing code in the language; the designers of Java got NO feedback from working practitioners on any prototype implementations before finallizing the design for all eternity (compare that to the iterative way C, C++, Perl, and Python were developed)). It offers nobody any kind of compelling value proposition. It's slow to run and slow to write, and in practical terms it's less portable than C. It offers NOTHING.

    Java is the Britney Spears of programming languages. Yeah, she looks cute just like Java does and all the commercials on TV tell you to love her, but in five years you'll be embarrassed to admit ever having liked her or Java. Most people already know there's nothing there. The Emperor is bare-ass nekkid (wish I could say the same of Britney...).

    1. Re:Java: The Britney of Programming Languages by Tablizer · · Score: 1

      Damn! This person sounds just like me. Even rants like me. I found my dopliganger I think. Scary. I especially like this point:

      Bottom line? Don't write all your libraries in an interpreted langage: Libraries are used by everybody, so they justify the extra effort to write them in C or C++ for speed. Every interpreted language but Java takes advantage of that "economy of scale"

      Fast compiled base libraries behind a flexible dynamic business-logic-friendly scripting language to give you the best of both worlds. Amen!

    2. Re:Java: The Britney of Programming Languages by ProtonMotiveForce · · Score: 0

      You've not done a lot of Java development, have you? Maybe..umm, none beyone a Hello World program or some trivial applet? I find that a lot with Java naysayers.

      Your portability arguments were, I believe, thrown in for shock value? Of course Java is very portable. If you don't use JNI code you can run the vast, vast majority of code on any OS with a decent JVM.

      As for usability, you're completely wrong there as well. Java is very quick to develop in - it's got a comprehensive, self-consistent set of standard libraries. It's got an amazing number of external tools and libraries, and there are several (several) free and commercial high quality servlet containers.

      I think you probably equate Java with "web client Java", which is meaningless nowadays. Java is a full-blown language and runtime environment - the web is only tangentially relevent to this.

      Also, Java has several scripting solutions available - Python, Tcl, Ruby, and countless others. They're even available through a semi-standard interface with the IBM bean scripting framework.

      Java offers maintainability, rapid development, speed (are you on crack? Of course it's faster than PHP or Perl unless you're talking the JVM startup time, which is meaningless in real applications), extensive industry support, several nice IDE's.

      The Java world is growing, not shrinking. I'll admit if they have that many FreeBSD machines and Java sucks on FreeBSD that may be a legitimate reason not to use it. Your points, however, show a decided lack of understanding.

      As for the Britney Spears analogy, I've crapped more trenchant insights. Not funny, not applicable.

      The real problem with Java is that people think they understand it because they briefly tried to write an applet 5 years ago, and decided it sucked. It's GOD in the client server arena, and in the servlet/JSP domain.

  89. Maybe so by madenosine · · Score: 3, Informative

    but does it change the fact that they read my e-mail and log my every move?

  90. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 0

    Not really,

    super globals didn't really introduce anything new except the arrays being automatically global.

    Before $_POST there was $HTTP_POST_VARS before $_GET there was $HTTP_GET_VARS.

    If you don't take the time to write secure code any language is going to be secure, it is the programmer not the language that makes a program secure.

  91. Grep Step by waldoj · · Score: 1

    PHP has made a grep step forward

    With a slip-up like that, we know we're looking at a comment from a bona fide programmer here. :)

    -Waldo Jaquith

  92. What was the runner up? by Trinition · · Score: 2

    I'd also be interested to know what the runner up was. ASP? JSP? Perl? .HTML :)

    Seriously, what were your criteria, and what were your rankings ofthe various technologies based on those criteria?

  93. Tradeoffs short change c++ by ozzee · · Score: 1

    From the presentation:


    Tradeoffs: App Logic in C++

    Advantages

    - fast execution speed

    - strongly typed, mature language

    Disadvantages

    - edit, compile, link, debug cycle

    - not conducive to rapid prototyping

    - too easy to make mistakes with memory

    The "edit/compile/link/debug" cycle is not nessasarily smaller for C++. In a previous job I was able to dynamically link in C++ objects into a running apache server. There was a pre-processor, very much like ASP that spat out classes that compiled, linked and loaded straight into a running system. In a debug mode, the pre-processor made it so you could click anywhere in a page and it would take your editor to the line and column where that html was generated. It was a simple save and the file was automatically compiled and the new DLL would automatically be loaded directly into the running apache server. It was sweet and fast and the edit/compile/link cycle was about as fast as aything else. As far as rapid prototyping, I think it was equivalent to any of the scripted languages. It was tightly coupled to the database so that sizes of fields wer directly taken from database definitions where appropriate - no having to keep those in sync; in a prior life I remember endless bugs of input being truncated because the database could not take all the data.

    The most important issue when it comes to software development is "mature language". There are plenty of examples of very large, relatively easy to maintain complex systems out there in C++. The fact is that most web systems develop far beyond their original scope. Rapid prototyping can be done simply using plain HTML and a macro language.

    I suppose I'm so vocal because it bugs me that people don't see the wood for the trees. Before re-inventing the wheel, make sure you know why the original wheel is the way it is. Maybe this is not a case of this but it sure sounds like it.

  94. Re:Dangers of PHP? I think not! by glwtta · · Score: 3, Insightful
    Perl has its uses but it is not designed for the web, PHP is.

    That sentence is as much hogwash as what you are so upset about. Perl itself certainly wasn't "designed for the web", but mod_perl was, CGI.pm was, check out CPAN under HTML::, HTTP::, Apache::, etc - all of that was designed for the web.

    Oh, and since PHP was designed for the web, that means it wasn't designed for (let's say) database access, does that mean DBI is better?

    Anyway, this "designed" bit doesn't really mean much usually, it's what it actually "can do" that counts.

    btw, I just can't agree on a few points in one of your sentences:

    in my experience PHP is faster - your experience is different from that of many other people.

    more secure - this is entirely up to the developer, any differences the languages themselves may have in this ragard are utterly isignificant in comparison to the idiotic things that people routinely do.

    more feature rich - Perl has been around pretty much since the middle ages (give or take), the quantity, diversity and (sometimes more importantly) maturity and quality of modules and other various extensions that's available for it cannot be matched by any other language; not to mention the organization of said material.

    way easier to compile and maintain - I am not sure if you are talking about the language itself or scripts written in it (as the former doesn't matter a lick, and the latter... well I don't see anyone having trouble compiling Perl or PHP scripts).

    If you look at hotscripts.com you will notice PHP has more entries than Perl - I was intrigued and did look at that site. Perl has insiginifcantly more "Scripts and Programs" and PHP makes up for it by having roughly 4 times as many entries in "Tips and Tutorials", why is that one wonders? Quick search at www.oreilly.com - 15 books for PHP, 730 for Perl; sure most of those have nothing to do with web development, but still (for comparison sake, same thing at Amazon.com - 73 to 354).

    I know I'm just propagating a stupid flamewar, but what are you going to do?

    Furthermore if you don't code for PHP don't comment on it, you don't know what you are talking about. - Lastly, I just wanted to find out if you code in Perl?

    --
    sic transit gloria mundi
  95. whoa. finally. by brinary28 · · Score: 1

    i would help script it! :)

  96. Reason: Politics by quacking+duck · · Score: 1

    ASP is controlled by Microsoft, which also runs MSN, a direct competitor to Yahoo. Yahoo using ASP would be like MS using *nix boxes to run Hotmail. And unlike Hotmail, where MS could bury somewhat the fact they had to use *nix servers for awhile, Yahoo! using ASP would be instantly visible to the world.

  97. Re:Dangers of PHP? I think not! by Tablizer · · Score: 1

    and takes far less code to accomplish the same things as Perl.

    I would question this one. With sufficient web libraries, I think Perl would hold its own here on the average, and I am not a Perl fan.

    I would like to see named parameters added to PHP, BTW. And something has to be done about needing a "===" (3 equals) operator for certain operations. That one exposes some embarassing language design flaws in PHP IMO. It has to do with a "hidden" type indicator I think. I don't like hidden type indicators in scripting languages, personally. They are anti-WYSIWYG.

  98. Who is going to break this to Larry? by Proudrooster · · Score: 2

    - There's More Than One Way To Do It
    - poor sandboxing, easy to screw up server
    - wasn't designed as web scripting language

    Whoever tells Larry that PERL was rejected, please be gentle since he isn't done with the next PERL rewrite yet and this might cause unintended consequences. Better yet, just wait until the next version is out before you break the news that Y! rejected PERL for PHP.

  99. Re:This guy was paid to make this decision?!! by Anonymous Coward · · Score: 0

    If you had read the info you would see that Yahoo is using PHP for the presentation layer. Using J2EE for presentation layer logic is ridiculous. Sounds to me like backend business logic is done in C and C++ which means the combination of PHP for presentation layer and C or C++ for business logic is going to run circles around any of this J2EE stuff people like to hype.

    fucking moron

  100. Re:Dangers of PHP? I think not! by Eol1 · · Score: 1

    Not to flame but over the last year I have migrating all my php applications to mod_perl ... Will admit I started out on PHP and it was quick as hell to use but as I progressed I kept finding more and more shortcoming that Perl addressed. Also, the speed advantage died with mod_perl. Check out yahoo own charts where the perl test consitantly(?sp) beat out the PHP solution (though not by much).

    I find Perl to be the same of your fifth statement about PHP. Perl is faster, more secure, more feature rich, and less code to complish the same thing than in PHP. And I started the first 3 years of my coding life ONLY using PHP.

    They both have their places and not dismissing PHP, it is great for a quick lightweight solution. But for enterprise sites, will go the perl route. Then again, I rather hate OOP :) and perl is one of my last hopes to avoid it.

    --
    De Oppresso Liber
  101. Why rewrite at all? by utahjazz · · Score: 1, Insightful

    I read their defense of the rewrite decision. I don't buy it. Rebuttal:

    Configuration: "We have to recompile to change the background color". Ah, so the answer to this is, rewrite all of Yahoo, so they can easily change the background color. How hard would it really be to refactor this? (For that matter, how often do they change the background color of Yahoo?)

    Maintainence: As God as my witness, their newly written PHP code will still have more bugs in it 5 years from now than your Y code does today.

    Performance: Their own tests show that their technologies are capable of performing as well as PHP.

    Iteroperability: Oh yes, PHP plugs into everything. You don't even have to write code. Just put a MySql machine in the same room as your PHP code, and dynamic web pages will emenate. GS[]SARCASM

    Personnel: "No one has Yahoo script on their resume". When was the last time you hired someone because they knew a language? Employees are a multi-year investment. Learning a computer language is a weekend investment.

    1. Re:Why rewrite at all? by Anonymous Coward · · Score: 0

      Buddy, I hope you code better than you spell. And your grammar isn't too stellar either.

      Obviously they are looking to move to a more homogenous environment and to clean up years of built-up hacks. And someone mentioned in this thread that a number of yahoo things are already driven by PHP. If it sucks so bad it should be easy for you to go and determine which parts of Yahoo are in PHP, right? So go find them.

    2. Re:Why rewrite at all? by horza · · Score: 2

      Not a very good rebuttal:
      Configuration: "We have to recompile to change the background color". Ah, so the answer to this is, rewrite all of Yahoo, so they can easily change the background color. How hard would it really be to refactor this? (For that matter, how often do they change the background color of Yahoo?)

      Perhaps they are suggesting their current app isn't modular enough. How hard is to to refactor a large C app every time a small change is needed to the front end? It's a pain in the arse (coming from someone who has done this for a large C based web site)

      Maintainence: As God as my witness, their newly written PHP code will still have more bugs in it 5 years from now than your Y code does today.

      Depends how well designed their scripting language is, but remember that with PHP there are a wealth of tried and tested libraries to choose from (eg ADODB). Also with all the PHP developer mailing lists it will be a lot quicker to check if there is a bug in the script or the language itself.

      Performance: Their own tests show that their technologies are capable of performing as well as PHP.

      Their site is currently comparable... but the site isn't going to switch overnight. If they are planning to take a year to change all the code over, how much faster will PHP be in a years time? They will get that performance boost without their own internal software team having to write/optimise/debug a competitor to PHP as well as maintaining the scripts written in that language.

      Iteroperability: Oh yes, PHP plugs into everything. You don't even have to write code. Just put a MySql machine in the same room as your PHP code, and dynamic web pages will emenate. GS[]SARCASM

      Have you seen the list of databases that ADODB supports? And gee, I didn't even have to write any code... I just stuck MySQL on my box and within minutes dynamic web pages were emanating.

      Personnel: "No one has Yahoo script on their resume". When was the last time you hired someone because they knew a language? Employees are a multi-year investment. Learning a computer language is a weekend investment.

      LMAO!!! I would go to the opposite extreme and say that most of the people I've seen hired have been hired exclusively on their knowledge and experience of a specific language. Learning a language is not a weekend investment. You need to learn all the libraries, the specific quirks of the language, the tools that are best suited to that language, how the debugger works best for that language, performance trade-offs in how much OO should be used, and many other factors that only come with hands-on experience.

      Phillip.

    3. Re:Why rewrite at all? by Anonymous Coward · · Score: 0
  102. Why not a "Why not python" section? by Anonymous Coward · · Score: 0

    I wonder why they did not consider python?

  103. HTML::Mason is a memory hog by js7a · · Score: 2
    HTML::Mason / Perl fit every criteria they had perfectly.

    Take a look at the memory footprint for each insantiation of Mason and you will find it's perhaps eight to ten times the size of a PHP process's. Corallary: it takes a lot longer to instantiate, even with mod_perl. In short, Mason is a big slow hog and thus unacceptable for megasites.

    1. Re:HTML::Mason is a memory hog by puppetluva · · Score: 2

      huh?

      your comment "Corallary: it takes a lot longer to instantiate" makes no sense to me.

      In a prefork model (most Apache configs), the instantiation happens once. . . at web-server startup. So if it takes 3 seconds longer to "boot-up" the webserver, so what? Mason is NO slower after startup, when the actual page-serving happens.

    2. Re:HTML::Mason is a memory hog by js7a · · Score: 2

      A loaded Mason server is pounding its virtual memory a lot harder than a PHP server with the same load. fork() takes time when it has to swap.

    3. Re:HTML::Mason is a memory hog by chromatic · · Score: 1

      That's silly. FreeBSD uses a copy-on-write model. If you're swapping kernel memory, you've got bigger problems than choosing an implementation language.

  104. Yahoo SHOULD be using Perl, not PHP. by Deven · · Score: 5, Insightful
    The reasons given for "Why Not Perl?" were:
    • There's More Than One Way To Do It - This is a feature, not a flaw! Perl is much more flexible and powerful than PHP. Maintainability comes from coding standards, not language limitations.
    • poor sandboxing, easy to screw up server - Perl can create sandboxes with the Safe module... (And if there's any rough edges, Yahoo's engineers could probably handle it.)
    • wasn't designed as web scripting language - So what?? With mod_perl and HTML::Mason or TT2, Perl fits this niche well, without PHP's predisposition towards mixing code and data.
    These excuses for not using Perl are hardly compelling; they sound like rationalizations. Perl is a more natural fit for Yahoo's needs, especially considering that they already have 3 million lines of Perl code.

    But they plowed ahead with PHP, and what did they learn?
    • very easy to get some pages up quickly - Expected, but Perl would have been nearly as easy, and probably much easier for their existing Perl programmers.
    • But mixed app/presentation problematic - PHP code and HTML forever intertwined - Surprise, surprise! This is exactly why PHP is inappropriate for enterprise applications. PHP encourages such shortsighted design. Beginners like it, but engineers should know better.
    • PHP != Perl - The "implement twice" problem - They knew that they had 3 million lines of Perl in the backend; why didn't they leverage it? This was avoidable.
    • PEAR != CPAN - repository smaller, less mature than CPAN - Again, this was a foreseeable problem.
    • Surprises for people used to coding Perl - It's not just that some semantics differ. Experienced Perl programmers forced to work in PHP have to live with the frustration of having to write ugly convoluted code for things that would be clear and simple in Perl. PHP 4 filled in many gaps, but it just doesn't work as well as Perl does. (I speak from experience here.)
    So let's see. Their problems with PHP basically boil down to the fact that it's not Perl. (Despite the claims of PHP advocates, it's just not an equivalent substitute.) Of course, any experienced Perl programmer familiar with PHP could see these issues coming from miles away. They rejected Perl as an option, claiming that it wouldn't be maintainable, then discovered the amount of discipline required for PHP -- would following good coding standards for Perl really have taken any more discipline?

    Perl was a natural fit for their needs, and the obvious choice. The entire presentation seems to be an exercise in rationalization, attempting to justify a poor strategic decision. They should have used Perl. (Even now, they should probably abandon PHP and use Perl instead, to save themselves from getting further entrenched into this bad decision...)
    --

    Deven

    "Simple things should be simple, and complex things should be possible." - Alan Kay

    1. Re:Yahoo SHOULD be using Perl, not PHP. by Anonymous Coward · · Score: 1, Insightful

      I guess you mean mod_perl when you talk about Perl as you obviously don't want to write Perl cgis for something as busy as Yahoo. mod_perl is a rather poor templating/presentation layer system. You need to layer something on top of mod_perl to get that. Like Mason for example. mod_perl with Mason on top is dog-slow and rather crufty. I suppose there might be other and better solutions out there that I don't know about, but I am a huge Perl fan and write Perl code all day long. But for my presentation layer web logic I much prefer PHP as it rolls a very web-centric presentation layer language right into my web server.

    2. Re:Yahoo SHOULD be using Perl, not PHP. by Deven · · Score: 2

      Yes, of course they should use mod_perl. That's a given. It's a powerful and efficient interface between Apache and Perl, and no serious enterprise web applications should eschew mod_perl for CGI. (Of course, PHP advocates routinely compare the speed of PHP with mod_php against Perl CGI without mod_perl, for an apples-to-oranges comparison...)

      As for the method of presentation, Mason is just one of many options. (Some of the options offer the PHP approach of embedding code into the HTML, if you really want to go down that path.) They could also implement their own template system easily enough if the common ones are too slow or don't meet their needs. I wrote one alone in a week or two, which worked quite well and was used for a production web application to manage email accounts.

      There are plenty of options for handling the presentation, and they could have found or created a suitable option without much effort. There are very good reasons to lean toward a separation of code and presentation for enterprise applications, but PHP's predisposition is for embedding code in the HTML, which inevitably leads to problems...

      If you really want to mix code and data, you can easily write Perl code which consists mostly of quoted HTML, with variable substitutions and code blocks as necessary. With the myriad quoting options Perl offers, there's no reason for this to be any less readable than PHP code embedded into an HTML page, and it should be at least as fast.

      Keep in mind that the main "advantage" PHP has is being "easy" because you can intermingle PHP code with HTML so readily. This is great for beginners and single-developer sites. It's not so great if you want programmers to develop the business logic and web designers to create the HTML.

      PHP does not make sense for enterprise applications...

      --

      Deven

      "Simple things should be simple, and complex things should be possible." - Alan Kay

    3. Re:Yahoo SHOULD be using Perl, not PHP. by Anonymous Coward · · Score: 0

      I think the point here is to use PHP as a presentation layer language and write the heavy-lifting business logic code in a strongly typed natively compiled language like C or C++. At least that is what I got out of reading this stuff. You seem to be advocating writing entire enterprise apps in mod_perl. Somehow I think the native C or C++ implementation with its presentation layer defined by PHP is going to run circles around the all-Perl solution. Or the all-Java one for that matter.

    4. Re:Yahoo SHOULD be using Perl, not PHP. by Deven · · Score: 1

      If you would keep a C/C++ core and add a PHP presentation layer, then you could just as readily keep the same C/C++ core and add a Perl presentation layer, which would work better. They could use Perl to whatever extent they intended to use PHP -- if they have native C/C++ code that's already debugged, it may be worth using -- I'm not suggesting that they should necessarily rewrite the code in Perl just because they can.

      That being said, I see nothing wrong with implementing enterprise applications entirely in Perl. For many applications, you won't need the speed of C/C++, because Perl is nearly as fast for many purposes. When the raw speed is important enough, it's always possible to optimize the hot spots with C/C++ code, if necessary.

      Implementing enterprise applications entirely in PHP, on the other hand, strikes me as a poor idea in general, and a worse idea for Yahoo with their existing base of 3 million lines of Perl code...

      --

      Deven

      "Simple things should be simple, and complex things should be possible." - Alan Kay

    5. Re:Yahoo SHOULD be using Perl, not PHP. by Beliskner · · Score: 2
      Perl was a natural fit for their needs, and the obvious choice.
      Migrating languages is a good reason to keep your job, so shut up and don't get these Y! coders fired. They'll migrate to Perl after 3 years when they realise PHP's not ideal. Don't make a big deal of this.

      This is exactly why planned obsolescence is required in software.

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
  105. Easy guys by Anonymous Coward · · Score: 0

    FreeBSD is a nice OS.

    An ex BSD user...now I use Gentoo Linux.

    Peace !!

  106. Die OR Perl by Anonymous Coward · · Score: 0

    Oh, you don't like, "Die OR Perl"?

  107. Agreed. by Anonymous Coward · · Score: 0

    Perl: Write once, wonder forever.

  108. But you can say one thing for them... by Anonymous Coward · · Score: 0

    At least they don't have the social skills of gnat like some.

  109. Re:Dangers of PHP? I think not! by ShannonClark · · Score: 1

    Well if you read the presentation carefully you will see that one of their reasons to use PHP was clarity of code.

    I.E. Perl may take "less code" but less is not always better - especially if you have a MULTIPLE developer environment. I have never seen a large scale Perl application that was easy for multiple developers to maintain and manage - the differences in coding style are too great, and the ease of obfuscation too high.

    PHP on the other hand is a very clear language, and while yes, the OOP pieces are not primary, the language itself is very well designed for developing web-applications.

    My experience with PHP is that of owning a software company whose products are entirely PHP based. These include near-realtime AI applications. PHP has been a very powerful component in our development process - allowing us to write applications that are clear, easy to understand, well documented, and still fast and scalable.

    While it is certain that we could have done much of this in Perl, it is also very likely that it would have taken us longer to code, and that ongoing code reviews would have been more difficult - further PHP's simplicity is a large part of the value.

    Our code is anything but simple - we have code that is auto-generated (on the basis of data we have code that writes itself), our code manipulates multi-dimensional arrays, we do file, web, and database access - all in a very compact amount of code.

    In an enterprise development environment performance speed is NOT the only criteria, ongoing development and maintanence issues are also very crucial.

    Fast code, that is impossible to debug, maintain, update, or correct when something has to change rapidly costs more than the costs of adding slightly more hardware/bandwidth/memory to support the software.

    Indeed, in supporting developers the largest advantage of a migration from a complex (but powerful) language to a more simple language is the increased clarity of the code (C++ to Java; Perl to PHP). While you can argue till you are blue in the face about the relative merits of each language - a language that encourages clean code and facilitates rapid development and intra-developer communication is a very very good thing.

    --
    -- Join us in Chicago May 1-4th for MeshForum -- writer, historian, tech geek, entrepreneur, internet junky since '91 --
  110. Now what will they call it? by trainsnpep · · Score: 1
    And I said, let there be...simple code

    I've found PHP so much easier than C++, VB, BASIC, and Java...For what I do, it's much easier and more supportive...however, I've never done anything in Perl...

    At first, it was Yahoo!. Then, they started using the Y!...YaPHPoo (Yaff-poo) now?

    Now, one last note...If programming languages could speak...., what would PHP have to say for itself now?

    --
    --<Mike>--
  111. Yahoo doesn't just use C/C++ by Anonymous Coward · · Score: 2, Interesting

    This slashdot intro suggests that Yahoo currently only uses C/C++. This isn't correct. Many of Yahoo's services use other languages such as Python, Perl and LISP.

  112. No, think about it. by Inoshiro · · Score: 2

    You have to have a layout layer. That is the HTML page (with help from CSS). Into the HTML page you place your widgets. Be they text labels (IE: text which is variant), buttons, etc. You build them programatically and place them into your page layout.

    The same thing happens in programs on your desktop. There is a Glade XML file which describes the look and layout of variables. Into this you place your variables, be they text or controls.

    Something like the person I was repyling to asked about would be like a custom control. You place the output into the page, and all apears well. Want to change how the entire page looks? Change the CSS. Want to change how the control is logically designed? Then you change the program logic

    You don't sound like you understand how stylesheets work. They take care of practically the entire presentation layer. Consider, for example, my changelog. Look at it in Mozilla. Now, choose View -> Use Style -> {pick one}. Note how the entire look of the page changes. That is CSS. The general layout of the page is accomplished via common CSS markup positions (view the basic page style to see it "stripped"). The calendar is a good example of an HTML custom control. Certaintly, the logic of how the control work is tied a little bit to its layout, because it wouldn't make sense for a calendar to look any other way. But it's not married to that specific page layout, which is what the original poster was asking about.

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
  113. I consider how most use them to be deprecated. by Inoshiro · · Score: 2

    You should accomplish your layout with DIVs. Tables are supposed to be meta-containers, not exact-layout positioning tools.

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
    1. Re:I consider how most use them to be deprecated. by Dirtside · · Score: 2

      Oh, you consider them to be deprecated. Well, that's quite a different statement from, "Tables are deprecated," isn't it?

      --
      "Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
  114. for the love of Jebus! by Ender+Ryan · · Score: 2
    Jesus, you're complaining about people arrogantly arguing for Perl over PHP, but then you go and do the same thing, how idiotic.

    I especially like this paragraph:

    I would have been very shocked if they picked Perl of PHP, in my experience PHP is faster, more secure, more feature rich, way easier to compile and maintain, and takes far less code to accomplish the same things as Perl.

    Are you in some way marketing PHP to clients? I haven't seen so many buzz-words/phrases since the last MS press release I read.

    I just have to pick that apart... (sorry)

    in my experience PHP is faster

    Sounds to me like you're not sure... FWIW, I don't know which interpreter is faster at compilation/run-time, but both offer cacheing of compiled scripts, and on the Perl side there are zillions of modules written in C to handle most anything processor intensive.

    more secure

    where'd you pull that out of? I think they're both probably limited by the experience of the programmers using each language, and there are WAY to many inexperienced programmers writing code in BOTH of them(how often have you seen user input carelessly thrown right into sql queries?).

    more feature rich

    That's rich(no pun...), I thought Perl was the language overloaded with features? Further, can you say "CPAN"? I thought so...

    way easier to compile and maintain

    Compile? I think syntax errors are easy enough to pinpoint in either language... I don't thinking getting Perl or PHP scripts to compile is ever really an issue... or did you mean something else by that? Maintain? I've written a lot of code, and I'll tell you right now that I can write equally unmaintainable code in any language you throw at me ;)

    and takes far less code to accomplish the same things as Perl

    Nonsense! Ludicrous! Perl and PHP can pretty easily, in most circumstances, be directly translated with minimal effort from one language to the other.

    To each his own. But, for the love of Jebus, stop the insanity! They're both useful language, stop insulting each over other personal preferences.

    --
    Sticking feathers up your butt does not make you a chicken - Tyler Durden
  115. Re:Back End vs. Front End by doomdog · · Score: 1


    You spewed the following drivel:

    "I'm not a "web app" developer; I'm a real developer who got dragooned into wasting a few months on a web project because that stuff is trivial and we couldn't see any sense in hiring a "web app developer" for something that a programmer could do twice as well in half the time. And then we'd have to fire the poor fool when we were done with him."

    You're the same "real developer" that wrote a JSP web project that was so slow that the client thought the server was hung, right? Hmm.....

    So the truth, like memory from your code, is slowly leaking out... You're a bigoted C++ programmer that thinks templates are the greatest thing in the world... Sure, Java doesn't have templates, but it does have built-in threading libraries (which C++ doesn't) -- and I find them far more useful...

    By the way, the only reason you like templates is because you've never had to debug one...

  116. My 2 cents by SomeOtherGuy · · Score: 2

    PHP is what J2EE coders use on their own sites. In a big enterprise, J2EE has gotten enough buzz and is well rounded enough and powerful enough to keep everyone happy. The coders like it because it pays well and the work is there even in this economy. But believe me -- J2EE is not really fun, and not really something people would use if given the choice of any toolset. Now -- this is just what I see, the coders that report to me have been developing great "enterprise level" J2EE apps all year with no complaints and only few YAWNS to this point -- but everyone of them I talk to always say that PHP is what they use when given the choice -- and/or if they have to throw up a site at home....

    --
    (+1 Funny) only if I laugh out loud.
  117. Problems with PHP by togofspookware · · Score: 0, Redundant

    Well... I don't know if someone else has already pointed these things out, and I don't have time to go through and read all 6800 posts, so I'll just voice a few complaints about PHP.

    I use PHP because that's all that's available on my web hosting service other than cgi. I could use the cgi-bin but then all my URLs would start with cgi-bin/, which would suck.

    PHP is nice for doing database query stuff, and it's nice for simplifying your pages (for instance if there's a standard block of HTML you want in your pages and don't want to have to copy it all the time or re-compile a bunch of static HTML files), but as I've used it, I've come across a few problems.

    1) This one is really annoying. Certain pre-defined variables (I'm not sure which, maybe only user-inputted data) are pre-slashed. So if a user inputs the string 'My name is "Jon"', you get it as 'My name is \"Jon\"'. WTF is up with that? That's not what he said! I can't find the reason for this or anything else about it in the documentation (maybe it's there somewhere, but I can't find it).

    2) Every time a page is loaded, it has to be re-parsed, as well as any included scripts that it uses. This is very inefficient.

    3) It's a real pain to include scripts that are in different directories which include other scripts, because they will try to open them relative to the location of the original page.

    I (and it seems other people do, too, guessing from the user-submitted documentation on PHP.net)have to use nasty hacks to get around these problems all the time.

    As far as alternatives go, right now I'm a big fan of Python. It has lots of useful libraries, and the language is very elegant (sp?). The one thing I don't like about it is that every time you access a variable, it has to look up the name in a dictionary (I think).

    Unfortunately I couldn't get mod_python to work. I'm writing my own web server (in Python), instead, so that I don't have to deal with all of the Apache/PHP problems I've had. Looked at Medusa, but that seemed a little too complicated for what I was doing.

    I actually don't care much about the syntax of the language I use (as long as it's not too unreasonable). What's important to me is that I can use an elegant, efficient runtime in which I don't pay for things I don't use, and that I get a useful standard library. I think I'll be happier when I can use mod_parrot :-D

    I'm still stuck with PHP on my real site, though (as opposed to my personal box that I play with).

    --
    Duct tape, XML, democracy: Not doing the job? Use more.
  118. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 0
    I would have been very shocked if they picked Perl of PHP, in my experience PHP is faster [...]
    I won't address your other concerns, but if you actually read the artcile, you'll see that their mod_per solution (YSP) outperformed their PHP solution, but required more memory.
  119. Re:"hard to hire engineers who really understand i by jcrash · · Score: 2, Funny


    There was a dilbert a couple weeks ago which I would recommend for you. It had to do with a user having a fatal illness due to exposure to an interface designed by an engineer.

    As a developer with a Master's Degree in Business, I would say that more often than not in my experience it is the guys with the most "engineer" oriented approach in them that create the least attractive and worst performing code.

    --
    I do not fear computers. I fear the lack of them. Isaac Asimov (1920 - 1992)
  120. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 0

    === means equal in value and in type, ("" == 0) is true but ("" === 0) is not, you could get the same result. The only time you see it in code is for checking results from functions that return false as an error but 0 or "" is a valid return value. So by using === you can diferentiate. This is actually the same setup as in javascript, im not sure how perl handles this but if it doesn't use the same rules then its more confusing cause then its acting kinda sorta typeless, instead of being explicitly typeless

  121. Re:Dangers of PHP? I think not! by kputnam · · Score: 1

    Yes, but this is true with most software. (Especially Windows or Outlook.) You can't really say PHP is any more insecure than C... beginners are likely to use the functions that don't validate input and cause possible buffer overflows. If you code safely, your PHP applications can be just as safe as any other language. And it's pretty simple in PHP... I don't know what steps need to be taken in C or Perl but in PHP basically you just need to be careful enough to only use $_GET, $_POST, $_SERVER, etc instead of global variables.

  122. These aren't really problems. by mgkimsal2 · · Score: 5, Informative

    1) This one is really annoying. Certain pre-defined variables (I'm not sure which, maybe only user-inputted data) are pre-slashed. So if a user inputs the string 'My name is "Jon"', you get it as 'My name is \"Jon\"'. WTF is up with that? That's not what he said! I can't find the reason for this or anything else about it in the documentation (maybe it's there somewhere, but I can't find it).

    It's also pretty annoying when you don't read the manual - and this one is NOT obscure to find. Section 8 - "Variables" (which is what you're dealing with) has a section about 'Variables from outside PHP':
    http://www.php.net/manual/en/language.varia bles.ex ternal.php

    2) Every time a page is loaded, it has to be re-parsed, as well as any included scripts that it uses. This is very inefficient.
    Then design a better language yourself that has nifty things like variable variables (echo $$b[0]->foo;) and is still faster than most other languages. Or just get a host that will use one of the many caching products available (zend, ioncube, etc)

    3) It's a real pain to include scripts that are in different directories which include other scripts, because they will try to open them relative to the location of the original page.

    Seems pretty damn logical to me. Of course, PHP will also look for files in the 'include_path' which is set in the php.ini file, so it's really looking in multiple places. And it wouldn't kill you to just use a predefined constant like DOCUMENT_ROOT and include files relative to that so your scripts would be portable and a bit easier to move around internally if you need to.

    PHP does have problems - nothing you've mentioned here is a 'problem' beyond the level of mere annoyance to a handful of people.

    Slight plug - those who've taken our PHP training course have never complained about the issues you brought up as 'problems'.

    Cheers

    1. Re:These aren't really problems. by togofspookware · · Score: 2, Insightful

      It's also pretty annoying when you don't read the manual - and this one is NOT obscure to find. Section 8 - "Variables"

      OK. I thought I looked at that page. I guess I only looked at the one about superglobal arrays, though. But you don't have to be a jerk about it. And it still doesn't explain why that is done, aside from saying that you need the slashes when doing database queries. Most of the time you're not doing database queries. It seems rather arbitrary to add slashes to user-inputted strings but nothing else. Why not add slashes when you read a line from a file, too? And I realise that you can turn this behavior off in the configuration, but then your scripts won't be portable, since it is the default behavior.

      /* ...This is very inefficient. */

      Then design a better language yourself that has nifty things like variable variables (echo $$b[0]->foo;) and is still faster than most other languages

      What's that got to do with re-parsing pages? Python can use variable variable names, and it always compiles included files.

      Or just get a host that will use one of the many caching products available (zend, ioncube, etc)

      If PHP itself was little more clever about caching compiled scripts, I wouldn't need to do that. Although I agree that this isn't really a problem in that you can't do it as much as because you have to do extra work.

      /* 3) It's a real pain to include scripts that are in different directories which include other scripts, because they will try to open them relative to the location of the original page. */

      Seems pretty damn logical to me. Of course, PHP will also look for files in the 'include_path' which is set in the php.ini file, so it's really looking in multiple places. And it wouldn't kill you to just use a predefined constant like DOCUMENT_ROOT and include files relative to that so your scripts would be portable and a bit easier to move around internally if you need to.

      That's almost exactly what I do, but as I said, it seems like a hack. There should be a way to include files relative to the current file.

      Anyway, whether you think these are really problems or not, they are annoyances for me (along with other issues such as no real pass by reference), and they didn't need to be there.

      --
      Duct tape, XML, democracy: Not doing the job? Use more.
    2. Re:These aren't really problems. by mgkimsal2 · · Score: 2

      Wasn't trying to be rude about it. PHP has a pretty good manual already, though, and this issue (quotes) is a pretty basic one to find if you search around - heck, there are references to the issue on the first page of google results for 'php quote' (or is it 'quotes'?)

      The REASON it's done is a legacy issue - it was felt that it'd be easier for the language to add the slashes to incoming data before it was placed in a database, rather than having to manually add the slashes (for mysql). It's not a perfect system, but the thinking behind in it 1996 or so wasn't completely flawed.

      Compiling - the primary reason nothing is cached by default is probably more commercial than anything else. Doing so would obviate the need for the commercial Zend accelerator product ($900/CPU or so). There are free options too, but it's more a political issue, not having it done by default - having a commercial company so intertwined with the basics of PHP is a drawback, imo.

      MOST languages don't cache their code by default. The servers they run with may handle that, but the languages themselves don't often do that. IIS/ASP may cache compiled VBScript, for example, but VBScript on its own wouldn't know anything about caching. Yes Python can do that (I guess - haven't used Python much in months) - it's one of only a few. You seem to REALLY like Python a lot - no one is stopping you from using that instead of PHP. BTW, Python's got its own problems too.

      I disagree on the 'relative including' issue - I see what you're getting at more now than before, and I think it would confuse the matter moreso than it might be now. Moving one file which includes others would require moving all the other files as well, or recoding the one file to point to the new (relative) location of all the included files. Seems like a lot of work to go through when something as minor as moving a file needs to happen.

      I agree on the passing by reference issue - that's something which will be addressed in the future, but I'm not sure how well it will be addressed. Not being able to cycle through an array with while(list($k,$v) = each($arr)) { and change the values in the $arr array directly is a pain, for example.

  123. ASP.NET by Anonymous Coward · · Score: 0

    PHP is more flexible than straight ASP. In order to really utilize ASP you needed to write custom COM objects, and that's difficult to do in a hosting environment.

    But you might wish to look into ASP.NET, as it's a signifigant step up above either.

  124. Re:Dangers of PHP? I think not! by Tablizer · · Score: 1

    Part of the "cause" of this oddity is that many PHP functions use a zero base, such as for character positions in a string. If they used one-based, then they perhaps would avoid some or all of this zero equality confusion. I personally find one-base more natural for things like positions and subscripts, but I guess they did zeros for C-compatibility/familiarity.

    I wish language makers would have the balls to toss all the dumb things about C and start fresh.

  125. Comment removed by account_deleted · · Score: 2

    Comment removed based on user account deletion

  126. Tables for layout by togofspookware · · Score: 1

    You should accomplish your layout with DIVs. Tables are supposed to be meta-containers, not exact-layout positioning tools.

    In a perfect world, this would be true. I tried. I mean I really tried to not use tables for non-tabular data, but if I used tables, my page showed up just like I wanted it to, and was more tolerant of different browsers than it was when I tried to use floating DIVs (looks best in links :-)

    I might be able to use floating DIVs if they could be 'contained', and not overflow into sections of the page where I don't want them. But If I have something like:

    <div>
    <div class="box" style="float:right">
    Lots of text
    </div>
    Small amount of text
    </div>
    <div class="box">
    text of box
    </div>

    Then the box in the upper right overlaps the lower one, which is not what I want. But the table:

    <table><tr><td>
    Small amount of text
    </td><td>
    Lots of text
    </td></tr></table>

    Does exactly what I want. See my webpage if you're curious. (Or if you know how to do this right ;-)

    I don't like using tables for this kind of thing, but they do work better than anything else for what I want to do, as far as I can tell.

    Maybe if there was a 'layout' flag, to tell the browser that the table isn't really displaying tabular data, but is only being used for layout purposes? <table layout>blah</table> Then all would be well. :-P

    --
    Duct tape, XML, democracy: Not doing the job? Use more.
    1. Re:Tables for layout by CaptainEcchi · · Score: 1

      I agree. I started out my last webpage layout wanting to do a very neat, standards-complying page, that didn't use tables for layout.

      Of course, then I tried to get that page to work in NS4.

      You can imagine my delight.

      Say what you will about tables, they are predictable, if nothing else.

  127. About Time! by Anonymous Coward · · Score: 0

    hf2k was way, way too hard to maintain. Especially when you inheirited someone else's collection of undocumented hacks.

  128. Have they got PHP stable with Apache 2.0 yet? by Anonymous Coward · · Score: 0

    Any good/bad PHP/Apache 2.x experiences out there?
    I heard PHP wasn't quite threadsafe yet. Is this true or false?

  129. HTML and PHP intertwined by kris · · Score: 2

    The drawback of using a code in template system, is that your code and HTML output quickly become forever intertwined.

    This need no longer be.

    PHP has in fact a lot of mechanisms for separation of code and content, and I happen to be guilty of adding not only one, but two of them.

    My first stab at the separation of PHP from HTML was a rewrite of the mess that was FastTemplate.class.php at that time, adding the Template class to PHPLIB. This was basically a rewrite and cleanup of the FastTemplate API, later revised by Ulf Wendel and added to PEAR. Now called Integrated Template in PEAR, it is a good base technology for HTML/PHP separation, and can be scaled pretty well combined with Cache_Lite_Output also from PEAR.

    My latest attempt in separation is XML_Transformer, again in PEAR. XML_Tranformer tries to do what XSLT does, but without the disadvantage of creating a domain specific - it is basically XML transformation specified in PHP and aims to deliver the 80% of features that everybody needs with 20% of the code compared to XSLT. The design of XML_Transformer is heavily influenced by Roxens RXML (Roxen Challenger, formerly called Spinner, is a very old webserver that had XML transformations long before either XML or XSLT were specified at all) and easily extensible.

    XML_Transformer extensions (called Namespaces) are modular, and written properly, are enitrely reuseable. Similar to Roxen or Cold Fusion, they implement groups of tags that can be useful in many projects. XML_Transformer will be presented at the PHP Congress in Frankfurt/Main next week.

    Kristian

  130. Honolable H1-B Ploglammer... by Anonymous Coward · · Score: 0
    ..."Mi So Solly" had tloble plolgamming in "C Puh Puh" so Yahoo, to save $$$, switch to PHP.


    Chee-pee Chi-a-nee H1B ploglammel velly happy!

  131. Re:This guy was paid to make this decision?!! by Anonymous Coward · · Score: 0


    Go back to the Slashdot synopsis of the article... no, let me help you:

    "Yahoo has decided to switch from a proprietary system written in C/C++ to PHP for their backend scripting."

    Does that sentence sound to you like they are replacing NOT replacing their C/C++ backend logic with PHP you dyslexic dumb fuck?

    Why would the author of the presentation even mention J2EE in the same sentence if there is no possibility that they would put PHP where J2EE would belong you pimple-faced crack whore?

  132. Stop The Java Hype by Anonymous Coward · · Score: 1, Insightful

    Why is everyone lobbying Java as a silver bullet to every problem? Creating web-applications with Java is RIDDLED with problems.

    I have done almost 5 years of web application development with J2EE. Large applications with internationally known clients. I'm not saying Java is bad, but it's not very good with web apps either.

    Some things to consider:

    - JVM's work differently. x86 vs. SPARC threading, or IBM JVM vs. Sun JVM. Only way to get best of Java is to use Sun SPARC JDK/JVM. Period.

    - Java is not cross-platform enough. Java is currently supported on so few platforms that it's really not as cross-platform as PHP, C/C++, or even Perl.

    - Java's web technologies (except maybe Servlets) are such an unusable mess; Struts, taglibs, and JSPs are crap. You can only think that they're good if you have nothing to compare to.

    - Java development is slow. Admit that! When was the last time your commercial project with a deadline(tm) was delivered on time? Let me guess .. never? It's not the Java language as such, but the overly abstracted crappy JDK classlib, ridiculously complicated web application technologies and so forth .. not to mention EJBs

    Sure, go ahead and say it was just us that sucked, but if you go check out some studies from companies like Standish Group, you quickly notice that most (over 80%) of all projects don't meet their deadlines.

    - Java is still "work in progress". Not many sites run Java. Please understand, that if magazines boast Java, and Sun markets it, it DOESN'T mean it's in widespread use in web applications. Even this site you now read is written in Perl, not Java.

    - Java is mediocre. As a language it's just mediocre collection of features from earlier languages. No need to hype Java.

    - Java application that is much abstracted is not easy to extend, modify or debug, contrary to the marketed opinion. That works only in books, but practise shows that when application gets complex in it's structure, it also gets hard to modify. It takes less skill (no CS degree) to update a PHP+HTML+MySQL site than Java+Servlets+JSP+taglibs+Struts+... site

    - Use right tool for the right job. PHP is great tool for the web, Java isn't.

    - Java application servers are so different in their implementation that deployment of a J2EE application is a hell to more than 1 server. Try it. I've deployed to Resin, WebSphere, JBoss, JRun, WebLogic and Orion. Only about Resin I can say good things, but not many clients use it so far.

    - Word "Enterprise" does not mean anything except marketing. An "Enterprise" application can be made with any language, and MOST enterprise-level or mission critical applications have been done with Cobol, C, Ada and C++.

    - Java is SLOW AS HELL. Consider for a moment that Linux was programming in Java. Goddamn, it would boot like 2 days, and opening an application would propably crash to a NullPoin terException with no usable information in the stacktrace

    etc etc etc

  133. Re:Dangers of PHP? I think not! by Edgewize · · Score: 1

    No, that is not a problem. It is a benefit for fast prototyping and throwing together a quick solution.

    For serious projects, it is up to the programmer to make the seperation between logic and formatting. An easy method is to have every page in two parts, a .inc and a .php. Force yourself to write the .php with only simple loops, include statements, and echo commands; all other code goes in the .inc file. Works great.

  134. PHP vs C++? by tgv · · Score: 2, Interesting

    What's the big advantage of PHP over C++? The author mentions C++ being "cumbersome" and "prone to buffer overflows". That's a load of BS.

    If you have a proper set of string, socket and associative array libraries, C++ works just as well as PHP and offers a whole lot more, if only the ability to check for existence of variables. Plus you don't have to type these f?c?i?g dollar signs in front of ever variable.

    The other argument, "memory leaks degrade server performance" indicates bad programming, which is not going to be improved in PHP, but which can be solved in aforementioned libraries. Simply don't allocate anything dynamically outside the libraries. Plus, PHP has its own memory problems, if you don't take care of your arrays. Of course, memory will be freed as soon as the program stops, but that holds for C++ as well and memory management by process termination is another sloppy practice.

    So PHP is easier to use in Apache, but that should not be a reason for making such an important change to your code.

    And then comes the biggest joke of them all: the list of criteria! Do they really want us to believe that data types in PHP are better than in C++? Do they really think that PHP has "a pleasant syntax"? Or is this simply a red herring?

    I can imagine using PHP for web-sites where being neat and efficient simply doesn't pay off, but for the "world's largest web site"...

    I'm amazed.

  135. Re:Dangers of PHP? I think not! by deepone · · Score: 1

    I certainly wouldn't want a system that did rm -rf / all the time by default... :)

    --
    -- No, no -- Not that one!
  136. Re:Dangers of PHP? I think not! by nzhavok · · Score: 2

    Pardon my ignorance (I've only dabbled a little in PHP), what is the danger of the global variables in this situation?

    --

    He who defends everything, defends nothing. -- Fredrick The Great
  137. Re:Dangers of PHP? I think not! by nzhavok · · Score: 2

    PHP-Templates are very handy for seperating the logic/formatting as well. Well I suppose thats what they were designed for.

    --

    He who defends everything, defends nothing. -- Fredrick The Great
  138. Re:Get rid of the file system completely - simplif by ndecker · · Score: 1
    Scripting languages have their uses, but at the moment they tend to be used for everything. But everytime i use them in a bigger project, i miss a strong typechecker. Having the compiler check all types in a programm catches most bugs and reassures/verifies design decisions.


    ( I have used Haskell a bit, and since then i wish there was a powerful mainstream language that is *completely* typechecked at compile time. )

  139. Curious by nirvanis · · Score: 1

    Y! LAUNCHcast uses ASP.

    --
    nirvanis
  140. My vote goes for phemplate by horza · · Score: 2

    I picked phemplate because it's fast and has a nice syntax. It does have its limitations though.

    Phillip.

  141. Buggy, slow and inelegant by Martin+S. · · Score: 2

    I skimmed the comments so far and it seems like some people don't have a very high opinion of PHP.

    Well I can only speak for myself.

    In my experience:

    1) It's flakey, buggy and slow. Script's can cause the PHP engine to core dump.

    2) The standard argument for using PHP seems to be it's easy rather than it's good, and that speaks volumes to me. The habitué of news:comp.lang.php are arrogant and rude despite for the most part being hobbyist rather than professional engineers. Hell, they make /. look like a paragon on professionalism. Most of them have no idea what the MVC or 3-tier architecture is never mind advantages/disadvantages.

    3) PHP language lacks coherence, it's a bucket of functions & wrappers rather that a designed structured language.

    4) It tightly couples presentation with logic; php and html are mixed on the same lines not just the same files.

    It's one thing to feel like something is better, but to despise it baffles me.

    That because you've never felt that Pretty-Horrendous-Pain. In my experience J2ee IS superior, faster and more stable that PHP. It's a lot more elegant and internally consistent. Indeed from the presentation it seems Y! reason for not choosing J2ee over PHP is nothing to do with Java, but that 'Threads support on FreeBSD is not great'.

    However PHP has its place, prototyping and hobbyist sites. It's completely unsuitable for a site than need to be maintained and developed, since its inelegant compounds the classic mainternance issue of diminishing returns on effort. Whereas Java's provides the opposite an increasing return on effort from OO reuse.

    1. Re:Buggy, slow and inelegant by shibboleth · · Score: 1

      The habitué of news:comp.lang.php are arrogant and rude

      Once you get to know them you learn this is an interesting instance of top-down attitude adoption. (Another example, though in a different direction, would be Larry Wall vis-à-vis the Perl community.)

      But an even worse problem has been lack of an inexpensive, working debugger on Linux and Windows. Debugging even a moderate size PHP site is a nightmare without one. Komodo may be near solving that, at $23 for noncommercial use, if they can improve their mod_php support and docs. Their php cgi support seems to work fine. (If you value your time avoid Zend at all costs.)

      --
      "Be thankful you are not my student. You would not get a high grade for such a design :-)" - Minix pro
  142. Re:Dangers of PHP? I think not! by messju · · Score: 1

    You cannot distinguish between variables
    from within your code and variables from
    outside (via i.e. index.php?foo=bar...). this is
    not a security concern in the first place, but
    prone to errors, like:

    if ($pw='secret') { $auth=true; } ...
    if ($auth) { do_advanced_stuff() }

    someonce could let advanced_stuff done, without
    knowin 'secret', by calling the page with ?auth=1

    HTH

  143. ' register_globals ' by Martin+S. · · Score: 2

    register_globals allows URL access to system (OS/Server) environment variables.

  144. Re:Dangers of PHP? I think not! by sheriff_p · · Score: 2

    I would have been very shocked if they picked Perl of PHP, in my experience PHP is faster, more secure, more feature rich, way easier to compile and maintain, and takes far less code to accomplish the same things as Perl.

    That's uh, interesting experience. Where have you found Perl to be unsafe where PHP is safe? I'm not sure I remember the last time there was a Perl security hole which would affect any thing you might want to be doing with web stuff.

    More feature rich? Which features would those be? Are you aware of CPAN? And how much bigger and more mature it is than PEAR?

    Way easier to compile and maintain? Debatable, especially considering people tend to install from binaries for both. Maintain? What do you mean there? The only application of that I can think of is installing third party libraries, where again, the CPAN tools are a very definite step ahead of PEAR.

    So please, can you back any of that up? I'd be really interested to learn of any examples, but frankly, at the moment, I think you need to realise false advocacy like that just harms PHP's image.

    --
    Score:-1, Funny
  145. dot com managers.. by DrBungalow · · Score: 1

    That's funny.. I made a CMS in php one year ago for a website and the boss decided not to use it and rewrite everything with JSP and servlets because he said php couldn't handle "high-traffic" sites (and the boss considers a 15,000 users/day site a "high-traffic" one)...

    1. Re:dot com managers.. by mgkimsal2 · · Score: 2

      What would cause someone to rewrite a working app? If it was a performance issue, then perhaps your code wasn't performing well? If it was 'rewritten' in the middle of development, that's possible more strange, but maybe at least justifiable (not done with the PHP one, so switching is easier than waiting until after the PHP project is done).

    2. Re:dot com managers.. by DrBungalow · · Score: 1

      The app was fine, they decided to rewrite it just for buzzword compliance. The boss wanted to insert into slideshows terms like J2EE, XML, CORBA and so on. Now they left a site section done with my code and, guess what, it's way faster than the new JSP section!

    3. Re:dot com managers.. by mgkimsal2 · · Score: 2

      heh :)

      Doesn't surprise me too much that the PHP is faster. We tried to come up with benchmarks that showed Java faster than PHP for the type of work we do - web-based applications - and it was pretty hard to ever show that. PHP was nearly always faster, or it was a dead heat. I can imagine in some cases Java will be faster, but we had a hard time thinking of ways to show it, dealing in situations we deal in (web-based apps - no doubt there are scenarios where Java beats PHP).

  146. HTML is not a protocol by Wheat · · Score: 1

    HTML is a markup language. HTTP is a protocol. The difference is that mark-up languages are data, while protocols are used for the transferring of data. Contrast XML and FTP. Or the English language and the IRC protocol. Or BASH and ssh.

  147. Re:Dangers of PHP? I think not! by nzhavok · · Score: 2

    Thanks, after reading through the PHP docs for a while I saw this was the case. Personally I usually code like

    if ($pw='secret') { $auth=true; } else { $auth=false; }

    because of years of trying to avoid uninitialized C variables, but I suppose I'm bound to mae mistankes now and then :)

    --

    He who defends everything, defends nothing. -- Fredrick The Great
  148. benchmarks by drugdealer · · Score: 1

    If you're going to look at benchmarks, I'd suggest looking at both the Caucho and Chamas benchmarks:

    Caucho benchmark
    Chamas

    It's worth keeping in mind that Resin is Caucho's main product. I'm not claiming that Caucho distorted their benchmark in any way; I'm just pointing out that they have a vested interest in the outcome of their benchmark.

    Similarly, Chamas is the originator of Apache::ASP. Again, I'm not claiming that Chamas distorted their benchmarks in any way, but it is always wise to be aware of potential conflicts of interest. Though in the case of Chamas, the potential conflict is respect to Apache::ASP vs. other technologies rather than Java vs. PHP.

    Hmm, I use both Java (JBoss) and PHP. Maybe I should make my own benchmark.

    I'd say that if you are primarily interested in failover, message queueing, and the other stuff addressed by J2EE, go with JSPs/servlets/EJBs. If you want to build and deploy something quickly, cheaply, and with low performance overhead, go with PHP.

  149. Shameless plug... by MagicFab · · Score: 1

    They are going to need Zend ;)

    --
    Notepad specialist & FAT administrator, group training available
  150. Speed by Andy+Dodd · · Score: 5, Informative

    While this may have changed, a few years ago, Postgresql was a non-competitor for one reason and one reason alone: It was slow.

    MySQL had a reputation for being VERY fast. (In fact, this is why it was chosen for /. - It was the fastest choice available at the time.)

    Again, this may have changed, but in the past, MySQL was the speed king if you didn't need all of the other features that Postgres offer.

    So in short, the one users reason is, "I picked a database with less features/reliability because I need speed more than features/reliability."

    --
    retrorocket.o not found, launch anyway?
    1. Re:Speed by slamb · · Score: 1
      So in short, the one users reason is, "I picked a database with less features/reliability because I need speed more than features/reliability."

      Okay. That makes much more sense. I'm not sure it's really true for a lot of people, though:

      • I've never had a speed problem with PostgreSQL. With a decent database structure, correct indexes, up-to-date statistics (run "vacuum analyze" nightly), and sane queries (read an "explain analyze" every now and then), it's always been orders of magnitude faster than I really need. I think what I do is as intensive as what most people do with MySQL. I wonder if people feel like they are pushing the performance envelope because they are doing weird queries because proper ones are not possible with MySQL's limited query options. Or if they just see that MySQL is fast enough and assume PostgreSQL would not be without really trying it.

        At work, I sometimes deal with lots of data (Oracle). There I'm glad for performance features like index-organized tables and materialized views that neither MySQL nor PostgreSQL have. So there is progress to be made; I just don't think it's relevant for many applications.

      • You can make the same compromise within PostgreSQL. Really, any speed comparison of the two should do so to be on the same ground. (Or better, test PostgreSQL both ways and note why most people consider losing the speed to be worthwhile.) You just say "fsync = false" in postgresql.conf and it will no longer do the D of ACID for the benefit of faster commits.
      • The performance comparisons I've seen that showed MySQL in the lead used very simplistic queries. PostgreSQL has a query planner that I think would cause things to be quite different with more realistic ones.
    2. Re:Speed by Andy+Dodd · · Score: 2

      As I mentioned in my post, things may have changed.

      At one time, MySQL was the speed king, hands-down.

      From various things I've heard, Postgres may have caught up in the speed arena by now. But at this point, people are most familiar with MySQL and will continue using it unless they need more because that's what they're comfortable with.

      --
      retrorocket.o not found, launch anyway?
  151. Re:Dangers of PHP? I think not! by kputnam · · Score: 1
    When global variables are enabled, PHP will take variables from cookies, get query strings, post variables, and session data and according to the order you specify put them in global context. For instance, index.php?var=foo would set $var to "foo" in a PHP script with global variables enabled. The problem with this is that you don't really know where a variable came from and users can set any variables they want.

    Lets say you set a cookie called "admin" and you only set it if the user on your site has admin privileges. If you check for admin by assuming PHP will put it in global context and do something like if (isset($admin)) { ... }, users might request the page like this: index.php?admin=1 and because PHP will bring the variable from the GET string into global context, and you don't know where it came from... the user gets admin privileges and can abuse your code.

    The proper way to code in PHP is to check like this: if (admin($_COOKIE["admin"])) that way you know for sure where the variable came from.

  152. PHP is nice and easy but... by Priyadi · · Score: 1

    ... there are several shortcomings:

    1. Namespace pollution, and they are growing on each new version of PHP, fast. Example: the function str_repeat didn't exist under PHP 3, now suppose somebody created a function using that name, now when upgrading to PHP 4 his scripts no longer works, he needs to do some searching and replacing to rename his function.

    2. Config file (php.ini), so that one installation of PHP could be different than another, leading to case that a PHP script works on one PHP installation but don't work on another. This is really a debugging nightmare, especially if you need to debug somebody else's scripts :)

    3. Bloated. There are too many built in functions that shouldn't have been put in the core, for example functions like str_rot13 and md5_file are not useful in almost all application, yet they still consume resources. They should have been relegated to a part of PEAR or something.

    4. Adding an extension to PHP is a mess. You need to recompile the whole thing if you want to add a module to PHP. You can only use either compiled C language (PHP API) or PHP language (PEAR), but not both. And of course PHP need something like perl -MCPAN -e 'install Foo' :). Yes, I know about phpize and php.ini, but some module can only be installed staticly without some heavy patching.

    5. PHP is not secure by default under shared hosting environment where a user doesn't trust another. Yes, I know about safe_mode, but that will get you some security at the expense of flexibility. A better approach is to use CGI mode, but this requires different treatment to PHP scripts than when using regular Apache module installation.

    OK, that's what I can think right now.

  153. Re:Dangers of PHP? I think not! by Isofarro · · Score: 2

    So just whack

    $auth=false;

    before

    if ($pw='secret') { $auth=true; } ...
    if ($auth) { do_advanced_stuff() }

  154. .net advert by Anonymous Coward · · Score: 0

    When I opened this story, it had a M$oft .net advert at the top. Is it only me that finds this funny?

    poot

  155. Why perl "more secure". by TheLink · · Score: 2

    Because when you use PHP the way PHP was originally intended to be used, it's unsafe.

    If you use PHP in a safe way, you lose all the fun "features" that make PHP what it is. In fact it starts to look like Perl being used in a safe way. So they might as well use Perl given that their slides show it performs better in most cases, and they already have lots of perl code.

    PHP ala PHP:
    register_globals- cgi parameters automagically entering your program's name space.

    magic quotes/addslashes etc: Very shortsighted features. Better to always keep your filters for different programs separate and distinct. Otherwise you lose information integrity and end up with annoying backslashes everywhere (especially whenever data is redisplayed and resubmitted).

    PHP is gradually getting more secure, however the problem is most PHP programmers out there program in the old dangerous PHP style. Look at PHPNuke or any of its derivatives - they are a mess, full of security problems. Better to rewrite. Same goes for many other PHP programs I took a look at.

    In fact the slides seem to give a better argument for Perl than PHP. Perl had better performance than PHP as shown in the Yahoo slides (seems YSP = mod_perl). YSP just uses a bit more memory.

    As for maintainability - I don't see why PHP should be easier to maintain than Perl. They're in the same class of maintainability. If you're talking about Python vs Perl maybe, but PHP? Doh.

    From the slides I still don't see why they are picking PHP over Perl.

    Unless maybe they have lost/got rid of their Perl coders?

    --
  156. Yahoo! to change focus.. by Molt · · Score: 1

    Due to Yahoo! choosing against Perl based on the fact it wasn't originally intended for the web I fully expect them to get all of their electronic computers back breaking WW2 encryption.

    --
    404 Not Found: No such file or resource as '.sig'
  157. Delete space from URL by bartash · · Score: 2

    http://public.yahoo.com/~radwin/talks/yahoo-phpcon 2002.pdf

    sorry about that, its never happened to me before

    --
    Read Epic the first RPG novel.
  158. Nope by Betcour · · Score: 2

    They run PHP Accelerator, which is as fast but free :)

  159. Strange thing is... by TheLink · · Score: 2

    From the Yahoo slides, YSP is faster than PHP. Just uses a bit more memory.

    And from their slides YSP seems to be mod_perl or mod_perl based. See slide0041.htm.

    PHP maintainability is about the same as Perl. No language enforced discipline, need programmer discipline.

    So why are they picking PHP over Perl? They ran out of Perl programmers?

    Java requires just too much unnecessary work. For example it was easy to find out how many columns you just selected from a DB, but hard to find out how many rows. I went like "WHAT!?". This and many other annoyances discouraged me from using Java.

    I want to solve the problem not the language.

    --
  160. Re:Dangers of PHP? I think not! by Anonymous Coward · · Score: 0


    way to take that post seriously. 2 points for you.

    Read the link.

    Furthermore, if you don't completely read the comment and links don't comment on it, you don't know what you are talking about.

  161. Re:Dangers of PHP? I think not! by thomas.galvin · · Score: 2

    Actually, the big problem comes when a string function returns '0' if it finds a regex at the first character, or '0' if it doesn't find it at all. If a failed find returned '-1', like just about every language I've ever used, this would be unnecessary. That is my only real grip with PHP.

  162. The numbers do not support your statement. by HopeOS · · Score: 2
    jonbrewer asserted:
    There's no way you can back that statement up. Corporations generally have a few outward-facing web servers, and yes, these are most likely running apache, but the vast majority of Intranet web servers are still IIS. After that you'll see Lotus Domino and iPlanet, and then Apache.
    Emphasis mine. I think it is very clear from these figures, that Apache surpass IIS in deployment. In active servers alone, Apache has 66% to IIS' 24%.

    This does not lend much credibility to the rest of your argument.

    -Hope
  163. Press Release? by crisco · · Score: 2

    Has Yahoo or PHP (or Zend) done any kind of press release on this? It would be nice to have something that we could send PHB types to have a look at when proposing various solutions, something better than a frameset of a technical conference presentation. I took a quick look around and couldn't come up with anything.

    --

    Bleh!

  164. Incorrect logic by SilentStrike · · Score: 1

    "You say any clown can setup IIS. So, you must be a clown."

    We assume that he can set up IIS, but it does not logically follow that he is a clown. Being a clown implies being able to set up IIS. However, being able to set up IIS does NOT imply being a clown. In other words, there are non-clowns who can set up IIS. He might be in the population of non-clowns who can set up IIS, thus we cannot conclude that he is a clown.

    That said, the original poster is either a troll (a nicely veiled one at that) or a shill :).

  165. Curl dogfood by crisco · · Score: 2

    I find it interesting that the Curl website is served up by Java Server Pages. I'd have a little more faith in their tech if they were using it themselves.

    --

    Bleh!

  166. Le sigh. by Inoshiro · · Score: 2

    "Tables are deprecated" said by me implies that I think that tables are deprecated.

    You're quite welcome to not agree with what I say, but don't try and change how I said things.

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
    1. Re:Le sigh. by Dirtside · · Score: 2
      So you think that the W3C has deprecated tables in the HTML spec? Because that's what "deprecated" means -- a tag in HTML can only reasonably be called "deprecated" if it's been defined that way by the W3C. If you use the word "deprecated," that tells readers that the W3C has defined tables as deprecated.

      If you think that tables SHOULD be deprecated, that is an entirely different statement, with different meanings, than "Tables are deprecated." The funny part is, you had already said what you were trying to say when you said:

      You should also be using divs and spans over tables.
      Adding "Tables are deprecated" tells readers what I said above -- that the W3C has deprecated tables (which they have not).
      --
      "Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
  167. Yahoo corporate email by Anonymous Coward · · Score: 0

    actually Yahoo employees have yahoo-inc.com addresses

  168. hehehe, NI by Anonymous Coward · · Score: 0
    well besides the ever brewing flamefest that is so predictable here... when thinking of Perl and PHP code I am reminded of the anecdotal movies and tv show situations where someone would say "Hello" in English and it would be translated into a thesis length greeting in some other language. Dang that has to get old :)

    I think Perl is great for many many many things (did I mention 'many'?) but it seems you have to write an encyclopedia just to do the simplest tasks for integrated web apps.

  169. Wrong, nope, wrong again. by Anonymous Coward · · Score: 0

    Like all the Java naysayers I've talked to, I know it well enough to use it, and I'm an experienced programmer.

    Like all the Java fans I've talked to, you're a college kid who only knows one language: Java. And you like it pretty well, because when you took a semester of C you had a hard time with pointers.

    Java's an overengineered mess. Yes, it is much slower than Perl or PHP, because Perl and PHP have an absolute minimum of interpreted code. A whole boatload of stuff is pushed back into native code. Java, on the other hand, has the bizarre approach of maximizing the amount of interpreted code. This is best characterized as Anti-Optimization: Concentrate your inefficiencies and sluggishness in library routines that get called everywhere, including tight loops. No wonder the language is a dog. But don't take my word for it: Code the same stuff in Java, Perl, and PHP and watch the Java finish dead last by a wide margin. I'm not talking about GUIs, either; even the Java partisans are finally admitting what a disaster it was for those. I recall they tried to brazen it out for a couple of years, though, just as you "server" guys are trying to kid yourselves now.

    Java does not, of course, offer anything resembling "rapid development". It's far too constricting and "rulesy" for that, and far too low level in spirit (higher level than C++, but not by much, and if you knew C++ you'd grasp that fact (no, grossly inflating execution times with a JVM doesn't make it "high level"; that just makes it the worst of both worlds)). I've called it the Pascal of the nineties, and it is: They're both Church Lady Languages.

    What Java also is, is the Cobol of the twenty-first century. It's used almost exclusively for in-house development at banks, the most degrading and shameful of all programming jobs. You're a Cobol programmer by another name. You're probably not even ashamed of it, but if you ever try to get a real job, you'll find you won't get a lot of calls back with all that Cob^H^H^HJava on your resume (assuming you have a resume yet...)

  170. Re:Dangers of PHP? I think not! by fferreres · · Score: 2

    That's like saying Vans (or make your pick) are unsecure cars because women are atracted to them. Giving uses something as simple as PHP is indeed a problem for them. Even suposedly experienced programmers make a lot of mistakes.

    I've sen lots of codes where input was not being validated. And seen data that came through forms beign validated in intermediate steps and not the final one, or FORM info including what "table" to use (jikes).

    It's not PHP fault though...

    --
    unfinished: (adj.)
  171. Re:"hard to hire engineers who really understand i by Anonymous Coward · · Score: 0

    I think Yahoo should investigate and possibly bring Turing back from the grave.

    If I could make pong with Turing, there's no telling what Yahoo could do with it.

    Forget the useless PHP/HTML/ASP/PERL/CFM

    TURING!!

  172. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion