Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> ORMs are powerful, because they let you say less and do more

To me this is a bonus. The real deal is that ORMs allow you to write queries as "first-class" components of the language, hence benefiting from language features such as type checks, duck-typing, factoring, static analysis even, and more.

Compare this to stitching strings (however parametrized they are) and manually coercing your object values to strings.

This is where, IMHO, ORMs like ActiveRecord and Arel shine, as they give you access to each building block (form connection.execute to .quoted_table_name to .to_sql) so that you can place yourself at whatever level of abstraction between the two worlds you may need.






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: