Open SilasReinagel opened 6 years ago
This counts as business case or application logic, right?
@vivekimsit What is "application logic"? Does such a thing exist?
From my experience we try to separate object's core behaviour, are these core behaviours of the objects?
Depends on how it is architected. If an Object makes his own decisions, then it would seem to be a core trait of the Account himself.
Wouldn't separating out various behaviors of an Account and putting them elsewhere de-objectify the Account?
Yes, that was more of a question than answer from me, understanding this thing is most important for me because I get confused where to draw that boundary i.e. how much behaviour should go into an object?
This is what i meant about abstracting the architecture from the object. Right now, the behavior that falls within the domain of an object (account type stuff) needs to be done by some kind of an account. If the behavior is less core than it should go into a decorator.
The architecture / business logic is inside the ticket and needs to come out.
Ticket a. Account
Ticket b. Business logic
This can be modelled as Account having Policies. You can break this into two tickets if needed.
Account should have Overdrafts disabled by default. If Overdrafting is disabled, the Account Balance should never drop below 0. If Overdrafting is enabled, the Account Balance can be any value. A user should be able to enable Overdrafting. A user should not be able to disable Overdrafting while he has a negative balance.