[sqlalchemy] Re: Should we separate business logic and ORM mapping classes.

2009-04-13 Thread Nebur
A good question. I think we agree that both ways can work well... Usually, I do prefer the less OO style. In your example, a pure mapping class and business logic in a user manager. The main reason is that what you call OO style seems to enforce a lot of arbitrary decisions. For example, when

[sqlalchemy] Re: Should we separate business logic and ORM mapping classes.

2009-04-13 Thread az
i would bundle them into one... but would probably split on another level. adding items to a user may well be posessions... so it depends. That might well be a model of User with related stuff, which is mapped to database in another way (one2many or Relator object/m2m or whatever), and is