Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: OT: Ruby On Rails - your thoughts?

by davorg (Chancellor)
on Nov 17, 2005 at 09:43 UTC ( #509347=note: print w/replies, xml ) Need Help??

in reply to OT: Ruby On Rails - your thoughts?

Ruby on Rails looks great. There are a lot of things in there that really make it easier to develop great looking web apps very quickly. In particular I'm thinking of the built-in mini web server, the helper scripts for building components and the division between dev, test and live environments.

There are, however, three points I'd like to make:

  1. Catalyst also has all of that. What it doesn't have is the marketing.
  2. The database access part of RoR (which is called ActiveRecord) looks really amateur. You have to redefine all of your database tables in the Ruby code. It's like using Class::DBI without Class::DBI::Loader. It gives the impression of being designed by people who don't know much about databases. Or who don't like databases.
  3. A lot of the buzz about sites build with RoR is the innovative new interfaces that they use. But this really has little to do with RoR. The interfaces are built using clever javascript libraries like scriptaculous or prototype. Perl has interfaces to these libraries too.

So I think that we should be looking closely at Ruby on Rails and making sure that our frameworks provide all of the same facilities as it does. But the most important lesson I think we can learn from it is how to market a web framework so that it goes from being unknown to the name on everyone's lips in a year. That will be a lesson worth learning!

Update: Fletch points out below that I was misremembering how ActiveRecord works. He's right, you give it a class name, and it works out the name of the associated table and creates attributes for all of the columns. What it doesn't do (and what you can do with Class::DBI::Loader) is to a) automatically create classes for all tables in a given database and b) automatically set up the relationships between your tables.


"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: OT: Ruby On Rails - your thoughts?
by Fletch (Chancellor) on Nov 17, 2005 at 18:52 UTC
    You have to redefine all of your database tables in the Ruby code.

    Erm, what? Presuming your tables conform to the Rails conventions (granted that is a substantial caveat when dealing with existing schemas and is an acknowledged weakness of Rails) you need one two line file for each stand alone table. Any relationships between tables are then specified within this class declaration.

    class User < ActiveRecord::Base has_many :projects end

    With Class::DBI you'd have to have MyDB::User->has_many( projects => "MyDB::Project" ) declarations somewhere to do the same thing, so I don't really see how this is really a substantial deficiency.

    Update: Just to clarify, the above declaration would suffice to get a User class which has accessors for all columns of the users table in the default database; it would also setup relationship so that a_user.projects would return an array of Project instances associated with the User instance in question (presuming of course there were an appropriate Project class with a belongs_to :user declaration). If the DB doesn't adhere to Rails' expectations as far as table and primary key names it's pretty simple to correct it (set_table_name "web_user_names"); similar options are available for foreign key names (Class::DBI has similar expectations and mechanisms for allowing variation from them). Additionally, there are code generators which will write the stubs for you so you just run script/generate model User once when creating your app and the grunt work is done; you just go in and add the relationship information.

Re^2: OT: Ruby On Rails - your thoughts?
by techcode (Hermit) on Nov 18, 2005 at 00:16 UTC
    Catalyst also has all of that. What it doesn't have is the marketing.
    Not just Catalyst - Perl needs better marketing ...

    What do you think. Would TPF grant funds for a PR/marketing project?

    Have you tried freelancing? Check out Scriptlance - I work there.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2020-11-24 04:59 GMT
Find Nodes?
    Voting Booth?

    No recent polls found