TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-10-2008, 03:53 AM   #1 (permalink)
The Contributor
 
webosb's Avatar
 
Join Date: Nov 2007
Posts: 41
Thanks: 24
webosb is on a distinguished road
Default Should I drop PHP for Java?

I've been working for a dot com company for over a year now. The main website is java based and I realized alot of big companies out there also use java. I guess I'm looking for insight - career wise and for personal application.

I think Yahoo uses PHP (not entirely sure) but I know that Yahoo! Bookmarks uses the symfony framework (php). I also know that there are far more web hosts that offer apache w/ php than there are web hosts that offer tomcat w/ java/jsp/etc. But i guess that relates back to what kind of solution people are looking for or actually need.

I guess I'm looking for advice if I should drop PHP and start learning Java instead. I read a lot of old articles from slashdot regarding Java/PHP and majority of the commenters stated that Java is superior in terms of scalibility and business logic but those articles were dated fairly old. Does PHP5 change any of that? And I guess the upcoming PHP6, will php ever surpass java?


Any insight would be great guys.
__________________
"Things you can get access to, you should never memorize." -Albert Einstein
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
webosb is offline  
Reply With Quote
Old 03-10-2008, 04:30 AM   #2 (permalink)
The Contributor
 
DeMo's Avatar
 
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
DeMo is on a distinguished road
Default

Java is 100% object oriented, big companies love it because it is scalable, the code is easier to mantain and you can use it for SOA (Service Oriented Architecture) which is the ultimate separation between business logic and programming logic.

I don't think you should totally drop PHP and forget about it, but learning Java won't hurt. Since you already know the concepts of web programming, Java won't be that hard to pick up.

About PHP vs Java, it really depends on the point of view. As I said, Java is 100% OOP while PHP is more or less hacked together.. some parts of it are OOP while others are not. Java is a mature language while PHP is still growing, look at namespace support for example, it's being added now in PHP 5.3 while Java has had it for ages.
Send a message via ICQ to DeMo Send a message via MSN to DeMo Send a message via Skype™ to DeMo
DeMo is offline  
Reply With Quote
The Following User Says Thank You to DeMo For This Useful Post:
webosb (03-10-2008)
Old 03-10-2008, 09:04 AM   #3 (permalink)
The Addict
Upcoming Programmer Top Contributor 
 
Rendair's Avatar
 
Join Date: Nov 2007
Location: UK
Posts: 319
Thanks: 18
Rendair is on a distinguished road
Default

Personally i havn't seen a company that uses Java anymore and while i learnt it at college my tutor said it wasnt as widely used anymore. Personally i prefer PHP. Thats my opinion though. I wouldn't totally drop PHP that would be a bad idea.
__________________
www.jooney.co.uk - the online portfolio
Send a message via MSN to Rendair
Rendair is offline  
Reply With Quote
Old 03-10-2008, 11:29 AM   #4 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

I agree, i think java is better suited to its original use I.E. desktop programming, PHP (in my optinion) was and is a web scripting language from conception hence why there was no native support for OOP and the support we have now had to be added later, where-as java is fully OOP aware because it has to contend with langauges such as C++.

I dunno really i have never used Java in a web scripting role before (only ever briefly used it for desktop programming) so i may be wrong.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 03-10-2008, 03:40 PM   #5 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

Quote:
Originally Posted by Rendair View Post
Personally i havn't seen a company that uses Java anymore and while i learnt it at college my tutor said it wasnt as widely used anymore. Personally i prefer PHP. Thats my opinion though. I wouldn't totally drop PHP that would be a bad idea.
I second that. It's awesome and very effective when it comes to add ons to PHP, like a slide in menu or what ever, but I prefer PHP over Javascript any time.
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 03-10-2008, 05:45 PM   #6 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Quote:
Originally Posted by ReSpawN View Post
...Javascript...
Java != Javascript.

Javascript is heavily used and is being used more and more. AJAX is javascript. Most of your special effects on websites these days are javascript.
__________________
Eric
wGEric is offline  
Reply With Quote
Old 03-10-2008, 05:49 PM   #7 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

Quote:
Originally Posted by wGEric View Post
Java != Javascript.

Javascript is heavily used and is being used more and more. AJAX is javascript. Most of your special effects on websites these days are javascript.
Heh, my bad. I did mean Java. Either way, we use Java to make panorama videoshots.
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 03-10-2008, 05:52 PM   #8 (permalink)
The Contributor
 
DeMo's Avatar
 
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
DeMo is on a distinguished road
Default

He's not talking about JavaScript, he's talking about the "real" Java and Java Server Pages (JSP)

I have to disagree with Rendair a little. Java is still widely used at least in bigger companies and for bigger projects. Java and .NET are among the most requested languages nowadays, Microsoft created .NET to compete directly with Java.

Here at my University they have this huge system that let's you signup for courses, check your grades, print some documents and a lot of other stuff, it's all JSP. Most of the research projects around here will also ask for some Java experience.
Send a message via ICQ to DeMo Send a message via MSN to DeMo Send a message via Skype™ to DeMo
DeMo is offline  
Reply With Quote
Old 03-10-2008, 07:23 PM   #9 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 264
Thanks: 2
TlcAndres is on a distinguished road
Default

Side tracking a bite - DeMo can you recommend a book for Java? If so, which one?
__________________
"What everyone seems to forget is that while knowledge certainly is something - it's the implementation of knowledge that brings power" - Andres Galindo.
TlcAndres is offline  
Reply With Quote
Old 03-10-2008, 11:24 PM   #10 (permalink)
The Contributor
 
DeMo's Avatar
 
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
DeMo is on a distinguished road
Default

The Deitel series of books is very good.
I have the C++ one but a friend of mine has the Java one and it is as just as good.

Take a look: Java: How to program

It's a huge book (1500 pages) and also very expensive, but it's one of those books that you buy today and use for life. It covers a lot of ground, starting with classes and OOP concepts and down to Java fundamentals, APIs, GUI applications, databases, web programming and a lot lot more.
Send a message via ICQ to DeMo Send a message via MSN to DeMo Send a message via Skype™ to DeMo
DeMo is offline  
Reply With Quote
Old 03-11-2008, 12:11 AM   #11 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

@wGEric: I can't wait until the next ECMAScript specification where they do the 'official rename'.

@DeMo (and others): consider taking a look at Bruce Eckel's Thinking In Java, especially the free versions available online. In general, I only buy used books from Amazon vendors or trade on BookMooch. The other day I nabbed a nice O'Reilly book on C from BookMooch and I actually paid $2.96 for a (like-new) book on Hacking Google Maps from Amazon. I just can't justify going into a book store and plunking down $50.00 for a two year old text. I'll only do it if the book is VERY recent and has enough info to make it worth my while.

O'Reilly's Safari site is good also, I've belonged to that for awhile.

As to the OT and topic at hand, I personally recommend going for it and working with Java / JSP. It's not like PHP is going to be out of your grasp as a tool (which is what these languages are).
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Old 04-05-2009, 06:58 AM   #12 (permalink)
The Contributor
 
jcorradino's Avatar
 
Join Date: Sep 2008
Posts: 36
Thanks: 2
jcorradino is on a distinguished road
Default

PHP is a good starter language, it teaches you about programming languages and whatnot. Java is a good professional language to wrap your head around.

If you are sticking with web programming, PHP will rarely get you into a big company. Languages such as ASP.net or JSP are where it is at for positions like that. The websites I work on at my job get millions of hits a day (around 9 get over 10 million a day, and a couple dozen more get several hundred thousand a day), all without so much as a hiccup.

When a company is dealing with millions of users, PHP simply can not compete with a compiled langauge. There are a few of them out there, of course (I believe facebook runs on PHP)

Remember, life as a programmer will lead you through many languages. Don't really worry about learning a particular language, worry about understanding how programming works and similarities between languages. Any good programmer can pick up a new language pretty quickly, and most houses will let you ease into the job a bit, to give you time to learn the langauge. Once you learn a few major languages, it will get easier and easier.
__________________
Jason Corradino
Applications Developer, Interactive Support - Tribune Technology
J2EE Development, Script Tinkering - Develop, Support, and Maintain Tribune websites.
jcorradino is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:51 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design