design-patterns-JS icon indicating copy to clipboard operation
design-patterns-JS copied to clipboard

Where do I learn the implementation of these patterns?

Open marcofugaro opened this issue 9 years ago • 3 comments

I wanted to learn these pattern, but not coming from anther language where those pattern are more common, it's really hard for me knowing when and how to use those with really basic examples.

Do you know of any more "real-world" examples of the patterns?

marcofugaro avatar Apr 20 '17 15:04 marcofugaro

this is a really good question. I hope there are some senario describe in code comment.

zapkub avatar May 04 '17 13:05 zapkub

I always recommend Head First Design Patterns (it's used as a textbook in many CS and SE curriculums and is exclusively Java in the book) or if you can't find or are unable to purchase the book, I recommend: https://sourcemaking.com/design_patterns

Each of the patterns on their site has a bunch of example code in different languages.

GlitchedMythos avatar Jul 10 '17 14:07 GlitchedMythos

@marcofugaro I think I have exactly what you are looking for because I worked on this topic last year. I covered most design patterns (especially GoF ones), in two flavors (classic & idiomatic). I also implemented all of them in ES5, ES6, CoffeeScript and TypeScript. For each design pattern, you get a real-world example with a synopsis, a problem and a solution including a UML diagram. If you think it might be useful to you, please take a look at my repo: PatternifyJS.

(Given the popularity of Felipe's repo, I am wondering if it was not a terrible mistake to choose such an obscure name for my own repo. I will probably change it to make it more explicit...)

Badacadabra avatar Aug 25 '17 23:08 Badacadabra