I wrote this book because I’ve been in the situation just described numerous times in my career as a full-stack developer. Maybe you’ve already had an experience like that one and you want to make sure you’re better prepared next time. Maybe you’re going through this experience right now. Maybe you want to try to prevent this from happening to you as you begin your career in JavaScript programming. If you fit into any of these categories, this book is for you.
Software development is a dynamic craft. A good part of your responsibility as a professional programmer is to learn new things constantly. The world of JavaScript, however, is notoriously dynamic. Something you learn this year will likely be out of style or at least vastly different next year. There’s no sense in fighting the current by sticking to your tried-and-true methods and tools. Many times, if not most of the time, new libraries and tools catch on quickly in JavaScript because they’re genuinely useful and superior to the previous ones.
Learning new things can be difficult, and learning new things under pressure to begin using them on real-life projects can be particularly stressful unless you’re properly prepared with the right attitude and sufficient experience.
My goal with this book is to prepare you to understand and work with JavaScript and JavaScript programmers. If you read this entire book, you’ll understand much of what the manager in the scenario I described earlier said — and maybe even what to do about it. You’ll also be well-equipped to continue your learning and to ask the right questions when something you haven’t heard of comes up next time.
Programmers create new ways of working with JavaScript all the time and package them as libraries and frameworks that can be downloaded and used by other programmers. Think of libraries as tools to solve a particular problem in a different way. Think of a framework as a complete system for doing particular things.
No single person can know and remember every JavaScript library and framework that’s been created. And there’s really no need to. By definition, a JavaScript library or framework is just JavaScript. In theory, if you know JavaScript, you can learn every JavaScript library and framework. In fact, if you know enough about JavaScript, you can write your own JavaScript library or framework!
Most books about JavaScript focus on either teaching the JavaScript language itself, or on focusing on a single library or framework. Both approaches have their merits, but both leave out a vital ingredient for becoming a JavaScript programmer.
Learning to program with JavaScript isn’t fundamentally about memorizing syntax or knowing every function available in a library or framework. If you know and understand the basics, you can look up everything else easily enough. Furthermore, if you spend a lot of time learning every function and feature of a particular library from a book, you’ll be frustrated when you go to use it and find that much has changed in the time (whether it’s a month or several years) since the book was published.
In my experience, it’s much better to learn just enough about as many different ways of doing things as possible, so that when you encounter something new, you’ll have something to compare it to.
Knowing how to write JavaScript isn’t enough to be able to develop apps. JavaScript lives in an environment, whether it’s a web browser, a mobile phone, a web server, or a hardware device. Once you get to a certain level of proficiency with JavaScript, knowing how JavaScript interfaces with its environment is what’s most important.
This book shows you how JavaScript is used in the real world, using a combination of real-world and simplified examples.
Learning about a single library — whether it’s React or Vue.js or Svelte or Angular — is great. But without knowledge of other ways of doing things, you may fall into the trap of thinking that every problem can be best solved by the tool you know.
If you learn a wide variety of tools, you’ll understand how libraries and frameworks are constantly improving on what’s been done before, and you’ll gain an appreciation for why change is so important in the JavaScript world.
Another benefit of learning multiple ways to do the same thing is that you’ll find that the more you learn, the easier it becomes to learn additional tools. One trait of outstanding JavaScript programmers is that they’re excited by opportunities to learn new libraries and tools.