I am an experienced PHP programmer, but I have been looking into Ruby lately, and it seems there are some neat features that I have been missing out on. I want to use PHP for all my important things, but then throw in a nice dash of Ruby on Rails when it makes things convenient (for, let's say, working with a Cassandra database, something not easily accomplished with PHP.)
Is there any harm in running PHP and Ruby simultaneously on one Apache setup? I would like to use some of the finer features of Rails, but I'm addicting to PHP and cannot give it up.
While it's clear that Ruby is a more difficult programming language to master, in many ways, it is a more robust language that is better suited for creating business applications. PHP was created specifically for the web, but Ruby on Rails offers much more.
Both PHP and Ruby on Rails have their own strengths and weaknesses. Developers need to speed up the development of the web apps they produce, and they need a strong PHP framework to do it. Ruby on Rails developers code in Ruby, so Ruby on Rails vs PHP is not a straightforward comparison.
As long as your apps are well behaved there will be no problems.
Ruby, and/or Rails, just like PHP, could consume all available resources, but that's our own fault when it happens. Since you're experienced with PHP, I'm sure you're already aware of what sort of behaviors could bog down a server.
I say go for it.
Having written PHP code, along with using Ruby's Sinatra, Padrino and Rails for web front-ends, I'll also say "watchout". Ruby + Sinatra or Padrino + HAML can really seduce you to the Ruby-side.
These kinds of setups make the universe implode, so use with care. But on a serious note, you will have no trouble running them. As The Tin Man said, make sure you have enough resources. Even the best written applications with ROR will burn through resources. A poorly written PHP application will take down whole server. My rule of thumb: CPUs and RAM are cheap, but that doesn't mean your applications should be big and unruly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With