Tuesday, February 21, 2017

The JavaScript is the most popular programming language in Web, way ahead of popular ones like Perl, Ruby, and Python. It is also one of the essential skill for any Web developer. It is even true for Java developers. If you have JavaScript in your resume or LinkedIn profile, you will likely receive many Job opportunities. Everybody wants polyglots, programmers who know multiple programming languages because most of the real world projects are developed with multiple technologies, you will always found some component is written in Java, some in C++ then you have JSP, Server, jQuery, JavaScript etc for web pages and so on. In short, it's very important to learn JavaScript in today's competitive world.
There are tons of books available to learn JavaScript in the market, you can even find a lot of free ebooks, PDFs which claims to teach JavaScript but many of them are either not up-to-date or just contain basic information without focusing on important concepts required for developing modern websites.

In this article, I am going to share some of the best books you can read to learn JavaScript. The list includes books for both beginners and new programmers who have just started learning JavaScript as well as experienced JavaScript developers, who have a couple of years of professional JavaScript experience under their belt.

Top 5 Books to Learn JavaScript

Here is my curated list of books to learn and master JavaScript. The list contains books for both beginners and experienced programmers e.g. Head First JavaScript is a very good book to starts with JavaScrip and "JavaScript: The Good Part" is an excellent book once you have some JavaScript knowledge under your belt.

The best way to learn JavaScript is to pick one book and read it at least once before you move to a more advanced book e.g. pick the Head First JavaScript, read it from the first page to the last page, do all the exercises, build projects and once you have done all this, read more advanced JavaScript book like "JavaScript: The Good Part" or "Secrets of the JavaScript Ninja". This way, you will learn advanced concepts quicker and better.

Head First JavaScript
I am a big fan of Head first series, having read many of their books e.g. Head First design patterns, Head First Java, Head First jQuery, Head First SQL etc. This is another gem from the Head First series which will teach you JavaScript in the head first style i.e. a lot of interactive reading and exercises.

The book is excellent for anyone who wants to learn JavaScript, a must read for any JavaScript beginner. You will learn all fundamental concepts of JavaScript very quickly e.g. data types, function, how to write JavaScript code, how to run them and how to test them. It also explains key concepts like DOM structure, handling events and developing interactive, cross-browser websites using JavaScript.

In short, this is one of the best JavaScript books that every JS developer should read ... and read it multiple times. It's fun reading Head First series book.

Secrets of the JavaScript Ninja
You might have heard the John Resig name before, if you don't, let me remind you that he is the author of jQuery, one of the most popular JavaScript framework, which really helped JavaScript to become the #1 programming language for web development.

The Secrets of the JavaScript Ninja 1st Edition by John Resig and Bear Bibeault is not for beginners but for developers who are familiar with JavaScript. It's a brilliant book that clearly explains WHY JavaScript has become the first choice for developing web applications on both client and server. It not only explains the fundamentals of JavaScript e.g. functions, closure, recursion, regular expression etc but also teaches you how to write good JavaScript code.

The best part of this book is that every bit of theory is explained with some real code examples from popular JavaScript library like jQuery and Prototype. Having John Resig as an author of the book really helps there.

Even though, the book is targeted for intermediate JavaScript developers, even a relatively new JavaScript programmer can benefit by catching concepts which are ignored in other JavaScript books. In short, a must read JavaScript book for any web developer.

The Principles of Object-Oriented JavaScript
One of the many reasons of JavaScript's success is its object-oriented capabilities but when I first started learning JavaScript it looks to me like a scripting language because there was no notion of classes and you don't need to define any objects in order to write code. I was naive that time.

The Principles of Object-Oriented JavaScript by Nicholas C. Zakas completely changes my understanding of JavaScript. It explores JavaScprit's object-oriented nature and reveals unique implementation of Inheritance and other key characteristics.

The best part of the book is its concise nature and the way it explains concepts. This book is both for beginners and experienced Javascript developers, but you must know OOP basics to get most of the book. The book will essentially teach you how objects work in JavaScript. Even if you know object oriented JavaScript, you learn a thing or two by reading this book.

JavaScript Patterns
This is another great book for experienced JavaScript programmers. This book will teach you some of the best ways to develop real world JavaScript applications by teaching you numerous JavaScript coding patterns and best practices.

The "JavaScript Patterns: Build Better Applications with Coding and Design Patterns" by Stoyan Stefanov effectively complements the "JavaScript: The Good Part" by avoiding bad practices such as using global variables, using single var declarations and more.

You will learn why literal notation patterns are simpler alternatives to constructor functions and different ways to define a function in JavaScript. More importantly, you will learn different options available for code reuse and Inheritance in JavaScript.

JavaScript: The Good Parts
This is another great JavaScript book in the market. As the name suggests, it focuses on teaching you only the good parts of JavaScript, hence it's quite small. If you compare this book with "JavaScript: The definitive Guide", a comprehensive Java book, you will find why this is a great book.

This book is aimed at intermediate JavaScript developers and expects that you have a basic understanding of JavaScript and you know how to write JS code and run them.

In this book, author Douglas Crockford shares his experience with JavaScript to teach you all the best practices and ways to write effective JavaScript code. It focuses on good ideas that make JavaScript an excellent object-oriented programming language e.g. arrays, functions, loose typing, and an expressive object literal notation.

When I first time read this book, I was surprised with the knowledge I got, even though I had some experience in JavaScript. In short, an excellent JavaScript book which every web developer should read at least once and better read sooner than later.

That's all about some of the best books to learn JavaScript. This list contains books for both JavaScript beginners and experienced programmers. It also contains a variety of books to help you understand JavaScript from different angles and become an expert JavaScript developer. To start with, you can pick up the Head First JavaScript and then slowly move to advance JavaScript books like "JavaScript: The Good Part" and "JavaScript Ninja". The books are ideal for any Java, Dot NET or C++ programmer who wants to learn JavaScript for his new projects.

Thanks for reading this article if you like it then please share with your friends and colleagues. If you have questions, feedback, or suggestion, or any JavaScript book which you would like to suggest us then please feel free to drop a comment.