To Ruby or not to Ruby
Question: I know that this is a difficult question to answer, but I thought I would try
anwyays....

I am just starting at a new company where they have a minimal existing code
base. It probably has a month of man effort invested at this point. It is
currently written in Ruby.

It is also currently using Ruby on Rails -- but mostly just for the sake of
testing out the Ruby code.

The ultimate goal of the code is actually to drive a backend to a site that
will be written in php (could be a backend to Drupal, Echo, etc...).

I have no experience with Ruby, so I would tend to want to go with a language
I know better (like Python), but am not willing to rule Ruby out for no
reason.

If you are not going to use Ruby for a Rails project, is it still worth it?
Will I be better off going with Python or some other language?

How do the libraries stack up?

Thanks!!!


Answer: My advice would depend on your own goals, which might look like this... you
might want to ask yourself (or score each of these from 1-10) if you prefer
to:

  1. learn a new language you might use in future? = Ruby
  2. deepen your Python skills by using it for everything (say [Django](http://www.djangoproject.com/) or [Web.Py](http://webpy.org/)) = Python
  3. move the [Ruby testing away from Rails](http://ruby-toolbox.com/categories/testing%5Fframeworks.html) = Ruby

Other questions you could ask yourself to help the decision might be:

  1. is speed important? Do some tests in the various languages. (If Ruby, then use [Ruby 1.9](http://rads.stackoverflow.com/amzn/click/0596516177) and get [the other Ruby book](http://rads.stackoverflow.com/amzn/click/0672328844)).
  2. is integration important? If so, why use a PHP front end?
  3. is your connection to the language community important? If so, choose on 'community feel'.
  4. is there a lot of backend text processing? (Perl?)
  5. do you want to use an ORM or write SQL? = look at Ruby and Python [lightweight frameworks](http://www.linux-mag.com/id/7324).

I don't think the libraries will be an issue, since (I'm pretty sure that)
libraries for popular languages cover all common tasks.

If you can score all the above from 1-10 it may help isolate a preferred
direction...

Then, as I see it, the issue breaks down into 3 things:

  1. what language do you most like to code in (work should be enjoyable)?
  2. can the front end and back end be generated in a single language?
  3. do you want to use a framework or a ready-made CMS for the front end?

It's worth looking at the origins of languages: [PHP was originally
announced](http://groups.google.ch/group/comp.infosystems.www.authoring.cgi/msg/cc7d43454d64d133?oe=UTF-8&output=gplain)
as an extension of [SSI](http://vr-zone.com/manual/en/howto/ssi.html), Ruby
tries to take the best of Perl, Smalltalk and Lisp but has elements of a
C/Java-like syntax, Perl is intimately connected to Unix and everywhere,
although usually invisible to end users (despite some [very good Perl web
frameworks](http://mark.stosberg.com/blog/2008/12/titanium-a-new-release-and-
more.html)). You already know about Python.

As for frameworks and CMSs, a trawl through the
distinctions/limitations/features might also help. It is too easy to install a
PHP CMS (fine for a site with a well-defined purpose) but then find yourself
hampered in acres of impenetrable code when you want do do something it can't
do out of the box. A framework in the backend language will enable you to hook
the back and front ends together more easily.

