News for hackers. Stuff that matters.
Re:OOP Is Dead, Long Live OOP by spdionis on Thursday October 18, 2018 @06:28PM (#18252741)
Active Record should be considered an anti-pattern and is definitely in violation of single responsibility at the least.

Myself, I wouldn't even put any business logic in the User object, except maybe representational logic (e.g. have a couple of helper methods that return multiple representation of the same piece of data).

One of the best things to do is separate behavior from data in the first place, which feels kind anti-OO philosophy, but is definitely easier to reason about and work with.

There are no comments on this comment yet.