Geeks With Blogs
Stephanie Grima C#, ASP.NET and my life.

 

So I had to do a comparison between the Java language and PHP for college... and I thought I'd put it online as an article :-) Here it goes!


In comparison to PHP, the J2EE language is far more maintainable in terms of updating an application or website. It is heavily object oriented, whereas OOP in PHP is rather new, since mostly, it is scripting. Java also has a better linear performance. And thus, it beats PHP on performance benchmarks as well.

In polls and according to most programmers, J2EE is better for enterprise applications. One of the reasons being, that Java is a more powerful language, since the developer/programmer can call on many other Java API's to perform complex tasks. To do this in PHP, one has to look for existing plug-ins and download them. Therefore, although PHP may be easier to learn, J2EE is easier to use.

Scalability is always important when deciding a language for a particular application. J2EE is mostly used for large scale applications, while PHP is mostly used for smaller applications.

In terms of framework, it only Java who has it. PHP offers only some tools for the programmer to work with. To conclude with, Java's documentation and support is far more robust than that found for PHP

Posted on Thursday, October 30, 2008 9:19 AM My Opinions , Java | Back to top


Comments on this post: J2EE vs PHP

# re: J2EE vs PHP
Requesting Gravatar...
PHP compares to JSP...
J2EE compares to .NET...

I don't know if one of them fulfill your needs but I think that there should be an extreme evolution on programming web applications cause it's still a pain in the but... to create ideal web pages. I hope Flex and WPF open a new paradigm where we can get perfect apps quick, with less code, smart components, amazing look/effects, bla bla bla... but with a new technology because we are on XXI century..

besides I think that technologies like AJAX or even Javascript to emulate WEB 2.0 apps is like a Rambo but with cancer!!

A new hero is needed!!!
Left by Lyn Scott - Venezuela on Apr 18, 2009 2:05 PM

# re: J2EE vs PHP
Requesting Gravatar...
I agree with Lyn. Tough many updates, upgrades and innovations added, we're still working on hardware with built by 80's logic. Furthermore that logic comes from the mainframe era. Even tough languages and/or scripts like J2EE, PHP, Ruby, AJAX, etc. are relatively new, they are still derivatives of C language.
We need to start looking from new perspectives to simplify ever growing computing needs.

64bit & Flex are nothing new or improved in essence what so ever. The joy of many amazes me when they line up to buy or download new 64 bit Vista, Windows 7 or Linux versions or when enterprise boys fight to death in order to keep their over-rated complex environment.

It is beginning to look like we are working for machines where it should be the exact opposite.

With respect to comparing languages/scripts:
if PHP is slower add more hardware ELSE keep paying more to J2EE programmer = its all about economics

I also agree with above comparison of J2EE & PHP but;
AND if (J2EE is better for Enterprise & stability) & has more documentation THAN how come it is more costly?
Left by Murat Ozgermi on Jul 29, 2009 3:00 PM

# re: J2EE vs PHP
Requesting Gravatar...
Thank you guys for the comparison you made :) it really helped me get a better idea about the different technologies used (especially php and j2ee of course ;) )

best regards
Left by MAS on Jan 12, 2010 5:51 PM

# re: J2EE vs PHP
Requesting Gravatar...
Php is easy to learn than other language i worked in j2ee,.net,php all.
From my side j2ee is little faster than php.
but if do not have any good experience in programming than use php easy to learn and rock for web.j2ee is good for enterprise Application
Left by Amardeep on Jan 19, 2010 11:21 PM

# re: J2EE vs PHP
Requesting Gravatar...
j2ee is better than php in all respect
Left by Rajesh jha on Aug 05, 2010 2:39 PM

# J2EE vs PHP
Requesting Gravatar...
PHP is best suited where a web application is required more design prospect instead of architectural and high business intervention security.
Left by Niraj Kumar Singh on Aug 10, 2010 2:24 AM

# re: J2EE vs PHP
Requesting Gravatar...
Look at this http://www.programania.net/diseno-web/java-ee-y-web-20/
what do you think?
Left by Alei Reyes on Oct 20, 2010 10:25 PM

# re: J2EE vs PHP
Requesting Gravatar...
PHP free, and free programs will always hold the positions, he can and that lags behind in what, but nevertheless it is easier for using for construction of standard problems.
Left by Generic Medication on Dec 08, 2010 2:26 AM

# re: J2EE vs PHP
Requesting Gravatar...
tum bhajar milo madarchodus!!!!!!!!!!
Left by beti on Jan 26, 2011 12:35 PM

# re: J2EE vs PHP
Requesting Gravatar...
Rightly said
Left by Raza on Feb 16, 2011 2:18 AM

# re: J2EE vs PHP
Requesting Gravatar...
Java is best and will remain the best...

PHP is just staying in yhe market for its simplicity..

J2ee means great..
Left by Vivek on Feb 25, 2011 1:52 AM

# re: J2EE vs PHP
Requesting Gravatar...
Just want to share my experience working both PHP and J2EE (java)

PHP is very easy to use with any framework like CodeIgniter or YII. If you need to quickly build website with more forms-validation-database interaction, PHP is the answer.

Regarding J2EE, there are 4 reasons why I keep choosing J2EE for my office work.
1. J2EE w/ Spring handle Transaction very well, easy, and simple configuration. in My experience working with Bank or Telecom Industry, many enterprise (huge) applications are not having simple form-validation-database interaction. When I say 'huge' that means a lot of interfacing with other enterprise system, which require assurance on transaction reliability. Many Dataware House - ERP- and back end interface. I found that PHP does not handle transaction easily.

2. Multi Thread. In telecom industry, many batch job (not just web application) require to handle multi thread process. PHP does handle multi process using pcntl_fork, but it does not handle multi thread.

3. Many Hardware appliance (for example Cisco) have build-in Java API, rather than PHP API. So it's easier to ask your programmer to program in Java rather than keep asking them to call Java from PHP.

4. Log4j. I loved using log4j for easier logging, especially when you need to send all the logs to a central system (ie: syslogd). It's not easy to find such good logging in PHP (I hope log4php can do better)

5. Easy knowledge transfer. Yes to build J2EE you may need certification in Java 2 Programmer or Java 2 Web Development. You need at least knowledge on how to use Struts or Spring. But those knowledge realy help to give more assurance that your development team are not doing any 'cowboy' codding which may not be well organized, and well understood when another programmer take over his code.

Again, those are my five cents opinion base on my experience. Hope it helps
Left by Nicky Sagitta Hiedajat on Mar 20, 2011 6:22 AM

# re: J2EE vs PHP
Requesting Gravatar...
"J2EE is easier to use."
You must be drunk...
Left by PF on Apr 21, 2011 1:03 PM

# re: J2EE vs PHP
Requesting Gravatar...
A couple of links that you should read

http://onjava.com/pub/a/onjava/2003/10/15/php_scalability.html

http://www.notesbit.com/index.php/web-blog/technology/phps-scalability-and-performance-comparison-over-java-digg-model/
Left by Michael on May 29, 2011 1:38 PM

# re: J2EE vs PHP
Requesting Gravatar...
I agree but take into account that I am biased to J2EE.
Left by Diego on Nov 18, 2011 1:56 PM

# re: J2EE vs PHP
Requesting Gravatar...
I start coding many years ago in C++ then I moved to Java and JavaEE for some projects with Struts2. Java is good... but then I try also PHP and it is good too! PHP is very fast for writing code with list and maps (with its associative array), it's very fast write code for handling strings and query data from db. And finally exist many and many framework and web application for integration.


Left by Paolo on Mar 15, 2012 7:28 AM

# re: J2EE vs PHP
Requesting Gravatar...
J2EE is more robust and flexible for enterprise application.

An enterprise application is not equally to a website.
Left by righboy on Jun 06, 2012 4:36 AM

# re: J2EE vs PHP
Requesting Gravatar...
I did a performance comparison that you might find useful here:
PHP vs J2EE: a Practical Approach
http://www.mgrecol.com/?p=71
Left by The Data Brewer on Aug 09, 2012 1:32 PM

Your comment:
 (will show your gravatar)


Copyright © Steffi | Powered by: GeeksWithBlogs.net