Hacker News new | past | comments | ask | show | jobs | submit login

> And that is objectionable because of putting too much of a burden on people writing controller logic, because of separation of concerns, etc.

No, the controller needs to be aware of a method of creating new services. Depending on the specific language and other constraints, that might be a factory function passed into the controller's constructor, a factory object passed into the controller's constructor, a refernce to a service locator object, or some other mechanism. Specific direct knowledge of the DAO class is generally neither necessary nor desirable.




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

Search: