Slashdot Mirror


RAD with Ruby

Amit Upadhyay writes "KDE's award winning integrated development environment KDevelop, has integrated support for Ruby, an excellent and easy to use object oriented scrpting language. If you are looking for a good programming tool for quickly developing a professional one off application, Ruby (with KDE bindings) maybe just the thing for you. There is a quick tutorial and an online book to get you started. You may also want to read a quite informative comparison of Python with Ruby. If you are web developer or write enterprise applications with JAVA etc, take a look at Ruby on Rails(api), they have a nice blog too. KDevelop provides a GUI builder and Debugger for rapid application development(RAD) with Ruby, which is getting better. There is a nice tutorial on using KDE libraries with Ruby. And if you have lots of code in C/C++, extending Ruby to use them is easy.
"

8 of 162 comments (clear)

  1. Why Ruby? by Anonymous Coward · · Score: 5, Informative

    With so many other languages out there, why bother with Ruby?

    Perhaps an example would be best.

    http://www.rubyonrails.org/show/AccessControlLis tE xample

    NOTE: In the above example, the Model Code (just a handfule of lines) is what creates all the database-mapped classes and relationships. In other words, the implementation of functions used in the Example Usage were created on the fly!

    If you haven't done enough object-relational mapping using other languages to be blown away by this example, then here are 37 other reasons:

    http://hypermetrics.com/ruby37.html

    Ruby Home
    http://www.ruby-lang.org/

    1. Re:Why Ruby? by GnuVince · · Score: 3, Informative

      The equivalent is Gem and the reason it isn't mentionned is because this 37 list was written about two years before work on Gem began and the list has never been updated since then.

  2. Re:But does it work on Windows? by Anonymous Coward · · Score: 3, Informative

    Here's Ruby for Windows. It includes many extras such as FreeRIDE (a Ruby editor written in Ruby):

    Ruby One-Click Installer for Windows

    With Ruby, there are even classes that let you do OLE automation.

    And calling C/C++ functions is super-easy using Ruby so you can use all those DLL functions out there.

  3. JRuby and RDT by Headius · · Score: 5, Informative

    As long as we're dumping Ruby links, I must plug a project I work on and a project I work with daily:

    JRuby is a 100% java implementation of Ruby 1.8. The most recent release is pretty old, but the version in CVS is shaping up nicely and is getting quite stable. I joined development over a month ago, and work has been rapidly ramping up.

    The Ruby Development Tool aims to bring a full Ruby develop/test/debug environment to the Eclipse platform. It is also rapidly maturing, and may in the future use portions of JRuby for parsing and debugging. While using or developing JRuby, the RDT is a welcome companion, allowing me to stay within Eclipse when developing both Java and Ruby.

    I would also recommend tracing back to previous Ruby posts on /. for more information and links.

  4. Ruby's remaining problems by fizbin · · Score: 3, Informative
    Ruby still has two big problems that prevent it from being my scripting language of choice when compatibility with others isn't at issue:
    1. I find Ruby's limited multi-language string support a bit surprising for a language that was created in Japan. Perl and python have had UTF support built into strings for... how long now? Come on, ruby, get with it. (I frankly would expect ruby to come with the swiss-army-knife character set support that you see in emacs+mule)
    2. Performance. Compared to even, say, python, ruby has performance problems. Most of the time this isn't an issue, but when it is it makes me reach back for perl. Ruby's performance should be sufficiently good so that when I find ruby isn't fast enough, I'm at the point where what I need to do is reach for a compiled language.

    Of course, any scripting language is a big disadvantage when compared to perl because only perl has CPAN. The organized central archive for extensions with support distributed as a standard module was a brilliant move by Larry Wall; every other scripting language is still playing catchup, and still no one else can compare to even where CPAN was four years ago. (RAA is better than nothing, but it's still not there. CPAN's hierarchical naming scheme, while occasionally inconsistent, was a really good idea)

    For commercial use, I'd also want some of ruby's remaining licensing issues cleaned up, but I understand that's been taken care of. (I haven't checked lately)
    1. Re:Ruby's remaining problems by Anonymous Coward · · Score: 3, Informative

      Well, it supports *Japanese* encodings! This is a shortcoming though, for some apps.

      Performance: Well, don't forget it include programmer performance. My Ruby programs are written in 1/5 the time of my Perl programs and usually have acceptable performance.

      Ruby is dual-licensed, and one of the licenses is the familiar GPL so commercial use is no problem.

  5. Re:Why reimplement Ruby? by WayneConrad · · Score: 3, Informative

    That's a good summary of some of Ruby's shortcomings.

    You can step through a string character by character, though. It's just not obvious how, and that's a bit of a flaw. There should probably be an obvious method like "each_char".

    If you don't mind getting your characters as numeric codes, you can use String.each_byte. It's easy to turn each byte back into a character using Integer.chr:

    "abc".each_byte do |b|
    puts b.chr
    end

    Or use String.scan:

    "abc".scan(/./) do |c|
    puts c
    end

    Ruby being Ruby, there are probably another dozen ways to do it. And, for those who wish Ruby did have a String.each_char method, just add it:

    class String
    def each_char
    scan(/./) do |c|
    yield(c)
    end
    end
    end

    And now...

    "abc".each_char do |c|
    puts c
    end

    (Please excuse the lack of indenting. /. and I can't seem to agree on how to make indenting work.)

  6. There is only one guide to Ruby... by Copley · · Score: 5, Informative

    You have to read this. It's more than an intro to Ruby... It's a mini adventure!

    Why's Poignant Guide to Ruby

    Those foxes! That cat! The crazy goat!

    --
    I am bald