JavaScript Patterns and over one million other books are available for Amazon Kindle. Learn more



or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $2.88 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading JavaScript Patterns on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

JavaScript Patterns [Paperback]

Stoyan Stefanov
4.7 out of 5 stars  See all reviews (56 customer reviews)

List Price: $29.99
Price: $19.99 & FREE Shipping on orders over $25. Details
You Save: $10.00 (33%)
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
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it tomorrow, May 21? Choose One-Day Shipping at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition $13.19  
Paperback $19.99  
Unknown Binding --  
Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

September 28, 2010

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 writing a client-side, server-side, or desktop application with JavaScript.

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

Frequently Bought Together

JavaScript Patterns + JavaScript: The Good Parts + JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides)
Price for all three: $65.02

Buy the selected items together


Editorial Reviews

About the Author

Stoyan Stefanov is a Yahoo! web developer, Zend Certified Engineer, and an author, contributor, and tech reviewer of various O'Reilly books. He speaks regularly about web development topics at conferences and on his blog at www.phpied.com. Stoyan is the creator of the smush.it image optimization tool and architect of Yahoo's performance optimization tool YSlow 2.0.


Product Details

  • Paperback: 236 pages
  • Publisher: O'Reilly Media; 1 edition (September 28, 2010)
  • Language: English
  • ISBN-10: 0596806752
  • ISBN-13: 978-0596806750
  • Product Dimensions: 7 x 0.5 x 9.2 inches
  • Shipping Weight: 13.6 ounces (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (56 customer reviews)
  • Amazon Best Sellers Rank: #8,957 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Highly recommend for any serious javascript developer, this book saved me a lot of time. S. Maskalik  |  24 reviewers made a similar statement
This book was very well written. S. Ketchman  |  12 reviewers made a similar statement
Most Helpful Customer Reviews
64 of 65 people found the following review helpful
5.0 out of 5 stars Hit the sweet spot for me! October 14, 2010
By Anon:
Format:Paperback|Amazon Verified Purchase
It's often difficult to find good intermediate to advanced technical books that help you get over the hump. This is most definitely one of those books, IMO, along with Javascript: The Good Parts by Crockford and High Performance JavaScript by Zakas.

If you're a beginner, even an ambitious beginner, such as an experienced programmer in another language, you don't want to start here. For beginners, I'd recommend Zakas (Javascript for Web Developers) as the most complete introduction to Javascript, the DOM and browser scripting; or Simply JavaScript from Sitepoint for a gentler introduction that emphasizes the separation of structured content (HTML), presentation (CSS) and behavior (scripting the DOM with Javascript).

OTOH, if you're more or less comfortable with core Javascript and the DOM but want to clarify and explore the many idiosyncracies and fine points of JS, this book really hits the sweet spot. The table of contents is available on Amazon or O'Reilly, so I won't recap it - but will mention that Stefanov both chooses his topics and covers and organizes his material very well. This is a precisely and well-written book, and the reader will infer that there must have be a lot of experience, previous history and discussions behind these 200+ pages. I've read the blogs of the majority of his technical reviewers and believe you're in good hands here. I'm really lovin' this book. The only caveat - don't expect a lot on browser scripting. However, I'd be surprised if the somewhat experienced, but non-ninja, Javascript programmer did not significantly take his/her knowledge to a higher level after reading JavaScript Patterns.

* * *

Addendum: I was interrupted by a rush job during my initial reading of this book and after returning to it now and rereading the early chapters and carefully reading several of the later chapters, I'm even more impressed by this book. The heart of the book, when it gets a little more advanced (functions, object creation patterns and code re-use patterns) has proved really valuable.
Comment | 
Was this review helpful to you?
19 of 20 people found the following review helpful
5.0 out of 5 stars At last! A readable, expert book on JavaScript patterns October 24, 2010
Format:Kindle Edition|Amazon Verified Purchase
This book is not for the newbie JavaScript programmer (for the complete beginner I suggest JavaScript: The Missing Manual). It assumes some deep knowledge about the language and one is well advised to have read Douglas Crockford's JavaScript: The Good Parts before venturing into this book. Having said that, this book is just simply amazing!. It is very obvious that the author knows his subject, knows how to write and knows what problems people actually have. This is no small feat, as most programming books usually fails in one or more of these areas.

The book covers numerous inheritance and code reuse techniques, including most of the GOF patterns, but does also suggest several novel ways to take advantage (and not hack around) JavaScripts prototypical nature. I especially liked the code "tours", where the author spends considerable time developing a solution step by step, demonstrating pitfalls and side effects while simultaneously anticipating questions the reader might have. These JavaScript vistas has added considerably to my knowledge of the language, and I expect I will comeback to them again in the future (this book can easily take a second and third reading).

In summary, a very elegant written book containing an incredibly amount of knowledge, at a great price. Quite possible the best book on JavaScript in existence - highly recommended.
Comment | 
Was this review helpful to you?
17 of 18 people found the following review helpful
5.0 out of 5 stars Really useful book November 3, 2010
Format:Paperback
This book is really awesome, from the beginning to the end, the author shows useful tools to improve the javascript programming.

With more than 30 patterns the author goes from basic concepts, such as avoiding globals, using single var declarations, precaching length in loops, following coding conventions, running JSLint, etc., to advanced ones like variable hoisting, select algorithms at runtime, proxy objects, loading strategies, javascript optimization and a lot of more.

What I liked about the book was the way in which the author explains and illustrates the patterns and how well organized the book is written, this book helped me to understand in a better way some javascript techniques with several solutions to a common scenarios.

I recommend this book if you want to write better code, if you want to understand how the libraries are written or if you want to write your own javascript library. It helps a lot to understand the javascript core and the fundamentals and helps also to be more productive taking care of performance and maintenance of javascript code.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
4.0 out of 5 stars Handy set of tips on best practices
Extremely useful for an experienced developer in other languages, but a novice to JavaScript to pick up. Read more
Published 18 days ago by Shri
5.0 out of 5 stars Exactly What It Promises
This book delivers exactly what it promises: patterns and antipatterns in JavaScript with a detailed discussion and code examples. Read more
Published 20 days ago by Bryce Fisher-Fleig
5.0 out of 5 stars If you wanna get serious
If you are a person trying to take Javascript seriously, this plus other books will help you to get to pro status. Read more
Published 27 days ago by Gregory Oladipo
5.0 out of 5 stars Not a single page wasted.
This book helped me feel like i really know what i'm doing when programming javascript.
If like me, you arrived to javascript after years of programming in more traditional... Read more
Published 1 month ago by Sergio Tashdjian
5.0 out of 5 stars One of the best Javascript books I have read
Short and concise review would be, this book is short, to the point, well organized, keeps you intrigued and above all, teaches you a whole lot of things you never really gave much... Read more
Published 1 month ago by Sujesh Arukil
5.0 out of 5 stars great book
This is one book that every JavaScript developer should have on their bookshelves, right next to `JavaScript the Good Parts` and `Professional JavaScript for Web Developers` :)
Published 1 month ago by Anthony D. Brown
5.0 out of 5 stars Fantastic JavaScript resource for beginners and advanced devs
I started out learning JavaScript with this book. It is very clean, concise and progresses in a very logical manner. Read more
Published 1 month ago by Greg Ough
4.0 out of 5 stars A good follow-up to JavaScript, the Good Parts
I had just read JavaScript: The Good Parts by Douglas Crockford when I picked this book up. As it turned out, the first half of this book expanded on some of the ideas in Mr. Read more
Published 2 months ago by Nora Brown
5.0 out of 5 stars Excellent book
A really good book going over the basic and advanced patterns. It is a must have for every javascript/nodejs developer
Published 3 months ago by Mariyka
5.0 out of 5 stars Quite thorough
Covers many aspects of the javascript application development process.
Also highlights many pitfalls.
Overall a great book on javascript.
Recommended
Published 4 months ago by Charles Kowalski
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



So You'd Like to...

Create a guide


Look for Similar Items by Category