Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
PHP Programming

A Decade of PHP 452

digidave writes "It was slow to catch and a lot of people didn't get it. A lot of people still don't get it, but you can't argue with its success. June 8th, 2005 marks the tenth anniversary of PHP. Here's to ten more wonderful and exciting years."
This discussion has been archived. No new comments can be posted.

A Decade of PHP

Comments Filter:
  • PHP vs JSP (Score:5, Interesting)

    by SamSeaborn ( 724276 ) on Thursday June 09, 2005 @10:23AM (#12768557)
    Congrats to PHP for its success, but I'm one of those who doesn't get it.

    I tried PHP, but I didn't feel it gave me the rigid OO structure and sophisticated APIs I get from Java, JSPs & Servlets.

    Not trolling, just saying I'm surprised that Java and Servlet hosting isn't as popular as PHP. I'm obviously missing some key point.

    Sam

  • by rho ( 6063 ) on Thursday June 09, 2005 @10:33AM (#12768678) Journal
    I've never understood the fanaticism of database abstraction. There's good reason to hardcode to a specific database, especially if you hardcode to a Free database like PostgreSQL.

    For example, if you use a database abstraction, you have to make a lot of performace- or feature-robbing choices. There are still hosting situations where MySQL is still on 3.23, so you can't use the better parts of the InnoDB storage engine. So no foreign key constraints, no stored procedures.

    On the other hand, if you do hardcode for PostgreSQL, you put a burden on the end user, sure--but in return, you're giving them a more robust, more featureful application that is easier to support and maintain. I personally like PostgreSQL because it seems less haphazard than MySQL, but you could very easily do this with MySQL, so long as you restrict yourself to the later, non-crippled versions.

    The Arsdigita folks did this with Oracle. Leaning on a $tens-of-thousands database application may put you out of the realm of everyday developers, but it's far from insane.

    This is "all the time I've spent dealing with other people's code that doesn't have a foreign key to be found and all integrity checking is done in the PHP code" talking. It's infuriating.

  • I completely agree. The primary reason why native code would be nice is that a bundled API would help put peer pressure on coders to use it. Which means that we'd see fewer "quick hacks/prototypes" (that always turn into production sites) using database specific code.
  • PHP for teaching (Score:2, Interesting)

    by lbya ( 880645 ) on Thursday June 09, 2005 @11:11AM (#12769181)

    So here it is 2005, and I need to teach the "interactive" part of the graphic design curriculum to college- and graduate-level art students. Is PHP appropriate for this today?

    In a semester, I'd like my students to learn some fundamentals of programming. Like, what a variable is.

    I find that when "interactive" classes are taught in environments like Flash or Director, design students wind up cobbling together bits and pieces of things without really knowing how the pieces work, and then they get frustrated when the whole thing doesn't work. Plus the environment itself becomes confusing (there is really no logic to Flash). Therefore I'm thinking I'd like to go "back to basics" for a semester. Just as design students know a lot about how printing works, they should know how code works.

    The Processing environment was designed for teaching-- a kind of simplified Java. But while its graphics support is sort of strong, it doesn't have great network connectivity, with the result that things you make in Processing tend to feel a bit self-contained, like science experiments.

    Going the opposite way, what do people think about PHP as a teaching language? It has syntactic similarity to C or Java, for learning "if then" and whatnot, in a way which could be applicable to other languages later on; has a lot of functionality in the core language; and maybe unparalleled online documentation. There is no development environment to learn other than a text editor and SFTP. And even though the idea of your code running exclusively on a server might be confusing, I think there could also be value for design students to learn the difference between server and client since it's a fundamental relationship in a lot of graphic design problems.

    Remember also that these are design students not comp sci students, which partially determines the kinds of programming issues these students need to be versed in.

    Thoughts from about PHP as a teaching language for non-programmers?
  • by joebp ( 528430 ) on Thursday June 09, 2005 @11:26AM (#12769343) Homepage
    mysql_escape_string is deprecated and should never be used in production code! The replacement is the hilariously named mysql_real_escape_string [php.net].

    Your "not that hard" comment is rather amusing with this in mind.
  • Still broken. (Score:3, Interesting)

    by Pingster ( 14864 ) on Thursday June 09, 2005 @01:10PM (#12770749) Homepage

    Ten years and the == operator is still completely broken. Any hope of fixing it in the next ten?
    % cat test.php
    <?php if ("spam" == 0) print "I am insane."; ?>

    % php test.php
    I am insane.

    %

    Suppose A equals B, and also B equals C. Any reasonable person would expect that A equals C, right? Oh yeah?

    % cat equality.php
    <?php

    $a = 0;
    $b = "eggs";
    $c = "spam";

    print ($a == $b) ? "a == b\n" : "a != b\n";
    print ($b == $c) ? "b == c\n" : "b != c\n";
    print ($a == $c) ? "a == c\n" : "a != c\n";
    print ($a == $d) ? "a == d\n" : "a != d\n";
    print ($b == $d) ? "b == d\n" : "b != d\n";
    print ($c == $d) ? "c == d\n" : "c != d\n";

    ?>

    % php equality.php
    a == b
    b != c
    a == c
    a == d
    b != d
    c != d

    %
    Try explaining that to a first-time programmer.

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

Working...