In this article, we have succeeded in building up a remote service
manager application. By introducing the Chain of Responsibility design pattern
and reasonably applying the Template Method pattern, we have not only removed the
switch branch sentence in the original design, but guaranteed code reusing as
much as possible. Although, in this simple service manager application, we have
not provided more extension points to enhance the system for the future and the
introduction of the both patterns above have not shown apparent privileges, the
whole design seems elegant and filled with the beauty of design.
On the other hand, purely for the sake of showing off the beauty
of design and increasing the complexity of design seems "concentrating on too
many details with excessive design." But, put in the larger application environment,
the design of the latter doubtless has more general use.
Therefore, to weigh whether a design is an "excessive
design" or not needs to be evaluated and analyzed deliberatively and from
several angles. In the practical scenarios, with the help of the design
patterns we are probable to establish better designs. However, whether it is
indeed necessary to introduce the related design patterns depends upon the
facts in the end.