Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Domain Model & Persistence

Name: Anonymous 2012-06-24 6:05

In a lot of ORM domain models are coupled along with the orm mapping and persistence layer. An example of such a thing is ActiveRecord. Say you have a Post domain model using ActiveRecord. It's as simple to do post.save and the model will be persisted. The problem with this is you may want your domain model to persist to different persistence layers such as a web service, cache, or file.

With the creation of server-side javascript you can create your domain models and share them on server side and client side. The problem is they use different persistence. I was looking at Backbone.js and their models are tightly coupled with the persistence layer so I would need two separate models for each persistence layer.

TL;DR Fuck ActiveRecord

Name: Anonymous 2012-06-25 4:45

users.select(and_(users.c.age < 40, users.c.name != 'Mary'))
Is that Python?  I wonder how it works without source file preprocessing.

Because both arguments of and_ will be evaluated to bool values before being passed due to Python's applicative order of evaluation.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List