Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Command Pattern in the TreeList Class #128

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

JGeanca
Copy link

@JGeanca JGeanca commented Jul 5, 2023

This pull request proposes an improvement to the TreeList class by implementing the Command pattern. Currently, the TreeList class has multiple responsibilities, including receiving user input and executing corresponding actions based on that input. This leads to a high degree of coupling. To address these issues, this improvement suggests moving the user action methods from the TreeList class to concrete Command classes that inherit from the Abstract Command interface. The handle_key method in TreeList will no longer directly execute the actions but instead call an Invoker, which will receive and execute the command. This decouples the user actions from the TreeList class and promotes better separation of concerns.

Current design:
mejora5-antes

Design proposed in the PR:
mejora5-despues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants