{"id":961,"date":"2011-01-31T18:58:12","date_gmt":"2011-01-31T22:58:12","guid":{"rendered":"http:\/\/patorjk.com\/blog\/?p=961"},"modified":"2014-01-25T17:50:07","modified_gmt":"2014-01-25T21:50:07","slug":"javascript-patterns-book-review","status":"publish","type":"post","link":"https:\/\/patorjk.com\/blog\/2011\/01\/31\/javascript-patterns-book-review\/","title":{"rendered":"&#8220;JavaScript Patterns&#8221; Book Review"},"content":{"rendered":"<p><figure id=\"attachment_962\" aria-describedby=\"caption-attachment-962\" style=\"width: 180px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.amazon.com\/JavaScript-Patterns-Stoyan-Stefanov\/dp\/0596806752\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/patorjk.com\/blog\/wp-content\/uploads\/2011\/01\/js_patterns.png\" alt=\"\" title=\"JavaScript Patterns\" width=\"180\" height=\"236\" class=\"size-full wp-image-962\" \/><\/a><figcaption id=\"caption-attachment-962\" class=\"wp-caption-text\">JavaScript Patterns<\/figcaption><\/figure> I went on my honeymoon recently and decided to pick up some reading for the plane ride*. The book <a href=\"http:\/\/www.amazon.com\/JavaScript-Patterns-Stoyan-Stefanov\/dp\/0596806752\/\">JavaScript Patterns<\/a>** piqued my interest after seeing it on <a href=\"http:\/\/blog.reybango.com\/2010\/12\/15\/what-to-read-to-get-up-to-speed-in-javascript\/\">this list<\/a> of useful JavaScript books, so I decided to check it out.<\/p>\n<p>The book&#8217;s aim is to provide useful techniques and abstractions (coding patterns), best practices, and approaches for implementing popular <a href=\"http:\/\/en.wikipedia.org\/wiki\/Design_patterns\">design patterns<\/a> for the mid-level to advanced JavaScript developer. However, its main focus is on coding patterns. After introducing JavaScript and going over some basic concepts, the author launches into a chapter on best practices, which covers a grab bag of topics, everything from naming conventions to loop optimization to writing API docs. This chapter was actually where I first learned of <a href=\"http:\/\/developer.yahoo.com\/yui\/yuidoc\/\">YUIDoc<\/a> and <a href=\"http:\/\/jsdoc.sourceforge.net\/\">JSDoc<\/a>, two great tools for generating API documentation for JavaScript code.<\/p>\n<p>After that follow the chapters on coding patterns. The author goes over various subjects and explains techniques that will make you a better developer. Techniques like enforcing new when you define constructor function, the module pattern, self-defining functions, etc. Some of it you may already know, but it&#8217;s a good collection coding patterns.<\/p>\n<p>The book finishes up with a chapter on implementing common design patterns in JavaScript (it covers: Singleton, Factory, Iterator, Decorator, Strategy, Facade, Proxy, Mediator, and Observer) and a chapter on working with the DOM. If your main interest is in learning design patterns, I&#8217;d probably recommend <a href=\"https:\/\/patorjk.com\/blog\/2010\/06\/01\/pro-javascript-design-patterns-book-review\/\">Pro JavaScript Design Patterns<\/a> instead, since it&#8217;s main focus is design patterns and it devotes more time to explaining them and giving examples, however, if you&#8217;re already somewhat familiar with them and you have a decent understanding of how OOP works in JavaScript, than I would pick this book up instead as it cover more ground and is faster paced.<\/p>\n<p>Overall I really enjoyed this book and learned a lot of useful tid bits from it. I&#8217;d recommend picking it up if you&#8217;re looking write better JavaScript code and to fine tune the techniques you know about JavaScript.<\/p>\n<p>* The other books I read were <a href=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/Fahrenheit_451\">Fahrenheit 451<\/a> (it was ok) and <a href=\"https:\/\/secure.wikimedia.org\/wikipedia\/en\/wiki\/The_Martian_Chronicles\">The Martian Chronicles<\/a> (excellent book).<br \/>\n** Non-referral link, just so you all don&#8217;t think I&#8217;m trying to sell you books.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I went on my honeymoon recently and decided to pick up some reading for the plane ride*. The book JavaScript Patterns** piqued my interest after seeing it on this list of useful JavaScript books, so I decided to check it out. The book&#8217;s aim is to provide useful techniques and abstractions (coding patterns), best practices, &hellip; <a href=\"https:\/\/patorjk.com\/blog\/2011\/01\/31\/javascript-patterns-book-review\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">&#8220;JavaScript Patterns&#8221; Book Review<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,21],"tags":[],"class_list":["post-961","post","type-post","status-publish","format-standard","hentry","category-book-reviews","category-javascript"],"_links":{"self":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/comments?post=961"}],"version-history":[{"count":17,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/961\/revisions"}],"predecessor-version":[{"id":1117,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/961\/revisions\/1117"}],"wp:attachment":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/media?parent=961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/categories?post=961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/tags?post=961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}