In the command pattern:
Why shouldn’t the client participant be the same class as the invoker participant? Is there possible scenarios when the client participant and the invoker participant can be the same class?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Biggest reason is that it violates the single responsiblity principle. The Client participant and Invoker particpant both have individual responsibilties and a change to one will affect the other.