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

Abstract factory implementation #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

libasoles
Copy link
Owner

Abstract Factory can implemented in several ways:

  • Abstract Factory being a concrete class (as in the book).
  • Abstract Factory being actually abstract (as in this PR).
  • A single Abstract Factory with methods receiving a param, and using conditional or a dictionary instead of multiple concrete factories (see the smalltalk example in the book).

I decided to make it abstract because I always want to use a theme.

also, note I'm not implementing logic in the concrete products because the book neither do that.

@libasoles libasoles force-pushed the abstract-factory branch 2 times, most recently from 60a8fdb to 6113a5d Compare July 19, 2020 22:47
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.

1 participant