Beta

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

PHP Succeeding Where Java Has Failed

Zonk posted more than 8 years ago | from the andreessen's-got-a-posse dept.

Programming 610

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"

cancel ×

610 comments

Sorry! There are no comments related to the filter you selected.

I am completely unbiased... (5, Funny)

Fortyseven (240736) | more than 8 years ago | (#13844098)

As a PHP coder and Java hater, I am completely in agreement with whatever the hell this article says. :D

Re:I am completely unbiased... (5, Insightful)

SatanicPuppy (611928) | more than 8 years ago | (#13844171)

Well, as a Java coder who's been coding almost exclusively in php for a year or so, I have to say it makes me feel better about my time spent. Php is definitely easy to work with, though that creates the opportunity for some seriously scary code.

I have to say, just not working with Tomcat is a plus (though I give major Props to the Fedora team for the option to install Tomcat right off the install disks)...When gcj finally catches up, I'll be a happy puppy.

Re:I am completely unbiased... (1)

(A)*(B)!0_- (888552) | more than 8 years ago | (#13844304)

It makes you feel better that someone who stands to make money in relation to PHP's success says that PHP will be a success?

You're easy to please.

And just for fun: Java servlets > anything PHP produces

Re:I am completely unbiased... (1)

BlightShadow (678579) | more than 8 years ago | (#13844292)

Go PHP!!!

Re:I am completely unbiased... (0)

Anonymous Coward | more than 8 years ago | (#13844355)

woohoo brother! I am likewise a PHP lover and Java hater.

PHP is great stuff (2, Insightful)

ReformedExCon (897248) | more than 8 years ago | (#13844104)

If you are a web "programmer", it's definitely nice to have well-built tools that let you think even less about what you are doing and come up with something useful.

I suppose that's true in most jobs, though.

Re:PHP is great stuff (4, Interesting)

rovingeyes (575063) | more than 8 years ago | (#13844130)

"If you are a web "programmer", it's definitely nice to have well-built tools that let you think even less about what you are doing and come up with something useful."

Don't know about you, but it sounds dangerous to me.

Re:PHP is great stuff (0)

Anonymous Coward | more than 8 years ago | (#13844232)


Dangerous ? no surely not [securityfocus.com]

Re:PHP is great stuff (2, Interesting)

AVee (557523) | more than 8 years ago | (#13844331)

True, but it also explains why PHP will likely be more populair than Java for web apps. The resulting apps will also likely be of lower quality, but Windows is the most used OS as well...

Pardon me while I roll my eyes (5, Insightful)

Anonymous Coward | more than 8 years ago | (#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.)

Re:Pardon me while I roll my eyes (3, Interesting)

netkid91 (915818) | more than 8 years ago | (#13844267)

Not a big fan of Java, slow, bulky, not user friendly. Best part about PHP is extensions, just write some C++ code(or C#/VB.NET on windows *frowns*) and make it a DLL, set it up and use it, not easily available as Java yet because no as many people use it yet. Honestly both preform well compared to ASP.NET and we should stop bashing each other, get a way for JSP and PHP to work together is what we need, simple page rendering stuff goes to the PHP engine, backend proccessing to Java, really, it might work.

Re:Pardon me while I roll my eyes (1)

FortKnox (169099) | more than 8 years ago | (#13844276)

Fully agreed, here.
PHP is a great language for small web applications, but doing something complex like an insurance intranet site, and Java is clearly the better option.

Re:Pardon me while I roll my eyes (0, Troll)

popeyethesailor (325796) | more than 8 years ago | (#13844316)

This is the reason I think the whole comparison is unfair - PHP should've been compared to ASP.NET or any one of the bazillion Web UI frameworks of Java(Spring,Struts, Tapestry,JSF whatever).

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.

Re:Pardon me while I roll my eyes (1)

Zebra_X (13249) | more than 8 years ago | (#13844338)

This is just silly. PHP is far from "simpler" than Java.

He does not mean simple as in stupid, he means simple as in easy to use. The infrastructure, the language, the libraries are all more accessible in PHP than in Java. It is for these reasons programmers like PHP.

Your points Re: Tasks that are more sophisticated are right on though.

Re:PHP is great stuff (1)

netkid91 (915818) | more than 8 years ago | (#13844160)

What do you mean by 'tools' Visual Studio tools, or a good web-based script system. I'd rather have a good script system even if I have to type in code by hand vs. visually editing forms(Visual Studio 2005) and having a crappy language available for only one OS(ASP.NET)

J2EE won't fail... (5, Insightful)

_undan (804517) | more than 8 years ago | (#13844108)

... until companies who need mission critical systems have someone they can phone when something goes wrong, and some form of developer accreditation. Don't kid yourself. J2EE isn't picked because of the language, it's because it's got Sun and IBM (through Websphere) behind it.

Re:J2EE won't fail... (0)

Anonymous Coward | more than 8 years ago | (#13844204)

Besides support, J2EE is a totally different beast. Compare PHP applications with J2EE's n-tiered, distributable apps and you will see that it is like comparing apples with testicles. They are both round/used for web apps but that is just about it. Different tools for different problems.

Re:J2EE won't fail... (2)

digidave (259925) | more than 8 years ago | (#13844256)

Swap "J2EE" for "Windows" and you have the same argument as is used against Linux. PHP is supported by Zend and several other companies. As the article says, Oracle and IBM are both showing support for PHP.

And nobody said J2EE was going to die. It's just that more people are realizing it isn't always the best way to develop a web app. IMO (and some people say I'm wrong sometimes), Java excels where you need to interface with legacy and/or disparate systems. If you don't need to do that, Java and J2EE might not be for you. This is why it's so great for banks that need to interface their online banking web site with their banking and account data. It's also why it's overkill for 99% of web sites. It makes more sense on an intranet where you don't need to worry as much about security when linking many internal systems (not because Java is insecure, but because linking web apps to critical business systems in inherently dangerous, moreso when you're exposing the web app to the general public).

In other news (5, Funny)

Anonymous Coward | more than 8 years ago | (#13844113)

Coke succeeding where peanuts fail.

What? The two do different things.

Ajax? (-1, Offtopic)

PlatinumX (924555) | more than 8 years ago | (#13844115)

What about AJAX? or am I completely off here?

Re:Ajax? (1)

DigitumDei (578031) | more than 8 years ago | (#13844201)

AJAX is not a language, it is a collection of languages and technologies that allow for desktop application like qualities on your browser. PHP often is the back end of an AJAX application.

Re:Ajax? (1)

dashifen (829874) | more than 8 years ago | (#13844306)

And, with the class structure of PHP, I've had great success running AJAX with a PHP object receiving the data and manipulating it.

Re:Ajax? (1)

C0deJunkie (309293) | more than 8 years ago | (#13844234)

No, you are not so OT, since the use of AJAX on the client side, with a backend made of a bunch of robust J2EE web services is actually driving the new "web architecture" paradigm.
This, of course, applies since PHP (and also many other "scripting languages") is actually not "three" or "n-tier-oriented".

PHP can do allot (1, Insightful)

fak3r (917687) | more than 8 years ago | (#13844125)

I'm neither a java or php programmer, but I do work with both. While java is nice and portable, I'm very impressed with how far PHP (Personal Home Page) has gone. There are acclerator projects out there that cache php scripts, making them much more responsive. I use eAceelerator [eaccelerator.net] (formerly MmTURKE Cache or something like that) and it's obvious that php performance can be improved. For many a simple LAMP setup is very powerful, I've been using it for a website, as well as webmail, for over 4 years now.

Re:PHP can do allot (0)

Anonymous Coward | more than 8 years ago | (#13844166)

PHP stands for

PHP: Hypertext Preprocessor

It used to stand for personal home page, before they realized that a two bit name would get them nowhere.

Re:PHP can do allot (5, Informative)

christopherfinke (608750) | more than 8 years ago | (#13844182)

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

Re:PHP can do allot (0)

Anonymous Coward | more than 8 years ago | (#13844257)

Allot is like "assign" or "dole out". Alot is not a word. You seem to mean "a lot". Why is that so fucking hard for so many people?

-Peter

Re:PHP can do allot (1)

b1t r0t (216468) | more than 8 years ago | (#13844344)

Allot is like "assign" or "dole out". Alot is not a word. You seem to mean "a lot". Why is that so fucking hard for so many people?

Probably (not "prolly", people!) the same reason that lose vs loose is so fucking hard for so many people. Because they just don't fucking care.

Re:PHP can do allot (2, Informative)

totallygeek (263191) | more than 8 years ago | (#13844195)

I'm neither a java or php programmer, but I do work with both. While java is nice and portable, I'm very impressed with how far PHP (Personal Home Page) has gone. There are acclerator projects out there that cache php scripts, making them much more responsive. I use eAceelerator (formerly MmTURKE Cache or something like that) and it's obvious that php performance can be improved. For many a simple LAMP setup is very powerful, I've been using it for a website, as well as webmail, for over 4 years now.


Two things:

  • Java may be portable, but a fair percentage of applications written with Java, both corporate and Internet, work only for an intended audience of operating systems. Java has evolved out of its starting premise of platform-independence.
  • PHP no longer is referenced as Personal Home Page. It is the PHP Hypertext Processor. For some reason, corporate types won't let you use something with the word personal in it, but annoying recursive acronyms are acceptable.

Re:PHP can do allot (1)

netkid91 (915818) | more than 8 years ago | (#13844308)

Aggreed, Java was made for platform-indepence, code it once and it works on all, not so much anymore. With the need for web-services in the future and a diverse economy of OS'es, we need something that works for all and will stay that way, a big reason for a shift to PHP.

Will be? (2, Insightful)

bhirsch (785803) | more than 8 years ago | (#13844129)

I thought PHP was already more popular. Granted PHP-Nuke, etc aren't exactly banking apps.

Help me out here (5, Insightful)

wren337 (182018) | more than 8 years ago | (#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?

   

Re:Help me out here (5, Informative)

TheSpoom (715771) | more than 8 years ago | (#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 (1)

jiushao (898575) | more than 8 years ago | (#13844242)

Just want to point out that the template library approach is similar to the way JSP works. So even then the comparison PHP <=> JSP is quite apt.

Re:Help me out here (-1)

Anonymous Coward | more than 8 years ago | (#13844250)

That's stupid. PHP is a templating engine already. Why bother using smarty? Just use "include" to bring in your "presentation".

Templating: Re:Help me out here (1)

foolfodder (831891) | more than 8 years ago | (#13844299)

A good alternative to using smarty: http://phpsavant.com/ [phpsavant.com]

Re:Help me out here (1, Interesting)

Dukael_Mikakis (686324) | more than 8 years ago | (#13844187)

Yeah, the PHP files will have code mixed in with your html, which can only somewhat be mitigated by things like CSS and function imports and such, which is actually a big reason why I'm not completely sold on PHP. The php files end up looking somewhat ugly and sometimes the code is pretty convoluted.

On the flip side, I've been working with Ruby on Rails [rubyonrails.org] and it's beautiful. Scripts to generate the starting points for your web files, separation of design and implementation, a great framework. Only thing it lacks is a strong IDE (as far as I can tell) behind it and extensive documentation or resources on the web if you hit a wall (PHP sites are everywhere, for example).

Re:Help me out here (1)

potHead42 (188922) | more than 8 years ago | (#13844188)

Well, it certainly encourages you to just throw everything together in a single file, but it's a programming language like any other, so it's also possible to separate everything and build complete MVC-frameworks, for example there's Cake [cakephp.org] which looks like a clone of Ruby on Rails.

Re:Help me out here (2, Informative)

Anonymous Coward | more than 8 years ago | (#13844196)

You can separate presentation and logic in PHP just fine, and once you come to doing templates you can use a really powerful templating language - PHP.

Re:Help me out here (2, Insightful)

tertullian (669393) | more than 8 years ago | (#13844209)

Don't fool yourself, I've seen much Java code with "real Java" embedded into the pages. I've worked on projects that make use of BroadVision, Weblogic, etc... and there seems to always be a need to have logic on the presentation layer. With PHP, I've been using Smarty, and I've been able to accomplish everything I need to do without the having to put PHP logic on the page. This argument of presentation/logic separation is hypocritical when it comes from Java developers, because they don't practice what they preach.

Re:Help me out here (1)

wren337 (182018) | more than 8 years ago | (#13844252)


We use one servlet/many handlers to generate XML, and the presentation layer is XSL(T). So yes, you can do Java with no code in your presentation layer.

There's no reason to put logic into presentation (1)

coder111 (912060) | more than 8 years ago | (#13844347)

No, there is no reason to put logic into presentation layer, and i've been coding web apps with java for years. You can ALWAYS represent the data in some kind of data structure that just needs to be displayed.

Oh, and I use Apache Velocity (jakarta.apache.org), which is a templating engine, that more or less forbids putting logic into templates.

So not all of us java programmers are stupid or liars. Ancient frameworks and JSP and ancient applications made with them sometimes had logic in presentation layer, but most of the modern stuff doesn't. Check out MVC1 and compare it with MVC2 application design- you'll see the difference.

--Coder

Re:Help me out here (2, Interesting)

digidave (259925) | more than 8 years ago | (#13844333)

There is nothing in PHP that discourages you from mixing logic and presentation, but there is also nothing discouraging you from separating them either. This is exactly what makes PHP great for dirty hacks and large web apps alike.

Templating is part of the solution, but so is good app design. If you don't want to mix your logic, you simply need to code it that way. Zend PHP Framework will help enforce some of the same separation as Java does, but it's not strictly necessary. You can do MVC app design without much trouble. Take a look at Sitepoint's PHP Application Design forum (http://www.sitepoint.com/forums/forumdisplay.php? f=147 [sitepoint.com] ).

There are also Ruby on Rails-type frameworks such as CakePHP (http://www.cakephp.org./ [www.cakephp.org]

Java failed because it's a slow toy. (-1, Flamebait)

Anonymous Coward | more than 8 years ago | (#13844141)

Serious programs are written in C and C++

PHP is just a scripting language.

(Troll? sure. but also truth. deal with it.)

Re:Java failed because it's a slow toy. (2, Insightful)

Piersky (903281) | more than 8 years ago | (#13844165)

No, I agree. PHP is just a scripting language. Would you use C/C++ on a website? I wouldn't

Re:Java failed because it's a slow toy. (0)

Anonymous Coward | more than 8 years ago | (#13844348)

Why not? It's kept one guy from getting fired. No one wants to touch all those C CGI scripts, especially because they're mission critical...

PHP Desktop Apps?! (3, Insightful)

luiss (217284) | more than 8 years ago | (#13844145)

Java "failed" on the desktop. I didn't know PHP desktop apps were taking over.

Re:PHP Desktop Apps?! (2, Interesting)

digidave (259925) | more than 8 years ago | (#13844277)

Sure, that's what php-gtk (http://gtk.php.net/ [php.net] ) is all about :)

Actually, php-gtk is very useful when you have an existing PHP web app that you want to port into a desktop app. It's a great project, but is definitely not meant for large-scale apps.

Guessed wrong again! (5, Funny)

MojoSF (658720) | more than 8 years ago | (#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!

Re:Guessed wrong again! (1)

amightywind (691887) | more than 8 years ago | (#13844228)

You make a good point. Fortunately PHP, Python, and Ruby are simplistic enough where specialization require a huge investiment in time like Java or C++. I think the hacking world is pretty saturated with languages. It started with Java in 1995, Perl, ASP, PHP, Python, and really ended with Ruby a few years ago. None of these languages has really advanced the state of the art. I am still waiting for Lisp to become fashionable again. We'd all be better off.

Re:Guessed wrong again! (3, Insightful)

Anonymous Coward | more than 8 years ago | (#13844241)

If hiring managers were looking for specialization, you were hiring at the wrong kind of company.. i would kill for developers that could develop and not just plug crap into .net or java

The Success of PHP (3, Informative)

kihjin (866070) | more than 8 years ago | (#13844153)

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

Re:The Success of PHP (2, Informative)

Piersky (903281) | more than 8 years ago | (#13844183)

Actually it comes from Netcraft

Caching (2, Interesting)

Anonymous Coward | more than 8 years ago | (#13844155)

In asp and asp net there are extensive facilities to cache in to memory.

I don't know much Php but as far as I can tell there is no way to do this natively. This is one of the reasons I don't use php. You see site like groklaw get overloaded when Slashdot hits them because they pull the freaking article out of the database every time it's requested.

If somebody could show me some in process caching that'd take me a long way to ditching php. I don't mean caching to disk either. Caching to disk is much slower than memory.

Ideas?

AC.

Re:Caching (1)

I confirm I'm not a (720413) | more than 8 years ago | (#13844345)

In asp and asp net there are extensive facilities to cache in to memory.

I don't know much Php but as far as I can tell there is no way to do this natively.

(Long-time ASP/VBScript coder, recently started using PHP) Are you talking about ASP's session and application objects? If so, PHP has an equivalent to ASP's session object at least: $_SESSION. It looks to me like $GLOBALS may be an equivalent to ASP's application object, but I've not had an opportunity to try it yet.

Incidentally, my first impressions of PHP are that it offers a great deal more than ASP, though if I was using it for any length of time I'd want to check out templating: PHP mixed with HTML makes ASP mixed with HTML look beautiful!

Both have strengths and weaknesses (4, Insightful)

Anonymous Coward | more than 8 years ago | (#13844170)

I've done programming in PHP and in Java.

PHP is straightforward and easy, and most distributions have their own packages for it. Whereas with Java, the initial set up is overwhelming for beginners.

I learnt PHP years ago by myself, and it wasn't really that hard. Yet a few months ago when I was finally required to learn Java, the complexity of the Java frameworks (Hibernate, Spring, etc) tortured me for days before I actually knew what was going on. And it doesn't help when all the frameworks gives such a "bulky" feeling.

The learning curve of Java is definitely much higher than PHP.

Of course, I do agree that Java is much better suited for large scale web programming than PHP. It's much easier to do things cleanly in Java, and although PHP's loose typing is great for a simple 1 page script, I'd rather have the strict typing of Java when it comes to large scale projects.

Imposter Boy Speaks (0, Informative)

Anonymous Coward | more than 8 years ago | (#13844172)

Everything you need to know is in this article [64.233.167.104]

Netscape always controlled the media when it came to the story about how the browser was first built. This is the only article that I've ever seen that actually went back to the place where it was created to find out the real story.

History is written by the victors.... Even if that "history" isn't true.

Till next year (1)

spikexyz (403776) | more than 8 years ago | (#13844185)

then it'll be something else.

Cliche Elitist Reply (1, Funny)

sethadam1 (530629) | more than 8 years ago | (#13844203)

To save everyone the time and trouble, let's cover it here:

* PHP sucks.
* PHP is for n00bs.
* PHP is usually poorly written.
* PHP is a scripting language and you can't do anything but write web pages with it.
* PHP sucks because the function names are inconsistent.
* PHP is slow.
* PHP isn't capable of working in a real enterprise.
* Real coders use Perl.
* PHP doesn't scale.

Does that about cover it?

Re:Cliche Elitist Reply (1)

broggyr (924379) | more than 8 years ago | (#13844238)

Everyone is a n00b at one point... Look at me for example LOL

Re:Cliche Elitist Reply (0, Flamebait)

shodson (179450) | more than 8 years ago | (#13844246)

* Real coders use Perl.

Uh, I was listening until you dropped that unintelligable bomb on us all.

Re:Cliche Elitist Reply (0)

Anonymous Coward | more than 8 years ago | (#13844266)

You missed one: an inexcusably bad security track record.

Re:Cliche Elitist Reply (1)

Karaman (873136) | more than 8 years ago | (#13844310)

Why dont you learn PHP and get a job :)

PHP has frequent remote exploits (0)

Anonymous Coward | more than 8 years ago | (#13844357)

Don't forget that.

Marc Andreessen is on Zend's Board of Directors (5, Informative)

ChrisRijk (1818) | more than 8 years ago | (#13844207)

http://www.zend.com/news/zendpr.php?id=107 [zend.com]
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.

Re:Marc Andreessen is on Zend's Board of Directors (1)

jiushao (898575) | more than 8 years ago | (#13844317)

Haha, good stuff. So then the title should read "Zend executive announces Java dead and replaced with Zend PHP".

Good to hear though since this just seemed a bit too silly to be true. Sure PHP is a way easier way to get the typical website up and running, but the Java stack of libraries and tools is incredibly much more comprehensive. Sure this means that PHP is an excellent pick for 90% of all web applications in the world, whereas Java shoots for the full 100% but is more difficult to deal with. This is even just dealing with J2EE, as the parent states there is an incredible amount of very specialized functionality available for Java.

Summary: We are better off with both PHP and Java (I use both), but PHP replacing Java across the board is less likely than Java replacing PHP.

lingo... overload (2, Interesting)

jkind (922585) | more than 8 years ago | (#13844212)

Is it just me, or is anyone else having "framework" and "standards" overload?
Seems like every post mentions some form of standards or framework, and everyone wants to standardize everything within a framework. Or perhaps make a framework which will help standardize everything. I can't stop saying standards framework.......standards framework..... I miss the old days when "ware" was the hot term.. webware..awareware..opencourseware..cookware..
On topic.. Php is just so much more fun then Java... (except when you're first loading it into Apache for Win and Apache just tells you "failed").. And I visit phpclasses.org almost daily, just because there is lots of cool stuff there to try and play with. Kind of like javaboutique, but not as stale..

I do think it is an exaggeration to say Java is failing.. Although C#/.NET seems to peck away at the domination every quarter.. Way off topic: Does anyone have a website which lists the "top skills" as listed in job postings online? I used to visit such a site for jobs in the UK but can't find it anymore, and doing a search on google for "top skills job postings C# Java" is a fruitless endeavour.

How long until the obligatory... (0, Redundant)

Ron Harwood (136613) | more than 8 years ago | (#13844217)

...Ruby on Rails comments start coming out?

Happens during every PHP story...

Re:How long until the obligatory... (1)

Viper Daimao (911947) | more than 8 years ago | (#13844303)

not long! [slashdot.org]

Found one (1)

p3d0 (42270) | more than 8 years ago | (#13844335)

It has already started. [slashdot.org]

Here we go... (2, Insightful)

Naikrovek (667) | more than 8 years ago | (#13844223)

PHP just isn't on the same standard in my eyes as Java or C#. Doesn't PHP have something like 3,000 built-in functions? That is not a sign of a well designed language.

J2EE has a very well-respected place in larger organizations. The support is fantastic, the tools are fantastic, and the language is actually very nice, once you truly get to know it.

I used to think that Java was slow and useless, but when I actually started writing a lot of it, I found that its really not as bad as everyone told me it would be. Java is becoming the new COBOL as far as business acceptance goes, its everywhere that it needs to be, from what I've seen.

PHP is good for its own uses as well. I started programming in PHP, and I've written dozens of website backends in PHP, but the Java families (and other OO languages like C++ or C#) are just more elegant for the larger projects, web-based and otherwise.

I wish PHP and PHP programmers the best. Go, spread to anyone you can, but stay away from me. I've found a new girlfriend, and her name is Object Orientation.

Re:Here we go... (1)

LiquidCoooled (634315) | more than 8 years ago | (#13844307)

Java isn't available on most web servers is it?

PHP has built in functions just like java/c# has the built in libraries.

Having many functions shows its been used for a lot of things.

Re:Here we go... (1)

geoffspear (692508) | more than 8 years ago | (#13844323)

Yes, it's quite a shame that you can't do object oriented [php.net] programming in PHP.

Re:Here we go... (1)

Crayon Kid (700279) | more than 8 years ago | (#13844340)

[..]Java is becoming the new COBOL[..]

Oh you really made the case for Java here... "You don't like Java? How can you? It's the new COBOL! Everybody's loving it!"

I have to say it.... (1)

Capt James McCarthy (860294) | more than 8 years ago | (#13844224)

Call me OT if you want, but everytime PHP is discussed, I have to say that it a wonderful language. That's it. Anyone who uses the gui web development tools are missing out on the beauty (and horror) that can be created in PHP. It should be considered a major language milestone for development IMHO.

PHP, or Ruby? (2, Insightful)

tcopeland (32225) | more than 8 years ago | (#13844227)

Seems like Ruby on Rails [rubyonrails.org] is competing for web apps too - lots of comparisons are floating around out there [robbyonrails.com] . Some large sites are converting over, too, like Derek Siver's "CD Baby" - he blogged on the conversion here [oreillynet.com] .

I've certainly found Rails to be a good fit with interfacing with a Jabber PostgreSQL backend [blogs.com] . Good times!

Apples and Oranges? (3, Insightful)

Dekortage (697532) | more than 8 years ago | (#13844230)

I work with PHP and Java (and JSP and XML and enough other acroynms to choke a hippo). Andressen's comments seem so clearly aimed at server-side Java. PHP doesn't do client side, though there are projects underway like GTK [php.net] and WinBinder [hypervisual.com] . But still... Java was supposed to kill C, and it didn't. PHP won't kill Java either.

Isn't it a bit late? (0)

Anonymous Coward | more than 8 years ago | (#13844236)

Between the PHP Eclipse plugin which is a nice IDE (but not a full framework), and Ruby on Rails (which is no IDE, but a very nice framework), isn't Zend just beginning to realize that it could have pushed PHP way further by starting such an initiative sooner? (we have been craving for a framework, and a decent IDE for years).

Bitter (2, Interesting)

cparisi (136611) | more than 8 years ago | (#13844243)

Andreessen sounds bitter about Java and Sun in general. Maybe he attributes Netscape's ultimate "failure" with their misplaced focus on creating a browser written in Java. Netscape placed a lot of faith and resources in Java and perhaps he feels betrayed or disillusioned. Anyway, I agree that PHP is better (or at least easier to use) than Java for some things. But it is not a replacement for Java.

Marc's Support : the kiss of death? (-1, Troll)

His name cannot be s (16831) | more than 8 years ago | (#13844245)

I'd be afraid to repeat anything that putzfuck said.

This guy lucked out ONCE in his life, and everything else he touches turns to shit.

PHP rocks. Pure and Simple.

Why make claims it's going to replace anything, or succeed where anything else has failed. What possible value could this have?

Opinions are like assholes: everyone's got one, and they all smell. :p

Re:Marc's Support : the kiss of death? (1)

Crayon Kid (700279) | more than 8 years ago | (#13844358)

PHP rocks. Pure and Simple.
[...]
Opinions are like assholes: everyone's got one, and they all smell.


Peee-eeew.

PHP wins - it's economics (3, Insightful)

CousinLarry (640750) | more than 8 years ago | (#13844248)

Yes, both PHP and Java are free - i'm not talking about the monetary cost of either platform.

I'm talking about the network effects [wikipedia.org] of PHP being available on every shared host in the world.

Try to find a cheap, reliable tomcat hosting service. Then throw a dart at a google search for "web hosting." You'll find that outside of enterprise, PHP is the lingua franca.

So if you're a poor student or struggling entrepreneur looking to make an experiment or prototype, you will naturally gravitate toward PHP (same argument works for mySQL/postgre v the world). And guess who will populate the next gen of enterprise?

PHP Succeeds Because It's Not Overkill (3, Insightful)

sbma44 (694130) | more than 8 years ago | (#13844253)

I primarily work in ASP.NET, and have done some work with JSP. Those are nice environments (well... ASP.NET is, anyway) -- but for many, many things, they're overkill. A robust OO model is nice for making programmers feel comfortable, but until recently the web has been an inherently procedural undertaking. ASP.NET and AJAX are putting an end to this, but the underlying technology remains stateless.

PHP is procedurally oriented, works well, and -- most important -- is free. I can't convince my boss to touch it, of course, but if some names get behind it, it might become a much easier sell.

Java vs PHP development (5, Informative)

totallygeek (263191) | more than 8 years ago | (#13844260)

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.

this is definitely flamebait (0)

Anonymous Coward | more than 8 years ago | (#13844265)

We actually have PHP hosted on Tomcat, we did some internal work to make the buggy PHP-Servlet work correctly so we could use PHPBB and some other PHP components. We've integrated Coldfusion 6.1 in the mix and have a load of ASPs sitting behind Tomcat through a proxy servlet. Personally, I like java much better, it's a more general programming language than PHP. I've seen PHP under the hood and I'm not impressed with the underlying code. The 6.0 version of the JDK will support PHP and other scripting languages more smoothly. If you're interested take a look at JSR-223. There's a preview technology demonstration available. On many levels, I really don't care what templating language our web developer wish to code in, I do care how easy it is to write and deploy server components.

the best thing about java is... (1)

bogaboga (793279) | more than 8 years ago | (#13844272)

...the fact that it can be used to push realtime currency and stock data to remote computer networks and devices. As a full-time currency speculator, I can trade realtime just like the guy on the New York trading floor. The last time I did this was when I an on "holiday" in East Africa. All made possible because of java. In this field, PHP is of no use.

The Zend announcement of a technology to rival .NET and java might change the picture though.

very biased article (5, Insightful)

Philodoxx (867034) | more than 8 years ago | (#13844280)

I'll come straight out and admit that I'm a Java programmer, but I've used PHP and I will admit it is simple to use.

I find the comparison that the article makes between them is very one dimensional, it's saying that PHP is better than JSP, which I suppose is debatable (I prefer JSP ;) ). The problem is that Java is so much more than just JSP on the server side, it has an entire framework of technologies (some part of J2EE, some not) that make it a complete package. If they want to compare Java and PHP, it should bring in not only ease of development, but scalability, interoperability and security. I would have also liked to see the number of commerical websites running PHP vs the number of commercial websites running Java. For instance my home page has TorrentFlux on it, which is php based. So I guess I fall into that 22 million, although that's not really by design.

I won't try and say Java is better (because of my limited PHP experience) but if an author wants to convince me that PHP is better than Java, it's going to have to talk about more than simplicity and hype.

Let's send an in email (2, Insightful)

tertullian (669393) | more than 8 years ago | (#13844284)

Let's see In Java: import some.crap; import some.more.crap; import yet.some.crap; class SomeMailClass { create object 1 create object 2 create object 3 call object 1.somefunction(); call object 2.somefunction.bloated(); call object 3.somefunction.Ihave.lost.interest.already(); blah, blah, blah } now, let's do this in PHP. mail('me@mydomain','Subject',$message,$headers); In Java: For the above code, I'll bill out an hour to my client just for writing and compiling the class. Oh wait, there was a compile problem, let's debug...recompile, wait, wait, wait... ok, let's get started on the next part In PHP: I sent an email, ok, let's get started on the next part. I'll bill an hour to my client have something to show for it.

Re:Let's send an in email (0)

Anonymous Coward | more than 8 years ago | (#13844321)

Let's see In Java:
import some.crap;
import some.more.crap;
import yet.some.crap;
class SomeMailClass
{
create object 1
create object 2
create object 3
call object 1.somefunction();
call object 2.somefunction.bloated();
call object 3.somefunction.Ihave.lost.interest.already();
blah, blah, blah
}

now, let's do this in PHP.
mail('me@mydomain','Subject',$message,$headers);

In Java:
For the above code, I'll bill out an hour to my client just for writing and compiling the class. Oh wait, there was a compile problem, let's debug...recompile, wait, wait, wait... ok, let's get started on the next part

In PHP: I sent an email, ok, let's get started on the next part. I'll bill an hour to my client have something to show for it.
--
Goal in Life: Learn as much as I can...

Success through lack of hype (2, Interesting)

Pike (52876) | more than 8 years ago | (#13844286)

PHP might well succeed where java has failed, but it will be because:

- it's used on its merits, not because of hype, or a New Gospel of Platform Independence
- it's simpler and faster
- it's not being touted by a huge company such that it shows up on MS's radar as a challenge ...which are also things that Ruby has going for it. Or Python. The point isn't that PHP succeeded, the point is that java failed (at becoming kingathehill) and why it failed.

Microsoft tools make it easier? (1)

Absolut187 (816431) | more than 8 years ago | (#13844293)

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.


I recently took over a website where the previous admin had used Frontpage.
The bloated HTML is insane. Half the tags it generates are pointless.

I guess it is "easier" in the beginning, but you have to consider the disadvantages down the road when you want to make a change to your site. Then you have to wade through thousands of unneccessary lines of code to make your changes.

I hate the MS GUI web dev tools.
VI is the only tool I need.

Re:Microsoft tools make it easier? (1)

broggyr (924379) | more than 8 years ago | (#13844349)

Agreed. Although I am not "guruistic" (I make up my own words when it suits me lol) when it comes to building pages, I have built very basic sites. Amazing the crapola that MS FrontPage dumps in there - the difference is amazing! Is this an attempt by them to try to make the pages most compatible with IE? Sure seems like it...

HAY GUYS GUESS WAHT! (0)

Anonymous Coward | more than 8 years ago | (#13844302)

Windows is more popular than Linux. Dunno if that's a compliment, really.

sun death wish (1)

pubjames (468013) | more than 8 years ago | (#13844305)

I always thought Sun had a bit of a death wish when it came to Java. It has amazing publicity when the web was booming, and they managed to screw it up bigtime.

For instance, in order to install Java so that you could use a java app on the web you had to go to their web site and hunt around to find the download, even then you had to choose between whether you wanted to download the Java SQW1.2 or ZXY4.2 - it was as if they didn't really want normal people to be able to use it. Java was an amazing opportunity for Sun which they completely screwed up.

Debugging can be cumbersome (1)

Dysenteryduke (903867) | more than 8 years ago | (#13844315)

I've written web apps in Java, PHP, and now Python (check out Turbogears). Debugging PHP was such a pain, especially the PHP Extension and Application Repository (PEAR). Most of the bugs I would be trying to fix were not bugs on my part but bugs in the PHP libraries. Not to mention the error that was thrown 99% of the time was completely inaccurate. Just my experiences...

flamebait! (2, Insightful)

Anonymous Coward | more than 8 years ago | (#13844325)

There should be an option to moderate a whole article as flamebait!

Native compiled PHP with a widget set? (1)

Trigun (685027) | more than 8 years ago | (#13844336)

Although I think that PHP has made large strides in the web market, I'm hoping to see the day when there'll be kde and gtk bindings, as well as native compiled code.

"wooing windows programmers" ?? (1)

Pike (52876) | more than 8 years ago | (#13844339)

Sorry but I beg to differ on that one. Other than get its OS installed on every new PC, Microsoft does nothing to incent programmers to write for Windows.

That ended when they stopped including QBasic and started selling VB for $100-$700.

For a neat example of what PHP can do (1)

Junior J. Junior III (192702) | more than 8 years ago | (#13844342)

Check out the link in my .sig, it's a web-based game based on an old MUD, done up in php.

screw 'em both (1, Informative)

SCHecklerX (229973) | more than 8 years ago | (#13844343)

I'll stick with embedded perl, thanks. It does what I need, and I am already familiar with it. All the benefits of perl and mod_perl, with the simplicity of embedding into a page. I'm sure PHP is nice, but why bother learning it?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?
or Connect with...

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>