
I am a fulltime freelance web developer using PHP and i also teach a computer programming but not using PHP, it's using Java. Yes, i teach Java Programming. First, i feel not so like teaching Java, because i don't know Java well. Yes, i am a novice in Java but my department chief still trust me to deliver it, although she knew that. So i receive that task . I am learning Java by reading, practicing and teaching in the same time.
My impression about Java so far is, Java is a very good programming language and rather difficult to learn especially for those who new in OOP concept. Here, I try to compare those 2 languages, Java and PHP.
1. Java is very "Computer Science". We will learn so many computer science terms, more than PHP.
For example :
If we want make a pop menu in GUI, we must know JOptionPane class and its methods and parameter. Comparing with PHP, it just know only "alert" syntax and moreover it's not in PHP, it's in JavaScript. PHP itself can't make a pop up menu . Luckily, PHP can work together with javascript which make pop up menu and JavaScript itself has Framework which able to create various pop up menu.
2. Java is Object Oriented Programming, no procedural , while PHP is still use procedural besides support OOP too.
Everything is OOP in Java. We have to master OOP Concept. We have to understand what class is, what object is, what inheritance is, etc. There is no Procedural programming anymore, like PHP still can use procedural.
3. Java is very wide in utilization and type. PHP is not so wide.
I just learn and teach Java Standard Edition, while there are Java Enterprise Edition (J2EE) and Java for Mobile (J2ME) too. Other, there is JSP. Don't forget Blackberry and Android using Java as their programming language. Java serves from Enterprise to mobile. We can make interactive games, database, science, geograhical application, etc using Java. Java for all.
PHP is good for enterprise and very strong in web development but it's utilize is not so strong for mobile device and can't use in making Interactive games.
4. So many syntax in Java . PHP has less.
It's so hard use so many syntax in Java, but luckily we are helped by IDE. There are some great IDE for Java. 2 of them and very well known are Eclipse and Netbeans. By using them, we are helped in highlighting, auto-completion, helper window,auto correction for some cases,etc.
I use Netbeans for PHP too. Netbeans is an open source great IDE for C/C++, PHP and Java.
I just mention 4 comparisons between Java and PHP. It doesn't mean that PHP is lower quality than Java particularly in web development. PHP is very good in web application development, even application for enterprise, you won't regret using PHP for web development, but of course you have to also use JavaScript, Html, CSS and Image processing to work with PHP. But for mobile, use Java.
I still choose PHP with other supporting scripts and tools as my main programming language not Java for today, because i am more familiar with PHP and have some experiences and portfolio in PHP application, but i am still eager to keep learn Java.
No comments:
Post a Comment