Learning JavaScript Design Patterns and over 2 million other books are available for Amazon Kindle . Learn more

Sign in to turn on 1-Click ordering.
Trade in Yours
For a 7.00 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Image not available

Start reading Learning JavaScript Design Patterns on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Learning JavaScript Design Patterns [Paperback]

Addy Osmani

RRP: 26.99
Price: 22.13 & FREE Delivery in the UK. Details
You Save: 4.86 (18%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 10 left in stock (more on the way).
Dispatched from and sold by Amazon. Gift-wrap available.
Want it tomorrow, 26 April? Choose Express delivery at checkout. Details


Amazon Price New from Used from
Kindle Edition 11.63  
Paperback 22.13  
Trade In this Item for up to 7.00
Trade in Learning JavaScript Design Patterns for an Amazon.co.uk gift card of up to 7.00, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Book Description

30 Aug 2012 1449331815 978-1449331818 1

With Learning JavaScript Design Patterns, you’ll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-date with the latest best practices, this book is for you.

Explore many popular design patterns, including Modules, Observers, Facades, and Mediators. Learn how modern architectural patterns—such as MVC, MVP, and MVVM—are useful from the perspective of a modern web application developer. This book also walks experienced JavaScript developers through modern module formats, how to namespace code effectively, and other essential topics.

  • Learn the structure of design patterns and how they are written
  • Understand different pattern categories, including creational, structural, and behavioral
  • Walk through more than 20 classical and modern design patterns in JavaScript
  • Use several options for writing modular code—including the Module pattern, Asyncronous Module Definition (AMD), and CommonJS
  • Discover design patterns implemented in the jQuery library
  • Learn popular design patterns for writing maintainable jQuery plug-ins

"This book should be in every JavaScript developer’s hands. It’s the go-to book on JavaScript patterns that will be read and referenced many times in the future." —Andrée Hansson, Lead Front-End Developer, presis!

Frequently Bought Together

Learning JavaScript Design Patterns + JavaScript Patterns + JavaScript: The Good Parts
Price For All Three: 52.93

Buy the selected items together

Product details

More About the Author

Discover books, learn about writers, and more.

Product Description

Book Description

A JavaScript and jQuery Developer's Guide

About the Author

Addy Osmani is a Developer Programs Engineer at Google, working on tools for improving how developers create applications. He's also a member of the jQuery team where he assists with documentation and our learning site project. Some of his other OS work has included contributions to Modernizr and other similar projects. Personal projects include TodoMVC, which helps developers compare JavaScript MVC frameworks and jQuery UI Bootstrap. He also wrote 'Developing Backbone.js Applications' and 'Learning JavaScript Design Patterns' and occasionally tech review books like 'JavaScript Web Applications'. His personal blog is addyosmani.com/blog/.

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

There are no customer reviews yet on Amazon.co.uk.
5 star
4 star
3 star
2 star
1 star
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 3.9 out of 5 stars  9 reviews
23 of 27 people found the following review helpful
2.0 out of 5 stars like a curated blog post round-up, with some "phoned in" editing 16 Sep 2012
By R. Friesel Jr. - Published on Amazon.com
Addy Osmani's "Learning JavaScript Design Patterns" reads like a Greatest Hits album of blog posts--if someone made a Greatest Hits album of blog posts from JavaScript pedants. What I mean by that is that, if you're already widely reading JavaScript developer blogs, then it's unlikely that you will encounter anything new in here; however, if you're new to the subject matter, you're much more likely to find the text valuable. This makes the book something of a well-curated "round-up" of the best design pattern related blog posts, articles, and code demonstrations from the past couple years. And while this is probably the book's greatest strength, it's also the reason that people who are already familiar with Addy Osmani's work will wind up feeling disappointed; it comes off as something of a review, and if you've been following Osmani, then your expectations are probably pretty high.

Don't get me wrong, there *is* a highlight reel here. Osmani's pedagogical streak comes across in so many places--it's clear that he has a passion for this material, and that he is equally passionate about helping people develop their skills as front-end developers. Throughout the first eight chapters (which really should have just been merged into one), he does a fantastic job of defining what constitutes a pattern, of explaining why we (as front-end developers) should care about and study design patterns, and of what makes something an "anti-pattern". Chapter Nine (the "walking tour" of the Gang of Four patterns) has the right balance between discussing the theoretical details behind a given pattern, and an illustration of its practical application. The most critical follow-up to Chapter Nine is found in Chapter Twelve, which essentially takes jQuery and uses it as a case study for those design patterns in action. Lastly, you can think of Osmani as providing a curator's role with this book; there are many places in the text where he is citing work from others as either illustrating a particular facet of a design pattern, or else as building on it in some important way.

Unfortunately, I also think that the editorial staff (both the technical reviewers, and the copy editors) really phoned it in with this book. The heading levels within individual chapters do not always have a clear correspondence with the level of importance for that section; there are a few syntax errors in the code examples, some of which are easy to spot in the electronic version (because of syntax highlighting); and speaking of syntax highlighting, it's inconsistently applied throughout the text of the electronic edition.

The preface indicates that the book's target audience is intermediate level JavaScript developers, and while I mostly agree with that, there's also a non-trivial amount of text looking specifically at jQuery which makes me think "jQuery developer" and not "JavaScript developer". (That's *maybe* a bit of an unfair critique...)

Putting all of this together, I believe that if I were forced to choose, I would recommend Stoyan Stefanov's "JavaScript Patterns" over Osmani's "Learning JavaScript Design Patterns". Don't get me wrong: if your bookshelf as room for both, then it's worth it to explore both; each covers subject matter than the other does not, but in the places where they overlap, I find that Stefanov's book rings a little bit more rigorous. Osmani's book seems a bit more current with respect to citing specific technologies, but that also suggests to me that it will feel out-dated just a little more quickly.

(Full disclosure: I received an electronic copy of this book from the publisher in exchange for writing a review.)
2 of 2 people found the following review helpful
4.0 out of 5 stars Great book for applying Design Patterns using JavaScript 5 Oct 2012
By David Witherspoon - Published on Amazon.com
"Learning JavaScript Design Patterns" by Addy Osmani provides a great explanation of how to apply well known design patterns using JavaScript. The author does an excellent job of the format of explaining how the design pattern works, the pros and cons of the design pattern, and provides specific code examples of implementing the algorithm. You could almost say that the book is close to a cookbook, but it provides even more details about how the design pattern works than a typical cookbook would. I would not recommend this for the beginner or novice JavaScript developer due to the fact that some of the implementations of the design patterns might be difficult to follow. If you are an experienced JavaScript developer, then this would be a great book to get if you are looking at applying well known design patterns to your everyday solutions to solving problems. Personally, I am a big fan of design patterns due to the fact that they are proven solutions to problems and are easily understood by other people that understand design patterns. I really enjoyed Chapter 12 that explained design patterns in jQuery.

Overall, I feel that this book will help any JavaScript developer accelerate the quality of code that they produce by make it easier for other developers to understand what you are trying to achieve. Design patterns in any language help you express a solution to a problem and better communication with the rest of the developers in your group. Therefore, I would recommend this book for anyone that is interested in being a JavaScript developer or is a JavaScript developer and wants to take the level of code that they produce to the next level.
1 of 1 people found the following review helpful
3.0 out of 5 stars Quite hard to read but contains some unique content 25 Aug 2013
By Konstantin Solomatov - Published on Amazon.com
Format:Paperback|Verified Purchase
The book is quite hard to read because of many typos, un-gramatical sentences, incorrect code and other problems (the book definitely needs more proof reading and editing). Some sections, for example, section on the flyweight design pattern are impossible to understand.

However, the book has unique content which can't be found in any other book and blog posts and which is very valuable for any JS developer:
- Excellent overview of MV* patterns (Ch 10)
- Chapter on modular design patterns (Ch 11)
- JQuery plug-in design patterns (Ch 12)
- A large number of further reading links.

If you are a novice JavaScript developer, don't buy this book. It will be very hard to read for you. However, if you are intermediate or advanced developer who wants to improve your JS skills, the book is a must read, but be patient when you read the book, it's not the easiest read on the subject.
1 of 1 people found the following review helpful
4.0 out of 5 stars Learning JavaScript Design Patterns 24 Sep 2012
By J. W. Rine - Published on Amazon.com
Learning JavaScript Design Patterns, by Addy Osmani, examines object oriented software design and applies those design principles to the JavaScript language. A design pattern is a reusable solution to a commonly occurring problem in software development. They are flexible guides to best practices that developers implement in their applications. A design pattern is essentially a template for problem solving. While they are not exact solutions to a problem, a design pattern is a guide to a solution.

When web applications move beyond trivial into complex, object oriented programming can provide methods to organize and structure code. JavaScript design patterns can provide reuse-ability of code. Abstraction and encapsulation of code are two advantages to using design patterns in JavaScript. Using object oriented code produces a more modular code that is less likely to clash with other sections of code in the project. Modularity and encapsulation help to prevent an application from falling prey to becoming a mass of spaghetti code that is hard to debug and maintain.

I enjoyed the book's format. Early on the author explains design patterns in a historical context with code examples that relate to Javascript. Later, models and various frameworks are examined with links to additonal resources. The design patterns outlined in chapter 9 receive additonal examples in the chapter on jQuery. I would recommend the book for intermediate to advanced JavaScript coders. The material will not be useful for those with little experience or new to JavaScript.

Disclosure: I received a free e-book copy for review purposes.
3 of 4 people found the following review helpful
5.0 out of 5 stars Recommended read for any developer owrking with JavaScript 27 Sep 2012
By Hernan Garcia - Published on Amazon.com
I like to think about this book as 3 books in one. The first 8 chapters are dedicated to explore and explain patterns, their creation process. their utility and an insight into the pattern community.

The design patterns exploration start on chapter 9 while dedicating chapter 10 exclusively to the different flavors of Model View patterns.

If the book was only that I will be very happy, but (like in a Sunday morning infomercial, there is more!)

Chapter 11 is an in depth discussion of the different modules systems in use today, with an special emphasis on AMD

It depends on your knowledge of module systems, but even if you use them you may find some nuggets of information in there. I did.

Finally, the next two chapters are dedicated to design patterns in jQuery itself and exploring some of the patterns used for jQuery plug-in design.

You may find this last two chapters redundant but I think that the inclusion in the book is very wise, specially with how ubiquitous jQuery is today.
Were these reviews helpful?   Let us know

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category