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

I've been using the delegation pattern a lot lately as a nice way to combine the best bits of god classes (few dependencies) with the best of SRP (small easy to test parts).

This way A, B, C (and many others) only depends on X, the delegator (which exposes a number of interfaces for practically everything), but X depends on everything and the kitchen sink, X contains no real functionality.



"Delegator". Now I know what to call it :)




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

Search: