We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
这个不是工厂方法吧老师,我最近学设计模式比较糊涂,有不理解的地方, 工厂方法的关键不是对不同产品提供不同的工厂吗, 所以我感觉 CouponCommodityService 在工厂方法中的身份应该是 实例工厂吧,但是我看您吧 StoreFactory 作为工厂了,我对这一点比较迷糊,这样就偏向简单工厂了吧,抽象工厂还有一个特点是解决了简单工厂再增加产品时,需要修改工厂类的代码,违反开闭原则的问题,示例代码我感觉同样有这个问题, 初学者看到这里特别迷,希望老师能看帮我解惑,谢谢老师。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这个不是工厂方法吧老师,我最近学设计模式比较糊涂,有不理解的地方,
工厂方法的关键不是对不同产品提供不同的工厂吗, 所以我感觉 CouponCommodityService 在工厂方法中的身份应该是 实例工厂吧,但是我看您吧 StoreFactory 作为工厂了,我对这一点比较迷糊,这样就偏向简单工厂了吧,抽象工厂还有一个特点是解决了简单工厂再增加产品时,需要修改工厂类的代码,违反开闭原则的问题,示例代码我感觉同样有这个问题, 初学者看到这里特别迷,希望老师能看帮我解惑,谢谢老师。
The text was updated successfully, but these errors were encountered: