DB2 on Rails at RailsConf: Day One - Dave Thomas’s keynote

Dave Thomas opened the conference with his keynote and it absolutely struck the right cord with me. His message was both blunt and simple: “For Ruby on Rails to succeed i.e. to gain much wider adoption it must embrace legacy i.e. the stuff that already exists.” Given the fact that I spend all of my time in the enterprise, I could not agree more. Dave talked about 3 challenges but the one that I really resonated with me (the all did) the challenge of embracing data integration. Active Record is an incredibly elegant piece of technology. The value that derives form DRY (Don’t Repeat Yourself) can not be overstated. But Active Record fails to exploit constraints that are already defined in most databases. In a typical enterprise application you will have data architects and DBAs spend significant effort to define constraints on the data that reflect real world business rules. So why is it that that the framework that espouses to live and die by the principle of DRY makes programmers respecify these constraints in the Active Record instead of just using what has already been specified in the database? It just makes sense for Active Record to build validations from the constraints that are defined in the database. This would take Rails from “elegant” to “brilliant”. I do not mean any disrespect towards the Rails programmers, they really are cream of the crop … but in an enterprise application you simply will not have all of the information to do all of the validations to enforce all of the business rules and constraints. Not over a span of many years (decades) that the application will stay in production. One thing that is true about data gathered by successful applications is that is always accessed by other applications. This is why enterprise class database systems define and enforce constraints in the database. Given that their job is to is ensure data integrity no matter which application they serve, how can they not? I really hope that RoR community heads Dave Thomas’s call and makes Active Record really brilliant.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Posted by Leon Katsnelson | June 24 2006 05:00 pm | Announcements

3 Responses to “DB2 on Rails at RailsConf: Day One - Dave Thomas’s keynote”

  1. Noah on 21 Nov 2006 at 6:19 pm #

    There are a couple of plugins that work w/MySql to tease this information out of the database so you don’t have to.

    I don’t know if this will work w/DB2 (because I haven’t tried), but DrySql seems to be the most comprehensive.
    http://drysql.rubyforge.org/

  2. Bryan Evans on 02 Dec 2006 at 9:14 am #

    DrySQL does not currently support DB2, but I can confirm that it will support DB2 UDB and iSeries very shortly

  3. Bryan Evans on 30 Jan 2007 at 3:18 pm #

    In case you’re interested, DrySQL now supports DB2 LUW and iSeries.

    The latest release includes extensions to IBM’s DB2 Rails adapter that provide access to constraint metadata, and support for iSeries. The code is all released under the MIT license so if any of it is useful to those developing the IBM DB2 Rails adapter, they are quite free to use it.

    Cheers.

    - Bryan