This is going to be so much fun !!!
1. The comparison itself is not really fair. php and Java are languages while
RoR is a language+framework combo. The correct comparison will be php vs. Java
vs. Ruby. My order of preference here is 1st Ruby, then Java and then php.
2. php and Java have MVC frameworks too which compete with Rails. php has
'Symfony' and Java has 'Struts'. Hence you can have Rails vs. symfony vs.
struts.
3. The nitty-gritty
3.a. php + symfony - good to excellent for small projects. php started as a
procedural language and is not fully OO. Hence, code gets increasingly
difficult to maintain as proj size grows. But php is easier to learn, very
mature libraries, lots of php developers and in general easier, cheaper both
for development and maintenance.
Yahoo front end is pretty much entirely php. I think the total amount of PHP
code available on the net is 2nd only to 'C'.
I personally detest php due to the inline html part. Also the language/syntax
is not 'elegant'. php is also aged - parallel will be that php took up a lot of
space where initially PERL was used. Similarly, ROR is eating into php
territory.
3.b. RoR - my personal favourite. excellent for upto medium-large sized projs.
Absolutely a programmers delight. Ruby is fully OO. Rails is excellent MVC and
the ORM is great.
By 2009, even the libraries and plugins sorta caught up with php - rubyforge.com
High productivity - much higher than php due to the native methods of Ruby.
i.e. You do not have to write code for sorting, searching, ordering etc in ruby
- just use the inbuilt stuff unless you are Knuth's Ekalavya and know a
'better' optimisation.
Same for Rails. The framework does so much that you just concentrate on the
business logic rather than algorithms and n vs. n^2 vs. log(n).
jquery is the only major library not fully integrated with ROR but that should
be integrated in 1-2 months with the release with Rails 3.0
RoR is perfect for almost 90%-95% of web apps where CRUD is the main concern.
For the remaining projects that don't require MVC, do NOT go for RoR.
The number of RoR programmers are lesser and hence more expensive. Shared
hosting of RoR is not as popular as php.
3.c. Java/Struts - This is for 'industrial strength' projects. Java has a lot
of good stuff going for it but I really don't think you can compare Java/Struts
with RoR/symfony - they are aimed at different categories of applications
altogether. Java is more resource hungry. Java is a bit of a pain to develop
and test due to the building+deploying latency and unless you need Application
Server features, you really don't need Java/Struts. Java also requires more
effort to deploy and maintain.
Have a good look at what your planning to do and then take a decision based on
your comfort zone.
cheers,
kc
K. C. Ramakrishna
www.rknowsys.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc