Code Monkey home page Code Monkey logo

design_patterns's People

Contributors

me115 avatar oxwsds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

design_patterns's Issues

简单工厂模式有一行日志错误了

`
ConcreteProductA::ConcreteProductA(){

}

ConcreteProductA::~ConcreteProductA(){

}

void ConcreteProductA::Use()
{
cout << "use productB" << endl; // use productA
}
`

组合模式貌似没有

受益匪浅。
阅读过程中发现结构型模式中提到的“组合模式”重要度比较高却没有提到,
是否有何考量?
谢谢!

[Observer Pattern] Missing file in source code

Greetings,

In your demo source code, there is a file called "ConcreteSubject.h" in your main.cpp, however, the file is missing on your web page (existing in your code directory)
cheers

is Obeserver typo?

Great job! Just a small issue on the spelling "Obeserver"

In behavior/observer design pattern, I realized the word "Obeserver" often uses in code and your diagram. I am not sure what's your intention, it may be a misspelling.

cheers

帮助很大,感谢

你对这些模式的总结写的太好了,方便问下,什么时候有时间给剩余补全呢。感谢~

关于装饰模式

下面这张图没看明白

Decorator: 抽象装饰类 与 Component: 抽象构件,为什么还有一个泛化关系?
不是只有一个聚合关系么?

http://design-patterns.readthedocs.io/zh_CN/latest/structural_patterns/decorator.html

继承关系,实现关系

自行车是车 是继承关系
小汽车和自行车;它们之间的关系为实现关系.使用带空心箭头的虚线表示;
但是怎么是虚线连接车,而不是 小汽车和自行车 之间连接

类图讲解错误

看懂UML类图和时序图

小汽车与发动机之间是组合关系,使用带实心箭头的实线表示;

没有汽车,发动机也可以独立存在,汽车与发动机应该是聚合关系。同理,汽车和轮胎也是聚合关系。

我参考的这篇文章上的内容the-class-diagram

创建模型-建造者模型中的一个问题

你给的设计模式文档非常的清晰,比GOF的设计模式容易阅读,又比设计模式之禅容易理解,感谢你的分享.
在学习过程中,对于创建者模型-建造者模型的这一部分代码有一个疑问:Builder接口类修改为只提供标准接口,不带任何实现,具体的实现让ConcreteBuilder去完成,如下:
class Builder
{
public:
Builder();
virtual ~Builder();

virtual void buildPartA() = 0;
virtual void buildPartB() = 0;
virtual void buildPartC() = 0;
virtual Product * getResult() = 0;

};
是否更好一些呢.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.