Code AnalysisBeginner 60s
Anemic model allows invalid state
Consider this model:
class Order {
public status: string;
public items: Item[];
public total(): number { return sum(this.items); }
}
// service does:
order.status = 'SHIPPED';
order.items = []; // empty shipped order
What architectural problem does this anemic model exhibit?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.