Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Pro JavaScript Design Patterns: The Essentials of Object-Oriented JavaScript Programming First Edition
Purchase options and add-ons
As a web developer, you'll already know that JavaScript is a powerful language, allowing you to add an impressive array of dynamic functionality to otherwise static web sites. But there is more power waiting to be unlocked―JavaScript is capable of full object–oriented capabilities, and by applying object-oriented principles, best practices, and design patterns to your code, you can make it more powerful, more efficient, and easier to work with alone or as part of a team.
With Pro JavaScript Design Patterns, you'll start with the basics of object–oriented programming in JavaScript applicable to design patterns, including making JavaScript more expressive, inheritance, encapsulation, information hiding, and more. With that covered, you can kick–start your JavaScript development in the second part of the book, where you'll find detail on how to implement and take advantage of several design patterns in JavaScript, including composites, decorators, façades, adapters, and many more.
Each chapter is packed with real–world examples of how the design patterns are best used and expert advice on writing better code, as well as what to watch out for. Along the way you'll discover how to create your own libraries and APIs for even more efficient coding.
- Master the basics of object–oriented programming in JavaScript, as they apply to design patterns
- Apply design patterns to your kick–start your JavaScript development
- Work through several real–world examples
- ISBN-10159059908X
- ISBN-13978-1590599082
- EditionFirst Edition
- Publication dateDecember 17, 2007
- LanguageEnglish
- Dimensions7 x 0.67 x 9.25 inches
- Print length269 pages
Frequently purchased items with fast delivery
JavaScript: The Comprehensive Guide to Learning Professional JavaScript Programming (Rheinwerk Computing)PaperbackFREE Shipping by AmazonGet it as soon as Monday, Dec 8
JavaScript: The Definitive Guide: Master the World's Most-Used Programming LanguagePaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Dec 8
Learning JavaScript Design Patterns: A JavaScript and React Developer's GuidePaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Thursday, Dec 11Only 1 left in stock (more on the way).
Eloquent JavaScript, 3rd Edition: A Modern Introduction to ProgrammingPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Dec 8
JavaScript Programming for Beginners: Learn to Code with the Web’s Most Popular Language Through Hands-On Projects, Real-World Skills, and a Step-by-Step Beginner’s GuideSteven GatesPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Dec 8
Eloquent JavaScript, 4th EditionPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Dec 8
Editorial Reviews
About the Author
Product details
- Publisher : Apress
- Publication date : December 17, 2007
- Edition : First Edition
- Language : English
- Print length : 269 pages
- ISBN-10 : 159059908X
- ISBN-13 : 978-1590599082
- Item Weight : 1.24 pounds
- Dimensions : 7 x 0.67 x 9.25 inches
- Best Sellers Rank: #3,913,040 in Books (See Top 100 in Books)
- #347 in Object-Oriented Software Design
- #876 in JavaScript Programming (Books)
- #1,164 in Object-Oriented Design
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book well-explained, particularly praising its coverage of design patterns and OOP principles. Moreover, the code quality receives positive feedback, with one customer noting it successfully implements patterns in JavaScript. Additionally, the writing style is appreciated, with one review highlighting how it helps make code more scalable. Customers also value the book's user-friendly approach, making it suitable for both beginners and advanced developers.
AI Generated from the text of customer reviews
Select to learn more
Customers appreciate the code quality of the book, with one customer noting the clear code snippets and another mentioning how it improved their approach to JavaScript and coding.
"...Well structured and written, good, well explained and clear code snippets that, for the most part, can you copy/paste and use." Read more
"Everything is clearly explained, and the code is very useful. A very good framework to base an advanced project on." Read more
"...well, covers the content in a way that made sense, and helped me fall in love with javascript...." Read more
"...are an excellent review of OOP principles and how to successfully implement them in Javascript...." Read more
Customers find the book well-explained, with one customer highlighting its comprehensive coverage of OOP principles and another noting its framework-independent approach.
"Everything is clearly explained, and the code is very useful. A very good framework to base an advanced project on." Read more
"...Well structured and written, good, well explained and clear code snippets that, for the most part, can you copy/paste and use." Read more
"...The first six chapters are an excellent review of OOP principles and how to successfully implement them in Javascript...." Read more
"Great book and wonderful information about JavaScript. I'm trying to punish my brain with JavaScript knowledge." Read more
Customers appreciate the writing style of the book, with one mentioning its organized approach to clean JavaScript, while another notes that the descriptions are clear and helps make code more scalable.
"...Well structured and written, good, well explained and clear code snippets that, for the most part, can you copy/paste and use." Read more
"...of the patterns or concepts in your code, it will help make the code you write more scalable, extensible, and longer lasting." Read more
"...looking to learn and develop a well-structured and organized approach to writing clean Javascript...." Read more
"...Descriptions are written clearly and the code examples are copious...." Read more
Customers find the design patterns in the book well-explained, with one customer noting that they make implementation easier.
"I am better at design patterns, but still believe that my code itself is still trash. This book is user friendly from beginner to advanced...." Read more
"...The authors stick with mainstream, well-know patterns, nothing new, but they "translate" those patterns in JavaScript, offering working samples...." Read more
"...The rest of the book reads easy since the design patterns are explained well and then integrate different use-cases into each pattern's lesson...." Read more
"For any serious front end / JavaScript developer, Pro JavaScript Design Patterns is a must have!..." Read more
Customers find the book user-friendly, with one mentioning it is suitable for both beginners and advanced developers, while another notes it is easy to read.
"...The rest of the book reads easy since the design patterns are explained well and then integrate different use-cases into each pattern's lesson...." Read more
"...This book is user friendly from beginner to advanced. Highly recommend." Read more
"...It's framework independent so it's usable for all JS developers..." Read more
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on August 10, 2010Format: PaperbackVerified PurchaseMust warn the reader that I'm not a great JS hacker and probably only a decent engineer in general . . However, having seen (and probably written) quite a bit of hokey and shoddy code to get the job done, I'm hoping I've learned enough to distinguish the good from the bad.
With that being said . . I'd highly recommend this book for all the developers looking to learn and develop a well-structured and organized approach to writing clean Javascript. The first six chapters are an excellent review of OOP principles and how to successfully implement them in Javascript. The rest of the book reads easy since the design patterns are explained well and then integrate different use-cases into each pattern's lesson. Each chapter also has a succinct summary detailing when and how to apply the covered design pattern. Overall, I really enjoyed the book and feel like it's improved my approach to Javascript and coding.
- Reviewed in the United States on June 16, 2008Format: PaperbackVerified PurchaseBack in the early days Design Patterns examples mostly used C++ as language. This day Java is the typical choice, with an increasing amount of C#. Usually if you are familiar with any of those languages, porting the sample code to a different platform isn't that hard. Unfortunately JavaScript is quite a different beast, first of all is not class based, it's loosely typed, it doesn't support interfaces etc. JavaScript has a whole bunch of peculiarities that make it really hard to translate those Java/C# samples. That's why this book is really welcomed. The authors stick with mainstream, well-know patterns, nothing new, but they "translate" those patterns in JavaScript, offering working samples. I tend to disagree with them whenever they pretend to add interface-like functionality to JavaScript; yet, I think they made an excellent job, a book that can be really valuable if you do non-trivial work with JavaScript
- Reviewed in the United States on March 14, 2011Format: PaperbackVerified PurchaseLet me just say this up front--this book contains some advanced JavaScript techniques and code, and is not for the beginning or even intermediate JavaScript programmer. Even advanced practitioners may want to go back through for a second reading to ensure that all the concepts within are fully understood, especially when and how to use these patterns, as well as the advantages and disadvantages of each in context of the JavaScript implementations. Here we have two advanced authors, one from Google (Dustin Diaz), the other from Yahoo! (Ross Harmes), who have extensive experience building large-scale JavaScript-based API systems. They present 12 design pattern implementations in JavaScript, with examples of how each could be used, as well as the important core concepts of interfaces, encapsulation, information hiding, inheritance and chaining. Even if you only come away from the book learning and implementing one of the patterns or concepts in your code, it will help make the code you write more scalable, extensible, and longer lasting.
- Reviewed in the United States on June 28, 2010Format: PaperbackThere are some good ideas in this book, and it's worth a quick read, but it is desperate need of strict editing. Some of the concepts are implausible or even harmful, and many of the code examples contains typos that prevent them from being run as shown.
- Reviewed in the United States on May 1, 2014Last week I finished reading it and I just wanted to say how much I enjoyed it. Well structured and written, good, well explained and clear code snippets that, for the most part, can you copy/paste and use.
- Reviewed in the United States on October 12, 2011Format: PaperbackVerified PurchaseFor any serious front end / JavaScript developer, Pro JavaScript Design Patterns is a must have! Descriptions are written clearly and the code examples are copious. If you think you know design patterns in JavaScript, get the book anyway - it will make implementing patterns even easier.
- Reviewed in the United States on May 12, 2015For those who are interested in OOP javascript this is one of the best books.
- Reviewed in the United States on April 9, 2021Format: PaperbackVerified PurchaseI am better at design patterns, but still believe that my code itself is still trash. This book is user friendly from beginner to advanced. Highly recommend.
Top reviews from other countries
KaonashiReviewed in the United Kingdom on February 17, 20175.0 out of 5 stars Five Stars
Format: PaperbackVerified PurchaseGreat book
Kindle CustomerReviewed in Australia on September 28, 20205.0 out of 5 stars Superb
Format: PaperbackVerified PurchaseYears after, this book is still very relevant .
A no nonsense approach to Design patterns in JavaScript ,I'll highly recommend
-
Motoki014Reviewed in Japan on July 10, 20094.0 out of 5 stars 面白い
Format: PaperbackVerified PurchaseJavaScriptは、ホームページ作成だけでなく、業務システムでも利用されています。
業務の画面表示仕様に則って、コーディングしていくうちに、とてつもなく巨大なスクリプトファイルが出来ており、保守担当者が悲鳴を上げているのをよく目にしました。
そこで、JavaScriptの可読性を上げるにはどうすれば良いか?と考えた時に、この本に出会いました。
この本は、JavaScriptを見事にオブジェクト指向にしており、Gofデザインパターンへの適応を行っています。
この本のサンプルは、本に記載のHPからすべてダウンロードすることができます。
CHAPTER2のInterfaceの章は、オブジェクト指向言語のInterfaceをJavaScriptで実現しようと試行錯誤が伺えました。
実装クラスがInterfaceのメソッドを定義しているか、というのは、他の”言語”はコンパイラによって判断されますが、Javascriptは自分でチェックロジックを作るしかありません。
このCHAPTERを読んでいて、果たしてJavaScriptでInterfaceを作るメリットが・・・というキーワードが浮かんできてしまいました。
#チェックロジックを書く労力の割に、効果がないですね
このペースで全CHAPTERの感想を書くと長くなるので・・・
[CHAPTER6 Chaining][CHAPTER9 THE COMPOSITE PATTERN]は非常に参考になりました。
その他のCHAPTERは、Ajaxのコンポーネントを作成する様な方が見ると非常に参考になると思います。
#実際には、オープンソースのコードを読んで理解した方が良いと思いますが・・・
本書を読んで、冒頭に登場した「保守担当者の悲鳴」は、解決できそうにありませんでした(笑)
この技術を取り入れるには、オブジェクト指向且つ、JavaScriptのエキスパートがいないと難しそうなので、業務システムの実用は、プロジェクトに参画する要員のスキルに依存しそうです。
私と同じ問題を抱えていて、期待を胸に本書にたどり着いた人にはおすすめできません(笑)
オープンソースのAjaxコンポーネントをカスタマイズしたい、Ajaxコンポーネントを作りたい人におすすめと思いました。
HatoReviewed in Germany on May 2, 20095.0 out of 5 stars The book I was waiting for
Format: PaperbackVerified PurchaseThis book shows in an excelent way, how to realize well known object oriented patterns with JavaScript. It gives exsamples and explains in detail the differences between prototypical and classical inheritance. There are some very helpfull functions delivered for e.g. Interface simulation, extending or augmenting classes, which can be reused in own projects.
I can recommend the book to experienced JS programmers and developers who are experienced in object orientation with other programming languages and design patterns. Nothing for beginners but great for experts!
SegunReviewed in the United Kingdom on September 20, 20104.0 out of 5 stars Pro JavaScript Review
Format: PaperbackVerified PurchaseThe level of JavaScript required on some project I was working on made me feel very dumb, this book was recommended, I bought it, read only the first few chapters and felt less dumb right away, especially as it said 'not knowing that level of JS does not mean you are dumb'. I've not gotten past those chapters by the way, I hope to do so at some point though.




