Solution
I don't think that JavaScript is capable of composing such object-oriented software. As far as I know there are no such things like private fields or interfaces in JavaScript. I might be wrong, but I haven't figured out how to make these things in JS without lot of tweaking and hacking.
Yeah, that would be cool. I think a lot of people would be interested in this 😀
FYI, TypeScript examples for design patterns are on the way. I think I might even be able to upload them by the end of this month.
At this point, we have a complete set of conceptual examples for all patterns in TS that demonstrate the essence of patterns, their structure, etc. I plan to add another set of real-world examples inspired by the real applications written in TS a little bit later.
Hi, I was also wondering how some patterns could be implemented by plain JavaScript and came across some website. There are eloquent javascript examples for all set of patterns mentioned in the book. https://www.dofactory.com/javascript/adapter-design-pattern
I would not say that all of them give best illustration how to use it in real projects but as examples how it could be technically implemented in javascript are good enough.
Service d'assistance aux clients par UserEcho
Good news, everyone! TypeScript examples are ready!