Slashdot Mirror


PHP Succeeding Where Java Has Failed

ficken writes "Web browser pioneer Marc Andreessen recently announced his prediction that PHP will be more popular than Java for building web-based applications." From the article: "Wooing programmers is nothing new in the computing industry, where players constantly jockey to establish their products as an essential foundation. Indeed, many credit Microsoft's success to its highly regarded programming tools, which make it easier for developers to write software that run on Windows. PHP has caught on widely. About 22 million Web sites employ it, and useage is steadily increasing. About 450 programmers have privileges to approve changes to the software. Major companies that employ PHP include Yahoo, Lufthansa and Deutsche Telekom's T-Online." Meanwhilie, Piersky writes "Zend has announced its rival to .NET and J2EE, with the Zend PHP Framework. In a press release, they stated that it will be 'A Web application framework which will standardize the way PHP applications are built. The Zend PHP Framework will accelerate and improve the development and deployment of mission-critical PHP Web applications'. This will for part of Zend's PHP Collaboration Project"

10 of 610 comments (clear)

  1. The Success of PHP by kihjin · · Score: 3, Informative

    About 22 million Web sites employ it

    Well, of course. PHP works for free.

    Wondering where the '22 million web sites' comes from? http://www.php.net/usage.php.

    --
    This slashdot-related signature is a stub. You can help kihjin by expanding it.
  2. Re:Help me out here by TheSpoom · · Score: 5, Informative

    You're pretty much correct. PHP is a lot closer to JSP or ASP than Java, and yes, it can violate separation of logic and presentation. However, you can use the Smarty templating library to separate code and presentation (and I recommend this to anyone learning PHP, because embedding PHP in HTML makes for very sloppy and nigh unreadable code).

    --
    It's better to vote for what you want and not get it than to vote for what you don't want and get it.
    - E. Debs
  3. Re:PHP can do allot by christopherfinke · · Score: 5, Informative
    I'm very impressed with how far PHP (Personal Home Page) has gone.
    PHP hasn't stood for Personal Home Page for a long time. It stands for "PHP: Hypertext Preprocessor."
  4. Marc Andreessen is on Zend's Board of Directors by ChrisRijk · · Score: 5, Informative
    http://www.zend.com/news/zendpr.php?id=107
    Zend Technologies, Inc., the PHP company and creator of products and services supporting the development, deployment and management of PHP-based applications, today announced Marc Andreessen and Gaurav Dhillon as the newest members of the Zend board of directors.


    Little "full disclosure" for everyone.

    PS There's more to Java on webservers than J2EE. There's also multiple Open Source versions of J2EE.
  5. Java vs PHP development by totallygeek · · Score: 5, Informative
    I am an owner of a software development company, and I can tell you that both have their place. All languages (and sadly, operating systems) are tools and it makes sense to use the right tool for the job. Languages we may be using depending on the task include C, Pascal, DataFlex, Java, PHP, Perl, Python, and even bash. Someone might ask why Pascal; which is because we have a well-defined set of libraries for that language which allow us to access many other applications, which in another language would be difficult or expensive to recode.


    All that aside, we typically use PHP for all web-based applications. The ease of coding, and the ability to affect change with zero downtime is a big plus. We can have several programmers affecting changes in one codebase in real time. And, for a program which took us six months to develop in PHP, it would have taken at least fifty percent longer with Java.

  6. this is sad by namekuseijin · · Score: 3, Informative

    The alternative to extremely bloated and redundant java and .net web technologies is an extremely basic (old)ASP-alike with all functions and variables sharing the same namespace and global variables running wild. Granted, it's easy. Just as easy as notepad and just as featureless and error-prone...

    Hey, i'm just as annoyed at java and .net as everybody else, but i'd point to Python, Ruby, Perl or Tcl technologies rather than this sub-Perl refugee...

    --
    I don't feel like it...
  7. Re:Pardon me while I roll my eyes by Crayon+Kid · · Score: 4, Informative

    However, the real strength of these systems is not in themselves; they are built on a superb platform base which provides Threading, IO, Networking, Graphics, Db access, i18n,and all the things a programmer might ever require. PHP doesnt have anything remotely similar, as far as i can see.

    OK, this is a troll if I ever saw one and may I be damned for feeding one but here it goes:

    Go look at PEAR and the PHP manual index and then tell people PHP doesn't have a platform offering all those.

    --
    i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
  8. Re:Pardon me while I roll my eyes by coder111 · · Score: 4, Informative

    There's usually no need to integrate PHP with Java and use PHP for page rendering, because there are tools in Java that do page rendering just as well as PHP, if not better. If you need integration anyway, you can integrate Tomcat with Apache- then all your static (images, CSS) and PHP stuff will run on apache, for java stuff tomcat will get called. This will both increase performance (as Apache is better suited for serving static stuff than Tomcat) and allow PHP to be used on same box, same port.

    Java is not slow in server-side, it is just slow on desktop with Swing. Get Tomcat and try benchmarking some JSPs if you don't believe me. Templates with java might be slower than JSP, but anyway, page rendering is something that impacts the performance of web application the least.

    With java you EXTREMELY RARELY need to write extensions, usually you can find java libraries (most of them open source) that do the stuff you need. Or you can just use standart java class libraries, that are enough for 95% of cases. This way you can get a platform-independent solution for no additional cost. While your DLLs (.so's?) will have to be compiled for each architecture, coded to be cross-platform, installed by system administrators, etc.

    If you need to interface with C++/C, there is JNI (Java native interface, It is hairy and unfriendly though). Of you can integrate via some kind of interprocess communication (pipes still work, as will TCP, with java you can write TCP client/server in 10-30 lines of code). This way you can have any language on the other side of IPC. You can use webservices/CORBA/XML RPC if you want to be fancy.

    --Coder

  9. Re:Help me out here by __aanonl8035 · · Score: 3, Informative

    I find it strange how people recommend Smarty for separation of code from content. Smarty implements its own while loops and if then statements. I have yet to come across a web application using Smarty that was easily readable. I would think if the goal was to separate code from content, one would use a templating engine more akin to QuickTemplates. It does not make you relearn a whole new programming language syntax for while loops and if then statements like Smarty does.

  10. It's getting there, but it has its problems by bigtrike · · Score: 3, Informative
    I've used PHP for years and by now I have a love/hate relationship with it. Some of my biggest issues with php are:
    • Lack of binary compatibility even on debug fix releases. My code shouldn't stop working when I upgrade from 4.3.2 to 4.3.3 due to an undocumented addition of a run time warning
    • Error reporting must be turned down well below useful levels in order to use PEAR in PHP 5. Ignoring E_NOTICE level warnings is usually a very bad idea, but necessary until PEAR works in PHP 5
    • Code can't be entirely compatible with PHP 4 and 5 standards (var produces warnings in PHP5, public/private does not work in any PHP 4)
    • Lack of standardization of function naming and argument order. I always have to check whether the function I'm using has an underscore between the words and whether it's needle, haystack or haystack, needle
    • Kitchen sink approach. Again, all functions are in the same namespace. This results in some pretty weird function naming
    • Lack of great debug support. xdebug sort of works, but is still very immature
    • Loose typing. You have to study the documentation very carefully in order to understand how to compare variables and get the expected result. In addition, since type conversion is automatic and performed on numbers when they exceed certain ranges, precision may be lost unless you have a very detailed understanding of how and when type conversions happen and plan out the numerical ranges of your variables accordingly
    • Caveats with unset()/isset/null/arrays


    PHP may have a bunch of issues, but it's still the best tool for my job.