aspose file tools*
The moose likes Java in General and the fly likes Java v/s PHP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java v/s PHP" Watch "Java v/s PHP" New topic
Author

Java v/s PHP

Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Dear Ranchers,

I am Java/Java EE developer but recently I was interviewed for the Web Application Development Position and most of their work is in PHP and am not sure off how do Java v/s PHP Stack up.

Also it would be highly appreciated if someone can put light on how Java v/s .Net v/s PHP v/s Python v/s Ruby on Rails stack up for Web Application Development.


Any references would be highly appreciated.


[Smart Questions]
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
I am not sure if this is the sort of info you are looking for. I can tell you that php provides a useful interface between an online dbms such as mySQL, and a client side java applet.

you can use php to query a mySQL database, and then your php script will dynamicaly create HTML code which will feed the query results to a java applet using HTML param tags.

Anyways, this is a basic comment, I'm sure others can provide a more in depth comparison.

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
PHP is perfectly suitable for smaller web projects where a full blown Java web application would be overhead.

If a web project gets larger, you quickly reach limits using PHP, due to it's type-unsafe nature and it's still procedural approach (even though you can program object oriented but are not forced to).


JDBCSupport - An easy to use, light-weight JDBC framework -
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

PHP is just as scalable as anything else--with discipline.

That said, I detest PHP as a language, even more than I dislike Java.

It's difficult to make meaningful comparisons between frameworks, languages, etc. It's often just a matter of preference. I know I'd never, ever want to work in PHP full-time--but that's just me.
Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Thank you all for the response. I really appreciate your inputs over PHP v/s Java/Java EE.

I am still wondering why would a company go for PHP where they have options of Java/Java EE, may be it because learning curve of PHP or any other reason.

I would certainly appreciate if someone can share the reasons of giving preference to PHP over Java/Java EE Technologies.

Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
It is my understanding that script languages in general allow for faster development time of simple programs. If security or propriety is not a major concern, then the odds are that script language will be faster and cheaper to develop the app than full fledged object oriented programming language.

edit: ok I can't speak for php and security issues. But I can say the issue is primarily one of development cost
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

I call BS on most of this thread. PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets. It's 2009 people. Let's act like it. Languages are just a means to an end.


GenRocket - Experts at Building Test Data
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.

Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Gregg Bolinger wrote:PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets.



I agree but if one have to do project implementation like CMS system, say Online forums like Javaranch or develop an auction site like ebay than on what parameter would one decide to go for PHP or Java.




Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Fred Hamilton wrote:hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.



Even I thought that using Scripting Language one would have lower development cost but I was not sure how it would stack up with Java/Java EE Technologies.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Raj Shharma wrote:
Fred Hamilton wrote:hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.



Even I thought that using Scripting Language one would have lower development cost but I was not sure how it would stack up with Java/Java EE Technologies.


I'm gonna back off from my statements as I was relying more on information from others rather than lots of my own experience with cost benefit analysis.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Fred Hamilton wrote:hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.



I'm talking about Java as a platform more than a language. So groovy, scala, jruby, Java, whatever with regards to development costs.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Raj Shharma wrote:
Gregg Bolinger wrote:PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets.



I agree but if one have to do project implementation like CMS system, say Online forums like Javaranch or develop an auction site like ebay than on what parameter would one decide to go for PHP or Java.


If I was doing a CMS I'd find an existing CMS and go with it. Same with forums. There's too many existing solutions for those types of things to roll one from scratch. As far as something like ebay, personally, I'd go with Java (as a platform). I think Java (as a platform) scales more naturally than PHP and is more suited to highly transactional systems, as something like ebay would need.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Gregg Bolinger wrote:
Fred Hamilton wrote:hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.



I'm talking about Java as a platform more than a language. So groovy, scala, jruby, Java, whatever with regards to development costs.


Duly noted thanks. I'm not sure I appreciate the significance of your remarks on java the platform vs java the language as far as development costs go, but I'll give it some thought.
Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Fred Hamilton wrote:
Raj Shharma wrote:
Fred Hamilton wrote:hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.



Even I thought that using Scripting Language one would have lower development cost but I was not sure how it would stack up with Java/Java EE Technologies.


I'm gonna back off from my statements as I was relying more on information from others rather than lots of my own experience with cost benefit analysis.


Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
Raj Shharma wrote:
Fred Hamilton wrote:
Raj Shharma wrote:
Fred Hamilton wrote:hmm, so is BS that as a general rule scripting languages offer lower development costs. Well, then there's a lot of misinformation, and misguided people out there that need to be called for BS.



Even I thought that using Scripting Language one would have lower development cost but I was not sure how it would stack up with Java/Java EE Technologies.


I'm gonna back off from my statements as I was relying more on information from others rather than lots of my own experience with cost benefit analysis.




seems clear enough. My remarks were based not on personal experience with development costs, rather they were based on information I've gathered when trying to make my own decisions about what to focus on. Thus I can't really argue from my own knowledge of the situation. In which case when someone with apparent much more experience says otherwise, I back off and reconsider. That's all. I don't mean to offend, though the BS part irked me just a touch.
Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Gregg Bolinger wrote:
Raj Shharma wrote:
Gregg Bolinger wrote:PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets.



I agree but if one have to do project implementation like CMS system, say Online forums like Javaranch or develop an auction site like ebay than on what parameter would one decide to go for PHP or Java.


If I was doing a CMS I'd find an existing CMS and go with it. Same with forums. There's too many existing solutions for those types of things to roll one from scratch. As far as something like ebay, personally, I'd go with Java (as a platform). I think Java (as a platform) scales more naturally than PHP and is more suited to highly transactional systems, as something like ebay would need.


Thank you very much...It really makes sense not to re-invent wheel and look for already existing solutions...

Scenario: I want to develop yahoo like portal for internet providers wherein I would get some sort of content from different content providers and would have some sort of feeds similar to yahoo...

For above scenario which one would be preferrable: PHP v/s Java

I might be repeating myself but do provide your inputs as it would really help to get better understanding. From discussion so far I guess PHP would be better options for this but not sure on it.
Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Fred Hamilton wrote:

seems clear enough. My remarks were based not on personal experience with development costs, rather they were based on information I've gathered when trying to make my own decisions about what to focus on. Thus I can't really argue from my own knowledge of the situation. In which case when someone with apparent much more experience says otherwise, I back off and reconsider. That's all. I don't mean to offend, though the BS part irked me just a touch.



Thank you Fred for your valuable inputs...
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Raj Shharma wrote:
Gregg Bolinger wrote:
Raj Shharma wrote:
Gregg Bolinger wrote:PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets.



I agree but if one have to do project implementation like CMS system, say Online forums like Javaranch or develop an auction site like ebay than on what parameter would one decide to go for PHP or Java.


If I was doing a CMS I'd find an existing CMS and go with it. Same with forums. There's too many existing solutions for those types of things to roll one from scratch. As far as something like ebay, personally, I'd go with Java (as a platform). I think Java (as a platform) scales more naturally than PHP and is more suited to highly transactional systems, as something like ebay would need.


Thank you very much...It really makes sense not to re-invent wheel and look for already existing solutions...

Scenario: I want to develop yahoo like portal for internet providers wherein I would get some sort of content from different content providers and would have some sort of feeds similar to yahoo...

For above scenario which one would be preferrable: PHP v/s Java

I might be repeating myself but do provide your inputs as it would really help to get better understanding. From discussion so far I guess PHP would be better options for this but not sure on it.


It's literally impossible to make a decision based on the information given. There's soooo much that goes into making these decisions and it's not even always about what is the best tech but might come down to speed to market and what the team knows already.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Fred, I didn't mean to offend anyone with the BS comment so I apologize if it hit you the wrong way.
Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Gregg Bolinger wrote:
Raj Shharma wrote:
Gregg Bolinger wrote:
Raj Shharma wrote:
Gregg Bolinger wrote:PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets.



I agree but if one have to do project implementation like CMS system, say Online forums like Javaranch or develop an auction site like ebay than on what parameter would one decide to go for PHP or Java.


If I was doing a CMS I'd find an existing CMS and go with it. Same with forums. There's too many existing solutions for those types of things to roll one from scratch. As far as something like ebay, personally, I'd go with Java (as a platform). I think Java (as a platform) scales more naturally than PHP and is more suited to highly transactional systems, as something like ebay would need.


Thank you very much...It really makes sense not to re-invent wheel and look for already existing solutions...

Scenario: I want to develop yahoo like portal for internet providers wherein I would get some sort of content from different content providers and would have some sort of feeds similar to yahoo...

For above scenario which one would be preferrable: PHP v/s Java

I might be repeating myself but do provide your inputs as it would really help to get better understanding. From discussion so far I guess PHP would be better options for this but not sure on it.


It's literally impossible to make a decision based on the information given. There's soooo much that goes into making these decisions and it's not even always about what is the best tech but might come down to speed to market and what the team knows already.




On this parameter's

1.speed to market
2.what the team knows already

which tech would be best results: Java/PHP provided teams are on same level of understanding for both the technologies or let's say needs to be trained in both the technologies.

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Raj Shharma wrote:
Gregg Bolinger wrote:
Raj Shharma wrote:
Gregg Bolinger wrote:
Raj Shharma wrote:
Gregg Bolinger wrote:PHP can be just as scalable (with the right amount of hardware) as Java and Java (with the right toolkit/framework) is just as suitable for smaller web applications and tighter budgets.



I agree but if one have to do project implementation like CMS system, say Online forums like Javaranch or develop an auction site like ebay than on what parameter would one decide to go for PHP or Java.


If I was doing a CMS I'd find an existing CMS and go with it. Same with forums. There's too many existing solutions for those types of things to roll one from scratch. As far as something like ebay, personally, I'd go with Java (as a platform). I think Java (as a platform) scales more naturally than PHP and is more suited to highly transactional systems, as something like ebay would need.


Thank you very much...It really makes sense not to re-invent wheel and look for already existing solutions...

Scenario: I want to develop yahoo like portal for internet providers wherein I would get some sort of content from different content providers and would have some sort of feeds similar to yahoo...

For above scenario which one would be preferrable: PHP v/s Java

I might be repeating myself but do provide your inputs as it would really help to get better understanding. From discussion so far I guess PHP would be better options for this but not sure on it.


It's literally impossible to make a decision based on the information given. There's soooo much that goes into making these decisions and it's not even always about what is the best tech but might come down to speed to market and what the team knows already.




On this parameter's

1.speed to market
2.what the team knows already

which tech would be best results: Java/PHP provided teams are on same level of understanding for both the technologies or let's say needs to be trained in both the technologies.



Ugh! I don't know. Toss a coin and hope for the best? This isn't a question that can be answered on JavaRanch. You should discuss this with your team, your manager, and/or your investors. None of which are here on JavaRanch.
Raj Shharma
Ranch Hand

Joined: Mar 22, 2009
Posts: 60
Gregg Bolinger wrote:

Ugh! I don't know. Toss a coin and hope for the best? This isn't a question that can be answered on JavaRanch. You should discuss this with your team, your manager, and/or your investors. None of which are here on JavaRanch.



Thank you Gregg for your valuable inputs...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java v/s PHP