#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2007
    Posts
    113
    Rep Power
    8

    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.

    Thomas
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2008
    Posts
    173
    Rep Power
    37
    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.

    Thomas
    Hello Thomas,

    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.
    ServWise Advanced Hosting - Better, Faster, Smarter
    Linux and Windows Hosting, Shared and Reseller, Low cost domains and SSL
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2004
    Location
    Constant Limbo
    Posts
    989
    Rep Power
    363
    Originally Posted by paulkoan
    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?
    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
    Ultimately, "right tool for the right job" is the best approach when considering what to code in
    Couldn't agree more. Try them out; see what you like; react accordingly.
    True happiness is not getting what you want, it's wanting what you've already got.

    My Blog

IMN logo majestic logo threadwatch logo seochat tools logo