Saturday, November 21, 2009

Comparing PHP Java and Ruby

Today I tried to do a small research to try and find out what language is best
when it comes to web development and tools that supports it. I tried to compare the three most used languages for web frameworks namely PHP, Java and Ruby.
All the details collected here are from my colleagues and not from a firm source. So if there is
any mistake please feel free to highlight.

The comparison was split between following items.

1/ Speed
2/ Debugging (and profiling)
3/ IDEs and Tools
3/ Testing (Unit, functional, performance)
4/ Logging and Log file maintenance
5/ Security
6/ Application integration (Integrate legacy systems and ERP systems).

Speed component depends on what you really do and the actual framework you
are using. But in general when the number of requests are low to medium PHP > Java > Ruby. When the number of requests are
high Java > Ruby > PHP is the case.

Tools that supports Debugging.
PHP - PHPEd, Expert Debugger
Java - Any IDE, JMeter, JProfiler
Ruby - ruby-debug,ruby-prof(Profiler)

List of popular IDEs for each language.
PHP - PHPEd, PHP Designer, Zend Studio Professional, PHP Expert Editor
Java - Eclips, JIdea, JBuilder
(Note: JIdea is best)
Ruby - Aptana RadRails, TextMate, Steel IDE ( NetBeans, JIdea Ruby plugin, CodeGear's 3rdRail
(Note: NetBeans free and the best so far)

PHP - Testilence, izh_test,Phpunit, Spike PHPCoverage,SimpleTest.
Java - Junit, Cactus,Jemmy, jfcUnit, Abbot
Ruby - MiniTest, Test::Unit

The security features of Java is unmatched when compared with PHP or Ruby or any other language. Actually Java was born
with security. Starting from its Strong data typing, Automatic memory management, Bytecode verification, Secure class loading
Java exposed a new dimension to the world of security.

When it comes to logging and application integration also Java leads the other languages for its versatility, available tools and frameworks.

Now the issue is if Java is such strong what is the catch. Why people use PHP for most of the sites. One reason is the cost. You need a dedicated server to host a Java site most of the time. Next you need a skilled staff from development to network administration to handle a heavy wait Java application server.Because of the above reasons PHP would be a better option to run small to moderate sites.

Also check the following comment by
James Gosling the father of the Java programming language
Ruby can't scale as good as Java

No comments:

Post a Comment