Originally Posted by tcjohans
I have been working a lot with PHP, but have lately felt that I would like to try another scripting language (mostly just to widen my perspective) and am considering Ruby (among others).
So, I just wonder what would be some of the interesting features/advantages/abilities/capacities I might find in Ruby, in the perspective of people who have had the opportunity to work with it. I would be grateful for any reflections. I would be using the language for web site development in general.
I see you have posted for info on ruby, perl and python. I'll comment on them all here.
Have you used CakePHP with php before? CakePHP is a framework that can take a lot of the effort out of putting together a website. It does mean that you have to learn the framework in addition to the language, but in terms of getting a prototype together quickly, they are big wins.
The main framework for Ruby is ruby on rails, and for python it is Django. I am not familiar with any of the perl frameworks.
Perl has been around a long time, and was the first scripting language I worked with - and developed websites with. Having said that, it would be my last choice now. I haven't seen how well it has progressed over the past few years, but after working with php, ruby and python, I don't feel the need for looking back.
Both ruby and python benefit from being object oriented at the core - perhaps ruby more so. Developing in their respective frameworks, rails and django, is problematic as not many hosts support them (we support rails via cpanel, but not django - for the time being).
Some people dislike the python approach to code blocks, as it uses indentation cues to show where a block begins, and an outdent to show where it ends.
Most programmers (all should) will indent code blocks anyway - so I guess the argument is that if you are going indent anyway, then why not use the indenting as a code block delimiter?
Ruby uses "end" to terminate a code block, and a control statement to begin mostly (such as if).
But this is syntactical stuff, and largely taste dependent.
If you are developing, and have reasonable influence over your web server, then both ruby and python are worth getting into. Ultimately, "right tool for the right job" is the best approach when considering what to code in. I have an application that uses a mix of ruby and php to get the job done for example.