Why Choose Vanilla JavaScript

Why Not the Newest Framework

My recommendation for learning a new programming language, even if you choose something else than JavaScript, is to stay away from frameworks and libraries. What I want to tell you is that you should learn the language itself. Learn all the basics you can before considering something like learning React or Vue, and even jQuery. You should learn the language itself.  For example, learn what a collection is. Learn how to iterate over that collection. Learn how to sort that collection, etc. The list goes on. You should understand the fundamentals of your language and be fairly verbose before learning a framework that is built upon that language.

Don’t get me wrong, I love frameworks. They can take out a lot of the heavy lifting of having to do certain things from scratch. Take Angular’s data-binding for example. There is a lot packed into their implementation of managing variable state and modifying the DOM (if you have to ask what that means, then don’t jump into learning Angular right away!). I can do the same using vanilla JavaScript, maybe not as cleanly, nor would it likely scale as well, but I can do the same. It serves you best to have a general understanding of how a concept like this works before attempting to pick up a new framework without understanding these ideas upon which the tool you are using was built. Modern frameworks are built upon first principles, and you too need to understand these principles.

Why JavaScript in the First Place

So you are now probably asking why you should learn JavaScript as your first development language? Think of it exactly as that. It’s learning a new language. In my opinion JavaScript (although Python is not a bad choice either) is the preferred choice when learning a new development language. Especially with the ES6 implementation which can give you much more of an object-oriented approach to development (If you don’t understand what object-oriented programming is about don’t worry, you can find out a little more at W3schools). Not that JavaScript wasn’t able to be written using OOP before, but the syntactic sugar of ES6 has made it more fun in the last couple of years (use of ‘class’ and ‘const’ keywords for example). Also, with the use of NodeJs, you can write an application front to back using JavaScript and along with some HTML/CSS.  In other words, your server-side code can also be written in JavaScript, which is advantageous if you’re just starting out and are ambitious to write a fully functioning web application with a back-end counterpart.

It’s also going to be easier to learn than a language like  C#  or C++.  Its rules are a more lenient and in many ways is going to be easier to pick-up and begin understanding right away. It’s also the language of the web, and most new applications are going to have at least some web-based component. So when you go to use your new found skills to find a job in the world of development will make you that much more marketable.

Why Vanilla Though

jquery-i-think-not Understand the basics. I’ve worked with developers who love to work in the hottest new frameworks. This is fine, but you should understand the fundamental aspects of the language before getting caught up in learning a new framework. Just look at the history of frameworks. They all come and go at some point and will evolve and many just disappear. But they are all built upon the underlying language of your choice. For example, Python has Django, and PHP has Laravel, and JavaScript has React (I know there are many more but just as a few examples). Chances are that these will go by the wayside too at some point. Understanding the vanilla aspects of your language of choice will place you in a much better position to understand and learn new frameworks as they come and go. But the basics, well, they’re the basics and can always be built upon, think about where the frameworks and various libraries come from!

Leave a Reply

Your email address will not be published. Required fields are marked *