Haki Benita
1 min readJan 4, 2019

--

Sure think, I’m always up for a good discussion.

Another reason described in this article that you might consider when implementing validations, is that some validations require locks on the object, or they might have side effects (such as logging or audit).

I always prefer having properly defined access methods for common operations such as create and delete. For update, I usually never work directly on the object it self, only via a well defined access method implemented as classmethods. Why classmethods? it can handle validation, locking an side effect well.

Take this article for example, deposit and withdraw are updating the instance. You could have implemented the same logic using update.

--

--