Re:How to make your code imply responsibilities
by jxf on Monday October 21, 2013 @10:06AM
(#6585586)
Right now, you might have something like:
Segregating the responsibilities might look something like:
Now you can just invoke "homepage.renderHeader()", instead of, say, 5 different methods that conditionally decide what should go in the header.
[ Parent
| on HN ]
There are no comments on this comment yet.