News for hackers. Stuff that matters.
Re:Keep Your ORM Out of my Controller by misterbwong on Thursday August 26, 2010 @12:29PM (#1636398)
I think the author needs to make a clearer distinction between business logic and view logic. I'm an advocate of creating a view model layer above the traditional model containing things like sorting and field suppression, etc.

The app stack might look like this: DB -> ORM -> BizLogic -> ViewLogic -> View

This has the effect of decoupling actual business logic (i.e. get me every british author) from view logic (i.e. sort them by name in my table) and allows the design to be more flexible in the future.

There are no comments on this comment yet.