Sunday, July 13, 2014

Chain Of Responsibility Design Pattern (Minus the repeated codes)

Last week, I studied Chain Of Responsibility Design Pattern. It was a good design pattern, but from the sample codes that I had seen, one common thing is that there are lots of duplicated codes. I would like to improve these and here are my main goals:
- As much as possible, eliminate or minimize the repeated codes.
- The concrete classes must not worry about the successor as much as possible and must not contain if else statements to call the successor's methods in case the caller can not perform the operation.
- If the additional logic statements for handling of next successor will be removed from the concrete classes, it will be easier to reuse those concrete classes.

I uploaded the code on my github. Link

1 comment:

  1. 888 Casino Hotel Las Vegas, NV - MapYRO
    888 Casino Hotel Las Vegas 고양 출장샵 · 888 Casino Hotel Las Vegas (Uncasville, NV). 888 Casino Hotel Las Vegas · 양산 출장샵 888 Casino Hotel Las 수원 출장마사지 Vegas  Rating: 경기도 출장마사지 2.3 · ‎220 reviews · ‎Price range: 전라남도 출장안마 $$

    ReplyDelete