Catalyst vs Ruby on Rails
From WikiVS, the open comparison website
| Catalyst | Ruby on Rails | |
|---|---|---|
| VS
|
|
| http://www.catalystframework.org | http://www.rubyonrails.org |
Catalyst and Ruby on Rails are Model-view-controller web frameworks written in Perl and Ruby, respectively. Catalyst is renowned for flexibility and for enabling the use of over 12,000 Perl modules available on CPAN. Ruby is famous for its short learning curve and application development speed.
Contents |
[edit] Popularity
[edit] Documentation
The Catalyst documentation is currently undergoing reorganization at http://catalystframework.org/, which is going to be powered by the Catalyst-based wiki solution mojomojo. However, the most up-to-date Catalyst's documentation still resides on CPAN. At the moment, there is one book on Catalyst, which received mixed reviews [1].
RoR's documentation is organized in one place (http://www.rubyonrails.org/docs) and there are numerous books on Rails[2].
[edit] Performance
All of us working on Twitter are big Ruby fans, but I think it’s worth being frank that this isn’t one of those relativistic language issues. Ruby is slow.
[edit] General capability
Perl is said to make easy things easy and difficult things possible.
RoR makes easy things very easy and complex things very difficult:
Rails has a very strange learning curve. To get up a very simple website with a simple DB store, the language is great; you can get things up and running in no time, even if you're a newbie (...)
However, once you get past all the stuff Rails was designed to help you do, making it do interesting new things requires a TON of learning. All the "magic" it does, while great if you're doing things it was designed for, becomes a TOTAL headache when you're doing stuff it wasn't designed for, because all of a sudden you have to "understand the magic" in order to figure out why things aren't doing what you'd expect, and the reference documentation sucks -- several times, I've had to simply go dive into the library source code to try to figure out just what's going on, and even then, the "magic" makes it nearly impossible to easily figure out.
Interestingly, Paul Clegg's comments are more or less exactly what I was thinking when I dropped Rails in search of something else (eventually finding Catalyst). As long as you wanted to do what the Rails developers had already thought about, you were in great shape. If you wanted to do something that the Rails developers hadn't thought of, you were screwed. I joked at the time that Rails was the most appropriately named framework, because as long as the rails went there, you could go. If they didn't, you had a long hard walk ahead of you.
[edit] Gotchas
Some Ruby features differ notably from languages such as C or Perl [3] , [4].
[edit] Application development speed
Rails is famous for its very rapid development of simple applications (Creating a weblog in 15 minutes).
Catalyst currently lacks a good set of screencast demonstrating its features. Two such resources are http://dev.catalyst.perl.org/wiki/Movies and Catalyst with FormBuilder screencast.
[edit] Features
[edit] Database
Catalyst supports a huge number of physical and virtual database backends, and different ORMs. RoR's favored ORM is ActiveRecord.
Perl/Catalyst has DBI, DBIx::Class, and Tangram which supports a large number of database backends (100+). Catalyst allows each model to be from different databases (even database sources). Some useful virtual databases exist (Amazon, Google, Excel documents, CSV files, etc.). DBIx::Class is the most popular ORM and supports features such as multi-column primary keys and character-based primary keys.
Rails supports the primary 6 database backends, although MySQL seems to be the best supported. Test and development "environments" can easily and automatically use different databases, however. Developers are not forced to use Rails' database layer, and some choose to use other Ruby based solutions. ActiveRecord is the most popular ORM for Rails. It has some design limitations in that it does not natively support multi-column primary keys.
ActiveRecord's lack of support for multi-column primary keys is important, because many-to-many relationships require a junction table, whose primary key is made up of 2 columns referencing the two tables it links. Junction tables are required in most aspects of web application design: tagging items (an item may have many tags, and a given tag may belong to many items), representing user access roles etc.
[edit] Unicode / Internationalization
Since Ruby doesn't have any specific facilities for managing Unicode strings[5], Rails' support for Unicode is not yet mature.
Perl supports Unicode natively and so does Catalyst. [6]
[edit] Debugging
Catalyst can be debugged remotely with ActiveState Komodo IDE, or locally with the built-in perl debugger[7]. Every Catalyst application is generated along with a test script. Catalyst has built-in logging and can be integrated with Log4Perl[8].
[edit] Testing
Catalyst allows for easy decoupling of the model from the web application, which permits separate testing of the database backend without going through the web application. RoR fills the controllers up with logic.


BlogMarks
del.icio.us
digg
Furl
reddit
Segnalo
Simpy
Slashdot
Spurl