Development Software
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementDevelopment Software

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 29th, 2005, 05:41 PM
macdum macdum is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 3 macdum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 47 sec
Reputation Power: 0
PHP vs Java

As part of a class at ITT tech I'm researching the two languages Java and PHP. I hoping to gather opinions on general perfomance and other aspects of both. I would appreciate anyone willing to answer the following questions.

1. Which is easier to learn PHP or Java?

2. Which is a more robust language PHP or Java?

3. Which is faster PHP or Java?(performance of comparable scripts)

4. Which is more secure PHP or Java?

5. Which is better PHP or Java?

Any coments on why one is better then the other would be a great help.

Reply With Quote
  #2  
Old October 29th, 2005, 08:15 PM
mvantuyl's Avatar
mvantuyl mvantuyl is offline
Blithering idiot
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2005
Location: San Antonio, Texas
Posts: 1,157 mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)mvantuyl User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 48973 Folding Title: Beginner FolderFolding Points: 48973 Folding Title: Beginner FolderFolding Points: 48973 Folding Title: Beginner Folder
Time spent in forums: 3 Weeks 2 Days 22 h 25 m 26 sec
Reputation Power: 284
Send a message via ICQ to mvantuyl
Are you asking about Java or Javascript?

Reply With Quote
  #3  
Old October 30th, 2005, 09:25 AM
macdum macdum is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 3 macdum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 47 sec
Reputation Power: 0
Quote:
Originally Posted by mvantuyl
Are you asking about Java or Javascript?


Java. J2EE

Reply With Quote
  #4  
Old October 31st, 2005, 11:35 AM
stdunbar stdunbar is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: May 2004
Location: Superior, CO, USA
Posts: 1,661 stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level)stdunbar User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 19 h 21 m 3 sec
Reputation Power: 258
Send a message via ICQ to stdunbar Send a message via Yahoo to stdunbar
I'll take a crack at this but first a disclaimer - I've been a J2EE engineer for about 6 years now and have only done PHP on the side so read my answers knowing my potential bias.

Quote:
Originally Posted by macdum
1. Which is easier to learn PHP or Java?

From a pure language perspective I guess it depends. PHP 5 finally introduced some true object oriented capabilities. However, some would argue that learning OO at the same time as learning syntax is harder. So if you're new to all programming Java might be slightly harder as it requires OO concepts. PHP has more of a C and Perl flavor and relaxes many of the things that catch first time programmers.

Quote:
Originally Posted by macdum
2. Which is a more robust language PHP or Java?

A loaded question if I ever answered one. I would argue in favor of Java on this one but only slightly. The JVM (Java virtual machine) prevents many of the types of things that languages like C allow but really so does PHP. In this case it is really the environment (i.e. J2EE or PHP in an Apache environment) that makes one better or worse. The language does not really contribute to the quality.

Quote:
Originally Posted by macdum
3. Which is faster PHP or Java?(performance of comparable scripts)

Out of the box I would say Java. You need to understand more about Java than your question implies you do. Java is a precompiled language, unlike PHP. PHP, out of the box, is a 100% interpreted language. Java is partially interpreted. Modern JVM's have things like just in time compiling that drastically improve the performance of long running programs. PHP has commercial and non-commercial add ons that also help improve performance by allowing the engine to parse the script once and cache that information.

Quote:
Originally Posted by macdum
4. Which is more secure PHP or Java?

Again, I'd lean towards Java but also again, it is more of an environment issue. Both languages protect against some misuse though I think Java does a bit of a better job of it. Java allows someone shipping a library to "sign" the code - the end user is then able to certify that the code came from the correct place. PHP does not have the same built in mechanism.

Quote:
Originally Posted by macdum
5. Which is better PHP or Java?

What is best for me may not be best for someone else. For example, if one of the criteria I use to choose a language is that it is trivial to change from one hosting provider to another then PHP would be a better choice - there are a ton more hosts out there that support PHP than Java. So the answer is "it depends". Why not C? C++? Python? etc, etc, etc. In some cases something else may make more sense.

Again, I've been using Java for a while now. In the old days PHP was a fairly simple scripting language. It has grown to be truly production caliber. The same can be said for Java. Very large sites with 10's of thousands of hits per second run Java. The exact same thing can be said of PHP. In the end it is up to the architect of the system to figure out which would be better for a particular installation.
Comments on this post
mvantuyl agrees!
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #5  
Old November 12th, 2005, 12:09 PM
macdum macdum is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 3 macdum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 47 sec
Reputation Power: 0
Great!

Perfect reply, I appreciate you taking the time and I ejoyed your comments. I can tell that you are an experienced projrammer.

As you've noticed I don't know alot a bout Java. When I started this I new less. This topics seams to be old and the arguments exaustive. As I look more and more into I've noticed that what I'm really comparing is the architecture of the two. I think comparing a precomiled language to an interpreted language is like comparing apples and oranges.

Thanks again for the comments

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementDevelopment Software > PHP vs Java


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway