Pro JavaScript Design Patterns: The Essentials of Object-Oriented JavaScript Programming
C**L
Not for the faint at heart, but very important core concepts
Let 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.
F**O
Valuable if you do non-trivial work with JavaScript
Back 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
A**R
Great read
Must 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.
M**O
Better at design patterns
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. Highly recommend.
B**E
Pro JavaScript Design Patterns is a must have...
For 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.
C**R
Good ideas, but needs another round of editing
There 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.
D**E
... interested in OOP javascript this is one of the best books.
For those who are interested in OOP javascript this is one of the best books.
V**A
Good Useful Read
Last 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.
K**R
Superb
Years after, this book is still very relevant .A no nonsense approach to Design patterns in JavaScript ,I'll highly recommend
K**I
Five Stars
Great book
H**O
The book I was waiting for
This 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!
M**4
面白い
JavaScriptは、ホームページ作成だけでなく、業務システムでも利用されています。業務の画面表示仕様に則って、コーディングしていくうちに、とてつもなく巨大なスクリプトファイルが出来ており、保守担当者が悲鳴を上げているのをよく目にしました。そこで、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コンポーネントを作りたい人におすすめと思いました。
S**N
Pro JavaScript Review
The 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.
Trustpilot
1 month ago
1 week ago