JavaScript Patterns
Build Better Applications with Coding and Design Patterns
Publisher: O'Reilly Media
Final Release Date: September 2010
Pages: 236

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 ideal—whether you're using JavaScript to write a client-side, server-side, or desktop application.

Written by JavaScript expert Stoyan Stefanov—Senior Yahoo! Technical and architect of YSlow 2.0, the web page performance optimization tool—JavaScript Patterns includes practical advice for implementing each pattern discussed, along with several hands-on examples. You'll also learn about anti-patterns: common programming approaches that cause more problems than they solve.

  • Explore useful habits for writing high-quality JavaScript code, such as avoiding globals, using single var declarations, and more
  • Learn why literal notation patterns are simpler alternatives to constructor functions
  • Discover different ways to define a function in JavaScript
  • Create objects that go beyond the basic patterns of using object literals and constructor functions
  • Learn the options available for code reuse and inheritance in JavaScript
  • Study sample JavaScript approaches to common design patterns such as Singleton, Factory, Decorator, and more
  • Examine patterns that apply specifically to the client-side browser environment
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyJavaScript Patterns
 
4.4

(based on 11 reviews)

Ratings Distribution

  • 5 Stars

     

    (6)

  • 4 Stars

     

    (3)

  • 3 Stars

     

    (2)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

  • Accurate (8)
  • Easy to understand (8)
  • Well-written (8)
  • Helpful examples (7)
  • Concise (6)

Cons

No Cons

Best Uses

  • Intermediate (8)
  • Student (5)
  • Expert (3)
  • Novice (3)
    • Reviewer Profile:
    • Developer (10)

Reviewed by 11 customers

Displaying reviews 1-10

Back to top

Previous | Next »

 
5.0

An enormous help!

By Geronimus

from Toronto, Canada

About Me Developer

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Intermediate
    • Novice
    • Student

    Comments about oreilly JavaScript Patterns:

    Teaches, by example, several professional, repeatable, and extremely useful patterns, that as well being applicable to individual JavaScript problems and design decisions you may face, will improve your understanding of the language as a whole, and make you a better programmer. Excellent!

     
    5.0

    The best book on JS design pattern

    By Tomas Jurman

    from The Czech Republic

    About Me Developer

    Verified Buyer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate
      • Student

      Comments about oreilly JavaScript Patterns:

      I was very satisfied. Everything is well explained with clear examples. I've read several books on design patterns, but this was the best for me.

      (1 of 1 customers found this review helpful)

       
      5.0

      superb

      By Paul

      from Wiltshire, UK

      About Me Developer

      Verified Reviewer

      Comments about oreilly JavaScript Patterns:

      having read the definitive guide and crockford, this is the logical next book to read. I refer back to this book constantly. First class.

      (1 of 1 customers found this review helpful)

       
      5.0

      Keep coming back to this book

      By Curt

      from San Mateo, CA

      About Me Developer

      Verified Reviewer

      Pros

      • Timeless
      • Unmatched

      Cons

        Best Uses

        • Expert
        • Intermediate

        Comments about oreilly JavaScript Patterns:

        I keep coming back to this book. I use it as a reference these days. I've bought a number of newer JavaScript books looking for some additional insights, but I never find them and keep coming back here.

        (2 of 2 customers found this review helpful)

         
        5.0

        Great read

        By Callum Macrae

        from UK

        About Me Developer

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Student

          Comments about oreilly JavaScript Patterns:

          Great read, I learned a lot from this book. I do agree with Mike, though - the first half is definitely better than the second half.

          (1 of 3 customers found this review helpful)

           
          3.0

          Fair read, although a bit unbalanced

          By Mike

          from Finland

          About Me Developer

          Verified Reviewer

          Pros

          • Accurate
          • Easy to understand
          • Useful as reference
          • Well-written

          Cons

          • Boring at times

          Best Uses

            Comments about oreilly JavaScript Patterns:

            Liked roughly the first half of it, but found the latter half somewhat boring. Reading long code samples like "this is how I would implement in JavaScript" makes for a good reference, but not really an entertaining read. On the other side, the "good to know" parts, conventions and tricks in the beginning were really useful.

            All in all, well written and a decent read, but I for one got the feeling it's mostly an implementation reference about converting patterns from a language to another, without much consideration for the actual problems they solve.

            (2 of 2 customers found this review helpful)

             
            4.0

            Well done - Highly recommended

            By Jon Frost

            from Missouri

            About Me Developer, Educator, SVG and Net developer

            Pros

            • Accurate
            • Concise
            • Easy to understand
            • Helpful examples
            • Well-written

            Cons

              Best Uses

              • Intermediate
              • Novice
              • Student

              Comments about oreilly JavaScript Patterns:

              This book gets into the good stuff right away with well-written clear examples. I just wish there were a few more chapters with more real-world sample applications. Nice job.

              (0 of 13 customers found this review helpful)

               
              3.0

              Just found one error

              By Aichi

              from Berlin

              Comments about oreilly JavaScript Patterns:

              I did not read it but I discover one nasty bug in your code at page 75. IE test:

              if (typeof document.attachEvent === 'function')

              will never return true in IE because typeof will return 'object' instead of 'function'. Most common test is

              if (!window.opera && window.attachEvent)

              to be sure that we are using IE and not Opera and just test presence of attachEvent function by implicit type conversion.

              (4 of 5 customers found this review helpful)

               
              5.0

              Excellent for intermediate JavaScript

              By bhofmann

              from Exmouth, England

              About Me Developer

              Verified Reviewer

              Pros

              • Accurate
              • Concise
              • Easy to understand
              • Helpful examples
              • Well-written

              Cons

                Best Uses

                • Intermediate
                • Novice
                • Student

                Comments about oreilly JavaScript Patterns:

                I've read through the book and thoroughly enjoyed the journey. It's not often a book is targeted so closely to the level I'm at when I start the book. I've learnt a lot from reading it, and it lives in my laptop bag now as a handy reference for when I need to look up a good way to implement something or just want to refresh my skills on closures when I've spent too long in C# code.

                Stoyan explains the techniques and their pros and cons very well and gives concise working examples of the techniques or patterns.

                The only thing I didn't like about the book was the end - I wish there wasn't one.

                (4 of 8 customers found this review helpful)

                 
                4.0

                Excellent for professional developers

                By ArpitNext

                from New Delhi, India

                About Me Developer

                Verified Reviewer

                Pros

                • Accurate
                • Easy to understand
                • Helpful examples
                • Well-written

                Cons

                • Not for beginners

                Best Uses

                • Expert
                • Intermediate

                Comments about oreilly JavaScript Patterns:

                Learning these patterns and best practices will change the way you code. It will entirely transform you into a professional and experienced programmer.[@]

                Displaying reviews 1-10

                Back to top

                Previous | Next »

                 
                Buy 2 Get 1 Free Free Shipping Guarantee
                Buying Options
                Immediate Access - Go Digital what's this?
                Ebook:  $23.99
                Formats:  APK, DAISY, ePub, Mobi, PDF
                Print & Ebook:  $32.99
                Print:  $29.99

                Available in Multiple Languages