Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: OT: Ruby On Rails - your thoughts?

by sri (Vicar)
on Nov 17, 2005 at 22:15 UTC ( #509614=note: print w/ replies, xml ) Need Help??


in reply to Re^3: OT: Ruby On Rails - your thoughts?
in thread OT: Ruby On Rails - your thoughts?

As said before, DBIx::Class (DBIx::Class::Loader) does all that and much more, it also requires less code than your Rails example btw.

package MyApp::Model::DBIC; use strict; use base 'Catalyst::Model::DBIC'; __PACKAGE__->config( dsn => 'dbi:SQLite:/Users/sri/MyApp/test.db', relationships => 1 ); 1;
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...


Comment on Re^4: OT: Ruby On Rails - your thoughts?
Download Code
Re^5: OT: Ruby On Rails - your thoughts?
by chromatic (Archbishop) on Nov 17, 2005 at 22:57 UTC
    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?

    Why write all of Catalyst in Perl, for that matter?

    Oh, wait.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://509614]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2014-10-01 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (38 votes), past polls