Read Time: 2 min, 25 sec
In today’s technology centered environment, there are often clashes between PHP and Ruby on rails programmers for their language supremacy. People should have a clear idea that PHP is a language and Ruby on rails is language over a framework. So, comparing PHP Vs Ruby on Rails wouldn’t be ideal one. However, I have tried to provide few insights on this comparison.
Most interesting talks these days in tech world is PHP replaced perl and now it is more likely ROR would replace PHP. I would certainly disagree with these, as PHP has been built to overcome difficulties based by programmers in perl. Similarly ruby in rails is built by programmers after drawbacks in languages PHP, ASP and perl.
PHP growth rate is stagnating for the past few years, whereas Ruby on rails has been growing tremendously. It is mainly because most developers want to be more sophisticated in their development.
Following are few general differences which could be list out,
PHP coding runs faster than that of Ruby on rails code. However, we can achieve tasks in ROR with few lines of code compared with that of PHP coding.
Most of the webs hosting companies do support PHP applications, whereas Ruby on rails would be supported only by unix based server. Still Control panel for Rails 3.0 framework have not been implemented. On hosting front, PHP is clear winner. With introduction of Heroku, ROR applications can be hosted easier.
In PHP, testing code and modules is difficult one. However, in Ruby on rails with introduction of R-spec testing rails code is an easy cake for developers.Ruby on Rails development will be helpful in creating bug-free application. In CakePHP you can do those testing, with certain code changes.
ROR has clear code structure compared to that of PHP.
PHP has more compatible frameworks like CakePHP, codeigniter and Zend. In Ruby too, apart from rails there are many good frameworks like Sinatra, vintage etc. Both languages has very good MVC architectural framework.
Both languages’ syntax are clear and simple. However, Ruby without ending syntax was not acceptable many programmers.
PHP along with its fireworks utilizes less memory space, whereas Ruby on rails would use more space. Hence, application based on Ruby on rails would be slower compared to that of PHP.
In the war of PHP Vs ROR, developers shouldn’t have any issues in learning both technologies. You could choose technology depending on resource availability and requirements. Ruby on rails is gaining momentum and PHP has proven track record of matured programming language.