design_patterns_in_typescript
design_patterns_in_typescript copied to clipboard
Hello! Prototype Pattern is right?
I think prototype pattern is reduce resource consumption.
UseObject.create(Prototype.prototype) wouldn't it be better?
I think prototype pattern is reduce resource consumption. Use
Object.create(Prototype.prototype)wouldn't it be better?
That's what I thought.Sometimes,clone a object is more efficient than new,so we can use Prototype Pattern
I think prototype pattern is reduce resource consumption. Use
Object.create(Prototype.prototype)wouldn't it be better?That's what I thought.Sometimes,clone a object is more efficient than new,so we can use Prototype Pattern
Wow, Time is getting too fast! I think this example actually is the factory pattern...
I think prototype pattern is reduce resource consumption. Use
Object.create(Prototype.prototype)wouldn't it be better?That's what I thought.Sometimes,clone a object is more efficient than new,so we can use Prototype Pattern
Wow, Time is getting too fast! I think this example actually is the factory pattern...
yes,it is a factory pattern.And i write the ptototype pattern demo like this https://github.com/jacksplwxy/DesignPatterns_TypeScript/blob/master/src/Prototype%EF%BC%88%E5%8E%9F%E5%9E%8B%EF%BC%89/demo.ts.
I think prototype pattern is reduce resource consumption. Use
Object.create(Prototype.prototype)wouldn't it be better?That's what I thought.Sometimes,clone a object is more efficient than new,so we can use Prototype Pattern
Wow, Time is getting too fast! I think this example actually is the factory pattern...
yes,it is a factory pattern.And i write the ptototype pattern demo like this >https://github.com/jacksplwxy/DesignPatterns_TypeScript/blob/master/src/Prototype%EF%BC%88%E5%8E%9F%E5%9E%8B%EF%BC%89/demo.ts.
I done it with Typescript at last year too 原來你也是華人呢! https://github.com/unnhao/IT30Days/tree/master/Day10