Both PHP and Ruby are scripting languages used to develop web applications. There is a little difference between these two languages.
Pitfalls of Ruby:
- Slower: Ruby is noticeably slower than other interpreted languages and has a lot of performance issues. Even classic, simple CRUD applications often discover somewhere down the line that there’s something enormously computationally intensive that they want to do, for example, blog software might want to add Bayesian filtering to eliminate spam from comments. This is where you suddenly realize that if your language of choice is 10 times slower than the competition, you may be simply unable to add that feature, or you may have to call out to another language.
- Hosting Issues: Rails applications are also more trouble to host than PHP applications. Because of the size of the Rails framework code, it has to be kept in memory all the time, not loaded in response to a request. You need 100–200 MB of dedicated RAM to host even a low-traffic Rails application. With PHP applications, in contrast, you can host hundreds of applications on a single server, because they don’t occupy any memory when they aren’t being accessed. Another result of these server requirements is that Ruby on Rails hosting tends to be more expensive than for other platforms and languages. If you’re in the Rails sweet spot, your application is significant enough that the incremental hosting cost is insignificant compared to the value you get from using Rails.
- Popularity: PHP is well established and is has a lot of IDE’s, frameworks, open source projects etc. Ruby is just starting to get into the mainstream and there are still some fundamental issues with Ruby and web development. For example, Ruby integration with APACHE is still not stable. It works, but there are some known problems and can be a hassle to set up. There is a large developer community for PHP than that of Ruby.
Ruby is a promising language, and works well for small scripts and utilities, but shouldn’t be used it large-scale applications until it is a proven technology. PHP is well established language and we see a lot of applications running successfully using PHP including many CRM’s.
We can develop the application in two different ways using PHP. We can either develop the application from scratch using Code Igniter framework, which is very much similar to Rails framework. The other way is the customization of an ecommerce product. We can select the product once we freeze the features list of the application.