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."

339 of 733 comments (clear)

  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 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 :-)

    2. 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)

    3. 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
    4. 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.

    5. 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.

    6. 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.
    7. 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.

    8. 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.

    9. 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.

    10. 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?
  2. 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. ;)
  3. Dangers by briggsb · · Score: 5, Funny

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

  4. 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 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)

    2. Re:It makes sense ... by T3kno · · Score: 2

      Sorry try again!!

      The correct answer is mod_perl.

      --
      (B) + (D) + (B) + (D) = (K) + (&)
    3. 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!
    4. 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.

    5. 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?

    6. 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
    7. 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
    8. 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
  5. 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 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
    6. 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.

    7. 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).

    8. 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.

    9. 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
    10. 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
    11. 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?"

    12. 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.

    13. 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.

    14. 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

    15. 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.

    16. 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!!!
    17. 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.

    18. 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.

    19. 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.
    20. 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.

    21. 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
    22. Re:Maintence must be easier by MattRog · · Score: 2

      Nothing beats MySQL in that environment

      Well, besides flat-files you mean?

      --

      Thanks,
      --
      Matt
    23. 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
    24. 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.
    25. 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
    26. 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?
    27. 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?
    28. 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?
    29. 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
    30. Re:Maintence must be easier by King+of+the+World · · Score: 2

      Where's the download?

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

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

      --
      unfinished: (adj.)
    32. 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.

  6. 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 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!
    3. 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
    4. 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

    5. 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??
    6. 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
    7. 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.

    8. 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

    9. 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).

    10. 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?

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

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

    12. 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.

    13. 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!
    14. 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

    15. 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...

    16. 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!
    17. 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
    18. 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
    19. 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

    20. 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.

    21. Re:Seems like a silly move... by pivo · · Score: 2
    22. 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
    23. 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.

    24. 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.

    25. 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!
    26. 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)

    27. 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. :)

    28. 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.
    29. 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.
    30. 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

    31. 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.

    32. 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.

    33. 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.

    34. 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.

    35. 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.

    36. 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??

    37. 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
    38. 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
    39. 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.

    40. 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
    41. 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.

    42. 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?

    43. 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.

    44. 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.

    45. 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.

    46. 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
    47. 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
    48. 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
    49. 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
    50. 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
    51. 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
    52. 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.
    53. 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!!!!

    54. 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.

    55. 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.

  7. 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?"

  8. 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
  9. 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.

  10. 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.

  11. 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 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.

    5. 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.

  12. 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.

  13. makes sense... by Anonymous Coward · · Score: 5, Informative

    ...considering it's initial creator is now a Yahoo! employee

  14. 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 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.
  15. 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.

  16. 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

  17. 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

  18. 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.

  19. 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 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!
    3. 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
    4. 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.
    5. 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.
  20. Re:Perl was ruled out WHY??? by rseuhs · · Score: 3, Insightful

    Why should Perl be "more secure"?

  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. 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 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.
    4. Re:fascinating by ceejayoz · · Score: 2

      There's More Than One Way to Do It

    5. 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.

    6. 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?

  23. 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 puppetman · · Score: 2

      See my comment here

    3. 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.

    4. 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...

    5. 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.

    6. 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.

    7. 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
    8. 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.

    9. 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
    10. 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.

    11. 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.

    12. 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?
    13. 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.
    14. 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.
    15. 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.

    16. 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.

    17. 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.

    18. 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.

    19. 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.

    20. 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.
    21. 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. :-)~

    22. 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.
    23. 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.

    24. 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.
    25. 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.

    26. 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?

    27. 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)

    28. 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.

    29. Re:Why is PHP so bad? by ainsoph · · Score: 2

      how bout this?

      blah blah blah blah blah... yer an idiot..

      thanks for playing..

  24. 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
  25. 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.

  26. 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. :)

  27. 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.

  28. 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.

  29. 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)

  30. 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
  31. 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 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.

    2. 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.
    3. 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.

    4. 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
    5. 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 ?>

  32. 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?

  33. 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.

  34. 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)

  35. 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.


  36. 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.

  37. 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.

  38. 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 selectspec · · Score: 3, Funny

      Your fired.

      -your boss-

      --

      Someone you trust is one of us.

    2. 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) + (&)
    3. 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
    4. 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.
    5. 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?
  39. 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
  40. Re:Perl was ruled out WHY??? by russellh · · Score: 2, Funny

    Perl || die

    --
    must... stay... awake...
  41. 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.

  42. 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 :)

  43. 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.

  44. ... 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
  45. 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
  46. 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 ceejayoz · · Score: 2

      According to HarrisDirect, they've had positive cash flow since 1998 and have $926 million cash on hand.

  47. 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.

  48. 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 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!
    3. 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.
    4. 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.
    5. 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.

    6. 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.

    7. 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!
    8. 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!
    9. 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.

    10. 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!
    11. 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.

    12. 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!
    13. 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.

    14. 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.

    15. 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.

    16. 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.
    17. 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

  49. 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.

  50. Re:Just dont use the pow() function by Wonko42 · · Score: 2

    pow() sure seems to work just fine to me...

  51. 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.


  52. 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. 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 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.

    2. 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.

  54. 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)
  55. 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.
  56. 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 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.

  57. 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.
  58. 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.

  59. 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.

  60. 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"
  61. 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.

  62. 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

  63. 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.

  64. 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?

  65. 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.
  66. 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.
  67. 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.

  68. 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!

  69. 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.

  70. 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 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!

  71. 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.
  72. 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.
  73. 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.

  74. Maybe so by madenosine · · Score: 3, Informative

    but does it change the fact that they read my e-mail and log my every move?

  75. 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)

  76. 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)

  77. 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?

  78. 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.

  79. 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.
  80. 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
  81. 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.

  82. 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.

  83. 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.

  84. 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.

  85. 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 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

    2. 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?
  86. 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.

  87. 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.
  88. 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
  89. 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
  90. 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.
  91. 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)
  92. 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.

  93. Comment removed by account_deleted · · Score: 2

    Comment removed based on user account deletion

  94. 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

  95. 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.

  96. 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.
  97. 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.
  98. 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.

  99. 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
  100. 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
  101. 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.

  102. 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.

  103. 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.

  104. ' register_globals ' by Martin+S. · · Score: 2

    register_globals allows URL access to system (OS/Server) environment variables.

  105. 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
  106. 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).

  107. 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
  108. 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?
  109. 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 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?
  110. 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).

  111. 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?
  112. 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?
  113. 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)

  114. 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() }

  115. 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.

  116. 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)

  117. 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.

  118. 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?

    --
  119. 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?
  120. 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.
  121. Nope by Betcour · · Score: 2

    They run PHP Accelerator, which is as fast but free :)

  122. 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.

    --
  123. 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.

  124. 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
  125. 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!

  126. 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!

  127. 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?
  128. 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.

  129. 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
  130. 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
  131. 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?
  132. 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?
  133. 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?
  134. 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.)
  135. 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?
  136. 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.

  137. 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.