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
The Principles of Object-Oriented JavaScript 1st Edition
In The Principles of Object-Oriented JavaScript, Nicholas C. Zakas thoroughly explores JavaScript's object-oriented nature, revealing the language's unique implementation of inheritance and other key characteristics. You'll learn:
–The difference between primitive and reference values
–What makes JavaScript functions so unique
–The various ways to create objects
–How to define your own constructors
–How to work with and understand prototypes
–Inheritance patterns for types and objects
The Principles of Object-Oriented JavaScript will leave even experienced developers with a deeper understanding of JavaScript. Unlock the secrets behind how objects work in JavaScript so you can write clearer, more flexible, and more efficient code.
Review
—Javin Paul, Java Revisited
About the Author
- ISBN-109781593275402
- ISBN-13978-1593275402
- Edition1st
- PublisherNo Starch Press
- Publication dateFebruary 14, 2014
- LanguageEnglish
- Dimensions7.06 x 0.29 x 9.25 inches
- Print length120 pages
Similar items that may ship from close to you
Product details
- ASIN : 1593275404
- Publisher : No Starch Press; 1st edition (February 14, 2014)
- Language : English
- Paperback : 120 pages
- ISBN-10 : 9781593275402
- ISBN-13 : 978-1593275402
- Item Weight : 8.6 ounces
- Dimensions : 7.06 x 0.29 x 9.25 inches
- Best Sellers Rank: #585,423 in Books (See Top 100 in Books)
- #123 in JavaScript Programming (Books)
- #258 in Object-Oriented Design
- #1,781 in Programming Languages (Books)
- Customer Reviews:
Important information
To report an issue with this product or seller, click here.
About the author

Nicholas C. Zakas is a front-end consultant who specializes in user interface design and implementation for web applications using JavaScript, Dynamic HTML, CSS, XML, and XSLT. Has has 15 years of web development experience and spent nearly five years at Yahoo! in various roles, including principal front end engineer for the Yahoo! homepage and contributor to the Yahoo! User Interface (YUI) library, having written the Cookie Utility, Profiler, and YUI Test.
Nicholas is the author of Professional JavaScript for Web Developers and High Performance JavaScript, a co-author on Professional Ajax, and a contributor to Even Faster Web Sites. He has also written for several online sites such as WebReference, Sitepoint, the YUI Blog, A List Apart, and the Web Performance Advent Calendar.
Nicholas regularly gives talks about web development, JavaScript, and best practices. He has given talks at companies such as Yahoo!, LinkedIn, Google, Netflix, TripAdvisor, and NASA, and conferences such as the Ajax Experience, the Rich Web Experience, OSCON, WebDirections, Fronteers, and Velocity.
Through his writing and speaking, Nicholas seeks to teach others the valuable lessons he’s learned while working on some of the most popular and demanding web applications in the world. He firmly believes that no difficult problem should need to be solved more than once.
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 Amazon-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
First off, I must mention that this book is not intended for beginners. Object Oriented Programming (OOP) takes a different approach in the JavaScript language. In order to fully grasp the content of this book, it is highly recommended that you have a good understanding of OOP concepts and have developed an OOP vocabulary. My suggestion is to first learn a solid OOP language like Java or C++ first before beginning with this book. Just knowing JavaScript alone may not be enough.
I previously mentioned that this book is concise. Weighing in at 92 pages, it's a featherweight in the realm of programming books. You might think it should take more pages to cover such an advanced topic as OOP in JavaScript. But, as exemplified in this book, that is certainly not the case.
The topics in this book are covered just enough to get a good understanding of them. Furthermore, as you progress through the book, what you learn early on will be used again in a later section. So, what you learn in Chapter 1 will be used throughout the rest of the book. Each chapter builds upon the previous one. As you work through the examples, you will get plenty of practice of the things you previously learned.
The author's writing is very easy to read. It's not easy to find a programming book that is so well written. The author does a very good job of not going beyond the scope of the current topic. Furthermore, he sticks to a consistent vocabulary that should be quite familiar with readers familiar to OOP principles.
I can honestly say that this book has improved my understanding of JavaScript. After reading it, I was able to understand why the syntax of JQuery and AngularJS works, instead of just memorizing how to write the code. Those two libraries have some interesting syntax that might look foreign to someone who doesn't understand how JavaScript deals with objects. Because it has been so useful to me, I plan to keep a copy of this book in my personal library.
I highly recommend this book to anyone who wishes to gain an understanding of OOP in JavaScript. If you have experience with OOP through another language such as Java and C++, then this book can certainly enrich your JavaScript coding practices. This was my personal experience with The Principles of Object-Oriented JavaScript.
I consider myself to be somewhere in between a novice and intermediate JavaScript developer. I have lots of jQuery experience as well as some MV* experience using Backbone.js. I've been exposed to more advanced concepts like closures and IIFEs, etc. - and I've even used them - but always felt a little foggy about exactly what was happening behind the curtain. I want to create games in JavaScript, and so I was looking to this book for some insight in regard to the underpinnings of Object-Oriented Design (OOD) with JavaScript. I was hoping to walk away from this book armed with the ability to begin work on my own JavaScript game engine using Object-Oriented Design (OOD) patterns.
Summary:
The book was very analytical and straightforward in its methodology of explanation. The content builds on itself very logically from chapter to chapter along with clear explanations and wonderfully annotated code examples. As other reviewers have mentioned, it's very dense material, but clearly written and not hard to understand if you take your time and reread/re-examine the code samples when concepts get hairy.
Much of the content is framed in a way of emulating Classical behavior from other languages in JavaScript (which uses prototypal inheritance rather than classes). This was somewhat less helpful to me, because JavaScript is the only language I know currently. Still - the concepts of class-based languages (Encapsulation, Inheritance, Polymorphism, etc.) are somewhat familiar to me, and the book helps bridge the gap between traditional methods of OOD and JavaScript. For anyone coming in with a traditional class based understanding - I suspect this book would be perfect for filling the gaps.
The final chapter is particularly good (though only 14 pages), as it FINALLY emerges from the "nuts and bolts" of OOD in JS and gives you some examples and use-cases for actually utilizing what you've been learning in all of the previous chapters. The Module Pattern of object creation and the explanation and rationale behind using closures finally makes sense to me, after being somewhat opaque in the past. I wish there was more to the final chapter. Which brings me to...
My only complaint:
Ultimately, the brevity and narrow focus of the book works to the content's favor, but I was hoping for some more practical examples and actual use cases. To me, it felt like the last chapter was the only one in which I walked away with a very clear understanding of how I could use some of these nuts and bolts in an advantageous way. The whole book felt like a thorough examination/explanation of a carpenter's toolbox and all the different tools, but mentioned little in the way of how to construct a house. I suppose teaching design patterns isn't really the objective of the book, though. I'll have to look elsewhere for that.
So there you have it. This book truly is the PRINCIPLES of OOD in JavaScript, not the patterns. It was still a great read, and I know I will definitely reference it in the future.
Top reviews from other countries
very basics and goes till the advance part but in a very detailed
manner.
Interestingly, what this book also reveals are the ‘coping strategies’ of the JavaScript community in its attempt to mimic class-based languages through constructs such as ‘mixins’ and parent-child class relationships. These ideas are not baked into the language, and the solutions that are used in practise (and documented in the final chapter) are approximations more than anything, with conceptual gotchas hiding beneath the surface.
This is not to say that JS object patterns are without merit (the Revealing Module pattern for example is a personal favourite), just that they appear to act as ‘workarounds’ making up for perceived lack of native features in the language. This attitude has manifested concretely in ES6 classes, which provide a consistent syntax for what the community had already been doing on their own.
What I was really hoping for, though it’s not the fault of this book, was some insight into how to leverage JavaScript’s fairly unique prototypical and object characteristics in software design, rather than how to bend them to the will of object oriented constructs from elsewhere. Unfortunately, the book represents the general community attitude in this way.
Nonetheless, the book was extremely informative and invaluable in its distillation of how JS objects (and functions) work, it’s up to the reader how they wish to use that information.





