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

a minor typos #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/design/Factory Pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ console.log(boss)

工厂方法模式跟简单工厂模式差不多,但是把具体的产品放到了工厂函数的`prototype`中

这样一来,扩展产品种类就不必修改工厂函数了,和心累就变成抽象类,也可以随时重写某种具体的产品
这样一来,扩展产品种类就不必修改工厂函数了,核心类就变成抽象类,也可以随时重写某种具体的产品

也就是相当于工厂总部不生产产品了,交给下辖分工厂进行生产;但是进入工厂之前,需要有个判断来验证你要生产的东西是否是属于我们工厂所生产范围,如果是,就丢给下辖工厂来进行生产

Expand Down