3 ms·
Scooter framework allows you to use both ActiveRecord and direct sql queries which you either embed in code or list in sql.properties file. See http://www.scoot
by alexdj 17y ago
Scooter framework allows you to use both ActiveRecord and direct sql queries which you either embed in code or list in sql.properties file. See http://www.scooterframework.com/docs/lovely_features.html#namedsql http://www.scooterframework.com/docs/lovely_features.html#na...
Django is a nice framework. But don't you think that listing table columns in Django model code is a violation of DRY (Don't Repeat Yourself)? Database already holds meta data. Repeating it in model code is unnecessary.
- bad_user 17y ago> But don't you think that listing table columns in Django model code is a violation of DRY (Don't Repeat Yourself)? Database already holds meta data. Repeating it in model code is unnecessary. No, because the columns definitions in Django are complete. You specify their meaning, not their internal representation. And you can also add your own types easily. In ActiveRecord you have to look at the DB schema for, well, the table definition, and you have to look again at the model's definition for validation rules or for relationship rules. It may be DRY, but it's not KISS. And I never have to work with the database schema directly, like writing SQL for the schema definition (I only drop to the db's console for debugging purposes, nothing else). A migration utility like South can detect the code-changes I've made and write the migrations for me.