Blog

Book Review: Object-Oriented JavaScript

August 11, 2010

image

A good number of folks have recommended me to pick up Object-Oriented JavaScript after I put out this book review on JavaScript – The Good Parts. They told me that it’s a great way to dive into the guts of JavaScript, and I must admit that they were right. When I come to think about it, this has probably been the best book on learning a new programming language I have ever read before.

I’m not particularly a day in, day out web developer, but I have been using the JavaScript language a couple of times throughout my career. Over the last couple of years I’ve become fascinated by some of the JavaScript libraries that have been popping up. The most obvious ones being jQuery and ExtJS, but the rise of JavaScript outside the browser like node.js and the use of JavaScript in some NoSQL databases  like CouchDB seems like a very interesting evolution.

Reading this book only added to my fascination for this wonderful dynamic programming language. The nice thing about this book is that it thoroughly explains all the concepts of JavaScript throughout the different chapters. It starts by describing some language element, providing a clear high-level explanation and further expand throughout the rest of the chapters if necessary. This way the reader doesn’t get overwhelmed by all the details of a single particular language feature all at once.

The first chapter talks about the history, current state and future directions of JavaScript. It’s a nice overview of the evolution of the language. This chapter also provides a quick rehash of the basics of object-oriented programming and compares the OO concepts of JavaScript with other programming languages.

The second chapter provides the basics of the language like variables, data types, arrays, loops and conditionals.

The third chapter is all about functions, starting with basics and then more advanced stuff like anonymous function, self-invoking functions and inner functions. The chapter concludes with a superb explanation of closures in JavaScript.

The fourth chapter introduces objects. This chapter explains properties, methods and the various ways on how to create objects. After that, there’s an overview of the built-in objects (which are handled more in-depth in one of the appendices).

The fifth chapter is completely dedicated to the concept of prototypes. The author clearly explains the purpose of the prototype property and how to augment built-in objects.

The sixth chapter discusses a various number of ways to implement inheritance in JavaScript,  like prototype chaining, copying properties, prototypal inheritance, etc. ….    

The seventh chapter talks about JavaScript in a browser environment. Things like the BOM (Browser Object Model), DOM (Document Object Model) and events are discovered more in depth.

The final chapter shows a number of coding and design patterns in JavaScript. This chapter is definitely worthwhile to have a sense of some techniques used in modern JavaScript libraries like namespaces, public and private properties/functions, chaining, etc. …  

Chapter five and six are the ones that provided the most value for me personally. The explanation of prototypes and the various ways to implement inheritance in JavaScript were a real eye opener.

In short, this is the book you want to have lying around when programming and/or learning JavaScript. For me, this is JavaScript explained in the most understandable way possible.

If you and your team want to learn more about how to write maintainable unit tests and get the most out of TDD practices, make sure to have look at our trainings and workshops or check out the books section. Feel free to reach out at infonull@nullprincipal-itnull.be.

Profile picture of Jan Van Ryswyck

Jan Van Ryswyck

Thank you for visiting my blog. I’m a professional software developer since Y2K. A blogger since Y2K+5. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. Past organizer of the European Virtual ALT.NET meetings. Thinking and learning about all kinds of technologies since forever.

Comments

About

Thank you for visiting my website. I’m a professional software developer since Y2K. A blogger since Y2K+5. Author of Writing Maintainable Unit Tests. Provider of training and coaching in XP practices. Curator of the Awesome Talks list. Thinking and learning about all kinds of technologies since forever.

Contact information

(+32) 496 38 00 82

infonull@nullprincipal-itnull.be