
Ebook Info
- Published:
- Number of pages:
- Format: PDF
- File Size: 2.06 MB
- Authors: Nicholas C. Zakas
Description
If you’ve used a more traditional object-oriented language, such as C++ or Java, JavaScript probably doesn’t seem object-oriented at all. It has no concept of classes, and you don’t even need to define any objects in order to write code. But don’t be fooled—JavaScript is an incredibly powerful and expressive object-oriented language that puts many design decisions right into your hands.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 objectsThe 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.
User’s Reviews
Reviews from Amazon users which were colected at the time this book was published on the website:
⭐First, my background and where I’m at as a developer: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.
⭐I give The Principles of Object-Oriented JavaScript by Nicholas C. Zakas a rating of 5 stars. This book deserves no less with its concise nature and very well explained concepts.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.
⭐In general the book is very good, but, unfortunatelly, it does have some imperfections to it. For example, the constructor definition is quite vague: “A constructor is simply a function that uses “new” to create an object – any object can be a constructor”. It is not strict enough and it doesn’t really help. For an experienced developer, it restates the obvious in an disturbingly careless manner. For a developer new to JavaScript, it is most likely useless and confusing: a function _uses_ “new”? _What does this mean_? I’ve always thought it’s me, a developer, who _uses_ “new” to make a constructor call of a function.There is no way to correctly explain what the JavaScript constructor is without elaborating on the notion of _receiver_, how it is bound to _a function call_, and how a “constructor function” is _logically_ different from other functions even though (and that’s what the author is apparently talking about) there’s _no_ _technical_ difference between them.Summarizing, the book is really good. For the most part is very thorough and solid. Definitely worth reading. But because of the things like the one above I am sorry to give it only four stars. Also, if you are deciding what books to read on JavaScript, whatever other books you choose, there is _the_ book on the matter: Effective JavaScript by David Herman. My personal belief, there’s no other book on the language, that explains all the vital subtleties of it in such a clear and concise way.
⭐JS has come a long way since this book was written. Unfortunately, all examples presented in this book are very simplistic , similar to the ones found in various basic tutorials freely available on the internet. Object-oriented programming (OOP) in JS has changed quite a bit for the past six years, making this slim book rather obsolete. These days most introductory JS books include this stuff and much more (new syntax for working with classes, etc). The author also misses the point that JS is a programming language for the browser, and without showing how JS OOP is actually integrated in some examples involving the browser, the book remains an ego-stroking exercise. If you want to write better JS code look elsewhere.
⭐Very well written and to the point, this book is oblivious to ES6 class syntax by virtue of its release date. This is a good thing, as it reveals JavaScript object mechanics under the hood, diving deep into ‘prototypical inheritance’, it should answer any questions you may have about the inner workings of JavaScript objects and how they delegate to one another.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.
⭐I’ve always been a fan of Zakas, so I had faith in this book before I got it. I am a proficient JS developer and I bought this to help cement some of the knowledge that is a bit sketchy for me. After ready this I now completely understand inheritance using the prototype object, and finally how to get the most out of JS constructors. Also, understanding the different between == and === is crystal clear as is closures! If these were areas that you had not quite got to grips with then you should have this book on your shelf.
⭐This book is pure awesomeness. Read it, learn it and read it again!Helped me understand the ugly prototypal inheritance and much more.Seriously, this is one of the best book on JavaScript objects and it’s also a very easy read.
⭐I had some previous knowledge of javascript, but i was especially interested in o.o.p in javascript. i love the way zakas has written his material; because not everyone with knowledge is able to teach, their is a difference. This book was perfect for me. thanks Nick!
Keywords
Free Download The Principles of Object-Oriented JavaScript 1st Edition in PDF format
The Principles of Object-Oriented JavaScript 1st Edition PDF Free Download
Download The Principles of Object-Oriented JavaScript 1st Edition PDF Free
The Principles of Object-Oriented JavaScript 1st Edition PDF Free Download
Download The Principles of Object-Oriented JavaScript 1st Edition PDF
Free Download Ebook The Principles of Object-Oriented JavaScript 1st Edition