Goodreads helps you keep track of books you want to read.
Start by marking “JavaScript Patterns” as Want to Read:
JavaScript Patterns
Enlarge cover
Rate this book
Clear rating
Open Preview

JavaScript Patterns

by
4.18  ·  Rating details ·  1,533 ratings  ·  66 reviews
What's the best approach for developing an application with JavaScript? This book helps you answer that question with numerous JavaScript coding patterns and best practices. If you're an experienced developer looking to solve problems related to objects, functions, inheritance, and other language-specific categories, the abstractions and code templates in this guide are ...more
Kindle Edition, 236 pages
Published (first published September 1st 2010)
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about JavaScript Patterns, please sign up.

Be the first to ask a question about JavaScript Patterns

This book is not yet featured on Listopia. Add this book to your favorite list »

Community Reviews

Showing 1-30
Average rating 4.18  · 
Rating details
 ·  1,533 ratings  ·  66 reviews


More filters
 | 
Sort order
Start your review of JavaScript Patterns
Rob
Oct 25, 2010 rated it really liked it  ·  review of another edition
Recommends it for: would-be intermediate and intermediate JavaScript developers looking for more sophistication
Shelves: own, 2010, javascript
If you're a JavaScript developer, you would be wise to have this on your bookshelf--nestled nicely between JavaScript: The Good Parts and High Performance JavaScript . The three make a nice little troika.

And read them in that order: The Good Parts, Patterns, and then High Performance.

Here's why:

What Stefanov gives us with this book is effectively an overview [†] of best practices for JavaScript development, going over the benefits and gotchas of certain important language features, and
...more
Adrian Li
Dec 23, 2016 rated it really liked it  ·  review of another edition
This is a good book and most people who work with Javascript should spend at least a couple hours going through it. But there is a caveat: it is old.

This book was published in 2010, and there are many things that are talked about, which we really don't have to worry about anymore. In this book, there are many IIFE examples that are no longer needed in the world of ES2015 and beyond (i.e. ESNEXT).

In any case, you need to read through this book in a smart manner. Don't force yourself to go through
...more
Greenicicle
So far I'm a little disappointed that practices like "write sensible comments" and "indent properly" are really listed as patterns, especially when the book claims to be targeted to professional devs. But I've still got a bunch of pages to go through.

UPDATE: Finished now. The title does not lie: the book is full of patterns. There is a focus on organizational patterns (object creation, inhheritance). Of these, there is a large variety of variants; mostly presented in an evolutionary chain the
...more
Johnny
Mar 17, 2014 rated it liked it
Only a small part of JavaScript Patterns is about design patterns. Much more pages are spent on best practices and the deployment story. While these parts are very useful, they may not be what you are looking for.
The Singleton pattern is a one example I like to pick to illustrate some of the problems with the book. In books about design patterns for other languages like Ruby that doesn’t have the concept of a Singleton, the explanation of the pattern is simply: Not supported here. In his book
...more
David Zukowski
Goodreads fix your broken UX please.
Kumanan Murugesan
Learning a lot of stuff from this book. Very interesting and very useful.
Harvey
Sep 09, 2017 rated it really liked it  ·  review of another edition
Shelves: programming
Some of the author's suggestions about how to handle loading of JS are getting quite dated, but the discussion of design patterns is still worth buying this book.
Dave Lorentz
Nov 27, 2017 rated it it was amazing  ·  review of another edition
Do not re invent the wheel! Patterns are a cornerstone of systems design and this book shows how they can be applied. I would like to see data access patterns added, especially now that HTML5 is so wide spread. But that does not take away from the good set of patterns described here.
Paul Pacurar
Sep 28, 2016 rated it it was amazing  ·  review of another edition
basics or not so basics, but anyone should know these patterns
Marcus
Mar 19, 2016 rated it it was ok  ·  review of another edition
Let me start by presenting my 'credentials' in the field - I have two decades of programming experience in different object-oriented languages, mainly in .NET platform and SQL. Most of the time I deal with client-server applications in Windows environment. Over last couple of years I started increasingly dabbling with HTML5 and JavaScript, a challenge which I admit freely is not very enjoyable to me mostly due to JavaScript's chaotic nature (in my opinion at least).
When I reached for this
...more
Rod Hilton
JavaScript Patterns was the first book that made me feel like I really *GOT* JavaScript. I've come away with a much greater appreciation for the language than I used to have, and I feel much more comfortable with the idiotmatic usage of the language.

The book, written by a Senior Yahoo! programmer, is more than just a "here is how to do the XYZ Design Pattern from the GOF book in JS" (though it has quite a bit of that at the end). It's really a book about patterns that have evolved out of
...more
Daniel R.
A grab bag of practices and techniques for JavaScript development for the core language and some browser specific concerns. The Essentials, Literals and Constructors, Functions, Object Creation Patterns, and Code Reuse Patterns chapters mostly rehash material from "JavaScript: The Good Parts". The author provides additional exposition on the concepts but doesn't introduce much new material. The Design Patterns chapter includes some good examples of JavaScript implementations but accurately ...more
David
Aug 18, 2011 rated it liked it  ·  review of another edition
This book covers a lot of different patterns, and is a useful tour. Even experienced programmers will likely learn patterns they haven't seen before. The author's commentary is thoughtful and helps the reader evaluate pros and cons, though I think the author is not sufficiently critical of weaker techniques. Many of them are fine for small programs but don't scale well for larger ones (i.e., are not very maintainable or extensible or automatically checkable).

The bigger problem is that, like
...more
Ryan Boone
Jan 19, 2015 rated it really liked it
Crucial source for JS developers

JS Patterns is a well-thought out and executed resource that introduces and explains many common, helpful patterns that modern-day web and app developers will find invaluable. Stefanov clearly explains the reasoning behind each pattern, common problems they solve, as well as usage examples and source code. This book is legendary among the JS community, and it's not hard to see why. I only wish this were more updated.

I would love to see some ES6 implementations,
...more
Anton Antonov
Oct 23, 2016 rated it really liked it  ·  review of another edition
Good JS design patterns book.

Before Addy Osmani's JS Design Patterns book, this book was my go-to choice.

The reason why I give it a 4/5 is that it's not as accessible as Addy Osmani's.

It starts as an uphill battle for newer JS developers looking into design patterns and some concepts are harder to get than in the later book.

Still a solid design patterns resource and definitely a go-to choice for people that are more experienced.
ifknot
Apr 06, 2016 rated it liked it  ·  review of another edition
Shelves: comp-sci
A good compliment to Crockford's book if a little less opinionated, and less entertaining as a consequence. Having been convinced by Crockford that Javascript is a different, functional language it is a bit surprising to then have Stefanov use a lot of space to show how to bend Javascript to mimic the traditional class based OOP model. The remainder is good and the patterns implementations useful but for the Singleton pattern - which, for many, is now regarded as an anti-pattern.
Sergiu Ciumac
Nov 04, 2012 rated it really liked it  ·  review of another edition
Nicely written book. Though, I would not consider programming JavaScript using practices and patterns from OOP. I find it as an overkill implementing Object Oriented patters in a language which was designed as an event-driven, and does not support the concept of classes. Moreover, I would consider this as an anti-pattern, as it introduces a lot of misconception and non-intuitive constructs.
Overall, it brought some interesting points about JS, though a lot of them are not useful.
Wout Mertens
Jun 07, 2011 rated it it was amazing  ·  review of another edition
In-depth review of patterns you'll need or encounter while writing JavaScript code. All patterns are clearly explained so that you understand their reason for existence as well as how to apply them yourself.

It's rather dry though, and expects a moderate familiarity with JavaScript so it should not be the first book you read when learning JavaScript.
Carl Ostberg
Oct 03, 2011 rated it really liked it  ·  review of another edition
I wish i remembered more parts of this. Redefining constructors during their construction to only do setup work once sounds handy. Preloading js for other pages is something i need to think about doing more. Mainly though this book is about what not to do, would probably want to refer to this again repeatedly while working to really internalize the lessons.
Dmitry Petrov
Nov 29, 2010 rated it really liked it  ·  review of another edition
Shelves: programming-read
The book introduces common solutions of problems that come into the view of every javascript developer starting from the code style and ending with realization of some OOP patterns. Information is not outdated and "JS patterns" will be a good choice if you do not need another language syntax description but want to figure out, how it works in the real world.
David Guaraglia
Feb 12, 2014 rated it it was amazing  ·  review of another edition
If you ever come from a different programming language into the world of modern Javascript, this book is a lifesaver as it introduces you to a number of patterns and 'common sense' conventions that have sprouted over the years as Javascript evolved into the powerful (if messy and difficult to modularize) language it is today.
Carl-Erik Kopseng
Quite comprehensive, but mindnumbingly boring. There are better intros to good JavaScript (see Test Driven JavaScript by Johansen), and there are few patterns besides best practices. The last bit has some good performance tips on preloading and lazy loading. Otherwise a definite waste of your time if you know your way around closures, ES5, and basic design patterns. Nothing new.
Nivesh
Feb 01, 2016 rated it it was amazing  ·  review of another edition
This book will help you explore the hidden secrets of JavaSript, along with letting light on the design patterns defined by the 'Gang of Four'.
Note: One is only qualified to read this book if one has read "JavaScript: The Good Parts" atleast 2 times, meaning concepts should be clear before reading it. It simply takes you to more higher level than you where before reading it.
Nikola
Jul 05, 2012 rated it it was amazing  ·  review of another edition
Shelves: development
Really great book - essential for everyone that wants to write maintainable and structured code. I picked it up because since I started writing more client-centric apps, I felt that my JS lacks organization and structure. This book showed me how things should be done.
Dan
Jun 06, 2014 rated it really liked it
A solid introduction to a variety of best practices in JavaScript. While the theoretical aspects are interesting (singleton implementation isn't really relevant), the book could've been even more concise without them.
Patkós Csaba
Dec 29, 2015 rated it really liked it  ·  review of another edition
Shelves: programming
Very good book to understand JS. It targets the novice programmer who already knows the syntax and basic programming. It has quite a few good tips and tricks but it doesn't dive into enough details about patterns for my taste. The object creation patterns are the gem of this book.
Illia Olenchenko
Jan 18, 2015 rated it really liked it  ·  review of another edition
I like part with patterns in the middle and a lot of parts in the beginning and the end. but from 260 pages realy usefull was only 120-160. And after reading find way to trane your new skills in live.
Bobiczdoh
Apr 04, 2015 rated it really liked it  ·  review of another edition
Very good book to read if you need some background in JavaScript.
It really helps to code your JavaScript library to be easy to use and extendable.
But the book is somewhat outdated. Full 'DOM and Browser patterns' part can be described as 'use jQuery/YUI/your_favourite_framework'.
Marshall Upshur
May 24, 2013 rated it it was amazing  ·  review of another edition
Great book, showing you some great patterns for regular JS development (modules, function constructors, etc), as well as some classic Gang of Four patterns in JS. Read straight through, but could also be used as a reference of sorts to get an idea on certain things and how they are done regularly.
Alex
Jul 15, 2014 rated it really liked it  ·  review of another edition
A tad bit old now, but still very relevant.

If you're coming over from another language this is an excellent book to read, it should help break the Classical shackles you may be wearing so you're free to adopt a prototypal way of thinking.
« previous 1 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • JavaScript: The Good Parts
  • JavaScript: The Definitive Guide
  • Eloquent JavaScript: A Modern Introduction to Programming
  • Secrets of the JavaScript Ninja
  • You Don't Know JS: Up & Going
  • Cracking the Coding Interview: 150 Programming Questions and Solutions
  • Clean Code: A Handbook of Agile Software Craftsmanship
  • You Don't Know JS: this & Object Prototypes
  • High Performance JavaScript
  • You Don't Know JS: Scope and Closures (You Don't Know JS, #2)
  • You Don't Know JS: Types & Grammar
  • Head First Java
  • Introduction to Algorithms
  • Head First Design Patterns
  • Code Complete
  • The Road to learn React
  • Pro Git
  • The Pragmatic Programmer: From Journeyman to Master
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »