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

PR_2_Structural_Design_Pattern(Bridge_Pattern) #159

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SwithinTan
Copy link

@SwithinTan SwithinTan commented Apr 15, 2021

LanguageDetector class in the file detect_language.py is split into three parts according to its methods, then we apply the Bridge design pattern to reorganize the function structure and main() method to instantiate the object and output our customized result.
Benefits: Decouple the abstraction and implementation parts. The implementation is also changed dynamically at run time and the extensibility of abstraction and implementation is improved. If we want to change the detecting marks or change the output format we can modify those classes directly.

@SwithinTan SwithinTan changed the title PR2 PR_2_Structural_Design_Pattern(Bridge_Pattern) Apr 15, 2021
@SwithinTan SwithinTan closed this Apr 20, 2021
@SwithinTan SwithinTan deleted the PR2 branch April 20, 2021 13:30
@SwithinTan SwithinTan restored the PR2 branch April 20, 2021 13:32
@SwithinTan SwithinTan reopened this Apr 20, 2021
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.

None yet

1 participant