Interesting for someone who has some knowledge but no experience of Java 
and no knowledge of PHP.
>From what I see, one is a language and one (php) is a tool.`
__________________________________________
Ranga Nathan / CSG
Systems Programmer - Specialist; Technical Services; 
BAX Global Inc. Irvine-California
Tel: 714-442-7591   Fax: 714-442-2840




Tom Metro <[EMAIL PROTECTED]> 

Sent by: [EMAIL PROTECTED]
11/01/2005 10:02 AM

To
L-boston-pm <[email protected]>
cc

Subject
[Boston.pm] PHP Succeeding Where Java Has Failed






Slashdot quoting a zdnet[1] article:

http://rss.slashdot.org/Slashdot/slashdot?m=1333

   "Web browser pioneer Marc Andreessen recently announced his
   prediction that PHP will be more popular than Java for building
   web-based applications. ... PHP has caught on widely. About 22
   million Web sites employ it, and useage is steadily increasing. ...
   Major companies that employ PHP include Yahoo, Lufthansa and
   Deutsche Telekom's T-Online."

It also mentions Zend's press release[2] on the Zend PHP Framework, 
"which will standardize the way PHP applications are built...accelerate 
and improve the development and deployment of mission-critical PHP Web 
applications."

[1] 
http://zdnet.com.au/news/software/soa/Andreessen_PHP_succeeding_where_Java_isn_t/0,2000061733,39218171,00.htm

[2] http://www.zend.com/news/zendpr.php?id=109



One of the comments on this made the point that PHP performed better 
than Perl in this benchmark:

http://www.dmst.aueb.gr/dds/pubs/conf/2002-SANE-DynCont/html/dyncont.html#tth_sEc4.1


which actually shows the opposite:

    Table 1: Average generated traffic in kb/s
   Protocol              Traffic
   FastCGI               2250
   mod_perl              1631
   PHP                           1248
   Servlets              801

   ...FastCGI is the fastest protocol we tested. It managed to handle
   more concurrent clients than every other protocol...It also managed
   to produce more traffic than every other protocol. Mod_perl also
   provided satisfactory performance and in fact managed to scale very
   well when the think time raised, doubling the served clients for a 3
   second increase. PHP's performance was characterized by non-linear
   increase of the served clients as think time increased, but the
   results are satisfactory if we consider the wealth of features it
   incorporates. Servlets on the other hand performed rather poorly,
   managing to serve 75% less clients that FastCGI did. [They pointed
   out elsewhere that the Servlet engine they used, Tomcat, is not
   among the fastest engines.]
[...]
   Lessons Learned

   The results of PHP were not what we expected. Being exposed to the
   hype that rules on the Internet about PHP, we expected it to be at
   least at the second place. It did not scale well (see BENCH4) and
   exhausted system processing power when it run, leaving it unusable.


Other chatter of interest:

http://developers.slashdot.org/comments.pl?sid=165966&cid=13844154
   Pardon me while I roll my eyes
   by Anonymous Coward on Friday October 21, @10:18AM (#13844154)

   "Java is much more programmer-friendly than C or C++, or was for a
   few years there until they made just as complicated. It's become
   arguably even harder to learn than C++," Andreessen said. And the
   mantle of simplicity is being passed on: "PHP is such is an easier
   environment to develop in than Java."

   This is just silly. PHP is far from "simpler" than Java. PHP *is*
   better suited to basic page generation tasks. Its syntax is easy to
   learn, and it's quick to get a page running. However, any sort of
   complexity thrown at the system starts making PHP look difficult and
   Java look easy. For example, I often write web applications that
   require that user sessions communicate with each other. Now this is
   stupidly simple in Java thanks to the use of Singletons or named
   derivitives. One can easily build a chat room, for example, whereas
   PHP begins to get a bit more tricky. Now throw really complex needs
   like PDF generation, Dynamic Excel Spreadsheets,
   XML/SOAP/XML-RPC/EDI communication, mainframe interfaces, off-brand
   databases, performance caches, and other large scale features, and
   suddenly Java doesn't look so hard anymore. PHP, OTOH, begins
   screaming for mercy.

   One would think that Andreessen would understand how to use the
   right tool for the right job, but apparently not. He should be kept
   away from the press. He always manages to sound 50 IQ points dumber
   than he actually is. (A common problem when dealing with the press.)


http://developers.slashdot.org/comments.pl?sid=165966&cid=13845369
   Re:Pardon me while I roll my eyes
   by hoggoth (414195) on Friday October 21, @12:35PM (#13845369)

   > One would think that Andreessen would understand how to use the
   > right tool for the right job, but apparently not

   Andreessen knows exactly how to use the right tool for the job, like
   a surgeon. His tool is the media, and his job, as a new member of
   the board at Zend, is to promote PHP.


http://developers.slashdot.org/comments.pl?sid=165966&cid=13844138
   Help me out here
   by wren337 (182018) on Friday October 21, @10:15AM (#13844138)

   Doesn't PHP tend to be embedded in the page? I thought it was a more
   direct comparison to JSP than to Java. And like JSP I expected it
   violated the seperation of logic and presentation that I love so
   dearly. I've been avoiding PHP for the same reason I don't do JSP
   pages, I don't like code in the presentation layer.

   I am prepared to have my mind blown here, can someone enlighten me?


http://developers.slashdot.org/comments.pl?sid=165966&cid=13844179
   Re:Help me out here
   by TheSpoom (715771) * on Friday October 21, @10:20AM (#13844179)

   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 [php.net] 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).


   Re:Help me out here
   by kingmundi (54911) on Friday October 21, @11:08AM (#13844571)

   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 [sourceforge.net]. It does not make you relearn a
   whole new programming language syntax for while loops and if then
   statements like Smarty does.


   Re:Help me out here
   by bobdinkel (530885) on Friday October 21, @11:22AM (#13844680)

   People recommend Smarty because PHP feels pretty incomplete without
   it. And it's not about separating code from contentit's about
   separating business logic from display logic. And the syntax is
   really easy.


http://developers.slashdot.org/comments.pl?sid=165966&cid=13844151
   Guessed wrong again!
   by MojoSF (658720) * on Friday October 21, @10:17AM (#13844151)

   I've resisted specialization for most of my career, giving me
   breadth but not depth. It's hurt me in job interviews where the
   hiring managers want specialized expertise instead of intelligence
   and problem solving skills.

   So I decided that I'd focus on Java for my depth. Now I read that I
   guessed wrong again!

   Maybe I should have gone C#/.ASP.

   No, Python and Zope are where it's at!

   No way, Ruby is the way to go. Arrrgh!


http://developers.slashdot.org/comments.pl?sid=165966&cid=13844260
   Java vs PHP development
   by totallygeek (263191) on Friday October 21, @10:30AM (#13844260)

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


http://developers.slashdot.org/comments.pl?sid=165966&cid=13844499
   As a Java developer with PHP experience...
   by pico303 (187769) on Friday October 21, @10:58AM (#13844499)

   ...I can honestly say I avoid PHP at all costs. PHP feels like it
   was built by committee: there's no consistency in the language. Even
   with 5 I still feel like I'm hacking together web pages.

   I feel like there's a lack of standardized libraries for PHP. I've
   used PearDB, but it's sure not ActiveRecord or Hibernate. Smarty's
   o.k., but I'm already developing in a template language for HTML
   pages, why do I need another one? It's like working with JSP tag
   libraries (which I find equally wasteful).

   Fundamentally, I think the tight coupling between view, controller,
   and model that PHP naturally engenders is bad. Practically, I've
   seen where Ruby on Rails has gone in just a single year, and it's
   further than PHP's gone in the last 5. Things you can do in Rails in
   a few days take weeks of coding in PHP, even with the help of
   third-party libraries.

   PHP has a strong foothold with small, inexpensive ISPs, which is the
   only reason I think that people still use it. Unfortunately, the
   "war" between 4 and 5 has really hurt the credibility of PHP moving
   forward. Does any ISP support PHP 5?

   If PHP wants to compete against Ruby on the low end and J2EE and
   .NET on the high end, it's going to need new development tools--both
   for writing the code and useful libraries, stronger leadership, and
   a clear plan for the future. I don't see any of this happening in
   its current state. I consider myself to be a PHP outsider these
   days, and looking in it doesn't look so fun in the pool.


http://developers.slashdot.org/comments.pl?sid=165966&cid=13845152
   What about the long run?
   by RAMMS+EIN (578166) on Friday October 21, @12:11PM (#13845152)

   I have to wonder about the long run here. When I work with Java, I
   find it a pain to work with, because of all the required boilerplate
   and the inflexibility. Things have probably gotten better with Java
   5, but Java has been a pain in all the years before it.

   When I work with PHP, I find it a pain to work with, because of its
   apparent lack of design. It feels like a cobbled-together heap of
   features and hacks, and so does the code written in it. I tend to
   write cleaner code than what I've seen from other people, but that
   doesn't make the final product any less messy when various people
   have worked on it.

   Neither language is absolutely horrible; comparing them to others,
   Java is a language with a relatively clean design, and PHP is a good
   choice in its niche of writing web applications. However, my pain in
   working with these languages is a direct result of these languages
   being poorly designed. I'm into programming languages, and I know
   many that have better designs than Java and PHP. I wonder if these
   languages won't take over in the future.

   Some changes are happening already. Various organizations are moving
   away from Java for web applications, and I know others that would do
   well to do so as well. Much of the work that went into PHP 5 comes
   from a realization that earlier versions were flawed (the same can
   be said of Perl 6). Ruby appears to be on the rise. Paul Graham and
   others have had good results employing Common Lisp for web
   applications.

   The only thing I can see standing in the way of better languages
   taking over the web application sphere is the fact that the decision
   making process is based more on fame than on qualities. I maintain
   that Java has become so successful largely because of the enormous
   hype surrounding it. PHP, Linux and MySQL have also risen largely
   due to hype. Of course, it's true that you won't overly disadvantage
   yourself if you use whatever most others use, but it would still be
   better if decisions were made based on sound knowledge of technical
   benefits.




  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to