August 11th, 2008, 11:29 PM
Need general info about Ruby
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.
August 12th, 2008, 12:36 AM
Originally Posted by tcjohans
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.
August 12th, 2008, 07:17 AM
I never understood that choice. It is the one thing that drove me away from python. I was a TA in college and had to grade many assignments written in python. With the wealth of available editors and platforms out there it was inevitable that I had more than half of my submissions need editing to work. I mean when a tab and 4 spaces are the same in one editor and mean something else in another you are just asking for trouble. Just left a bitter taste in my mouth.
Originally Posted by paulkoan
Couldn't agree more. Try them out; see what you like; react accordingly.
Originally Posted by paulkoan
True happiness is not getting what you want, it's wanting what you've already got.