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

I came to Django & South after using ActiveRecord and Rails migrations for years, and it drove me nuts. Not trying to cause a big argument, but why the big push in the Python community to model database tables via object properties/fields? I seem to recall SqlAlchemy does something similar.


From 'The Zen of Python' - Explicit is better than implicit.

Automatically generating properties after querying the database is seen as unpythonic. PyLint and some IDEs/editors will not be happy if you try.


DataMapper 1 does the same. It does make sense if you're worried about changes to your database schema spontaneously breaking previously working code.


No, I get that part. I'm talking more about building a database from models. It seems like these tools are designed to build the database scheme from the object models, which to me is just as bad as building the objects from the schema.

Ideally, we should use the declarative style of Django models and SqlAlchemy on the object, along with the scheme generation tools of Rails migrations.




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

Search: