May 31 2007
The Beauty of Ruby (featuring Ruport)
It was pointed out to me recently that my Ruby posts up until this point kinda left my readers with the sense that I don’t like Ruby.
I’d like to take this opportunity to categorically state that this is not true. In fact, I am a member of the Ruby Users of Minnesota group, which probably takes the cake for most entertaining user group in my experience. I think that the success of Ruby — even ignoring Rails — is a leaps-and-bounds advancement in scripting languages. Compared to Perl, it’s an awesome advancement.
I do have a hesitancy about using Ruby for large production applications. With the right IDE, a very aggressive set of unit tests, and some sanity rules (e.g. limit Mix-Ins and apply immediately in the code), Ruby is probably no worse for this kind of work than Java (and certainly more fun). However, I’ve really been spoiled by the combination of duck typing and static type checking (and the associated parameter pattern matching) that Ocaml provides. For heavy lifting (i.e. any application too big to fit in your head at once), I’d take Ocaml in a heartbeat. On the other hand, for simple web apps, reporting, and sys admin stuff, I’d take Ruby over Ocaml without a thought, even if Brian thinks Ocaml’s not a half bad scripting language.
A great example of Ruby’s power is Ruport: the Ruby Reporting framework. It leverages Ruby’s ActiveRecord system (thereby gaining reflective DRY DB coding for free) and Ruby’s natural succinctness to generate business reports with disturbing ease. If you don’t believe me, check out the Ruport example page. Keep an eye out on the book, too, which I’m doing some reviewing/editing on in my copious free time.
Popularity: 2% [?]