Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) 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.
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...

In reply to Re^4: OT: Ruby On Rails - your thoughts? by sri
in thread OT: Ruby On Rails - your thoughts? by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-24 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found