Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very good point. I would say that if your object is doing e.g. validation, or if/then/else'ing on field values to normalize them somehow, it's already far from anemic. But the key point is that you should not put data in objects, and then put the business logic, as in the small code sample, into some routine that simply accesses fields. That's the anti-pattern.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: