|Pathologically Eclectic Rubbish Lister|
Re^4: OT: Ruby On Rails - your thoughts?by sri (Vicar)
|on Nov 17, 2005 at 22:15 UTC||Need Help??|
As said before, DBIx::Class (DBIx::Class::Loader) does all that and much more, it also requires less code than your Rails example btw.
Thats all you need, table classes are generated and releationships auto-detected by analyzing foreign keys.
You don't even have to write it by hand, Catalyst has helpers to do it for you. ("script/myapp_create.pl model DBIC DBIC dbi:SQLite:/Users/sri/MyApp/test.db")
Bundle::Catalyst suggests only DBIx::Class, definitely not Class::DBI.
Yes Ruby looks a bit cleaner in "your" examples, but bad programmers write bad code in any language.
Ruby is also missing a lot that disqualifies it for me, especially Multiple Inheritance, i like NEXT and Class::C3 very much. (mixins are no alternative!)
Not to mention the bad performance and lack of modules...
So what exactly can't be written in Perl?!?!
Do you really think a tight integrated framework for Perl makes sense? Why?
The Perl community is very fragmented, we have many alternatives(TIMTOWTDI), TT, HTML::Mason, HTML::Template, DBIx::Class, Tangram, Alzabo, SPOPS... which two components would you choose for tight integration? They all have their strengths and weaknesses, so why not choose the best for the task at hand? Why not use multiple template engines, multiple orm's in the same application?
So far i've not even seen a single Rails app dealing with more than one database!
Oh, did i mention Catalyst now also supports PAR, ship all prereqs with your app, something Rails people can only dream of...