Why I decided to focus on Vanilla Javascript

Furaha Damién
5 min readAug 5, 2019

With the increase in popularity of javascript frameworks, almost everyone seems to be learning a javascript framework. From Angular to React to Vue, front end development is easier than ever. For a developer, not only do these frameworks make development easier, the job market is also good. Almost all startups want React developers. Even medium to bigger cooperation would better have someone comfortable with a javascript framework than one with a solid understanding of javascript. With the cross-platform functionality provided by these frameworks, iOS and android native developers have taken an even bigger blow. Now, with all these benefits associated with javascript frameworks, why would anyone decide to walk away from them?

I did angular development for a year, starting from the summer of my sophomore year. It was my first time working on a large scale application. Not only was I exposed to a huge chunk of code, I also realized how easy frameworks like angular made development. I loved how easy it was to organize, manage and refactor an application component without having to affect the other components. Particularly, the Model View Controller onto which angular is based resonated well since I had started learning iOS development which mostly used MVC. At the time, most of my friends were learning React and I also wanted to start exploring React. However, this desire for me to look into other frameworks is one of the reasons I am writing this article. Do not get me wrong, I love exploring and learning new technologies.

In my junior year, I took a course on software design. In the same year, I got introduced to a new concept, VANILLA javascript. A combination of these two and other factors made me realize that as much as frameworks are good for development, If you really want to be a good software developer and actually understand what these frameworks do, it is much better to first understand vanilla javascript. Below I explain a few reasons why I decide to first focus entirely on vanilla javascript before going back to javascript frameworks. But first, what is vanilla javascript?

one responder of StackOverflow answers this well:

Using “VanillaJS” means using plain JavaScript without any additional libraries like jQuery.

People use it as a joke to remind other developers that many things can be done nowadays without the need for additional JavaScript libraries.

”.

You can get a better view into Vanilla Javascript from http://vanilla-js.com/

Now, here is why I decide to focus on vanilla javascript

To understand the insight of javascript:

One thing that frameworks are good at is making your life as a developer easier. They do almost everything for you. The frameworks call libraries for you and all you have to do is provide snippets of code wherever required. This comes at a huge cost. Since you don’t get to build your own libraries, you do not get an appreciation of how javascript really works. You don’t understand the structure of the language since you really don’t need to when you use frameworks. This makes you simply master the framework and not the language. As a result, it becomes hard for you to really understand what happens behind the scenes is circumstances when your code breaks. On the other, building your applications using vanilla javascript is like building a house from scratch. You have to make your own bricks, mix concrete by yourself and ask for help from other works when you need to. In so doing, you learn not only how to build a house, but also how to make the components that make a house. Frameworks do all this for you. Vanilla gives you a responsibility to decide what code you want to use, how you will write it and what libraries you need to call. This allows you to learn the insights of the language and gain an appreciation of things that are hidden from you in frameworks.

Better/flexible software design practices:

When you are using a framework like React, there is little that you can do in terms of choosing your own software design or architecture. If the framework is based on MVC for example, it is hard to design your application based on say Decorator or Composite design patterns. You are limited as to how your software can be designed since you have to follow the specification of the framework you are using. On the other hand, Vanilla gives you total control on what design pattern to adopt based on your needs. It allows you to leverage all the benefits of OOP and functional programming provided by javascript.

Helps you to understand how frameworks are built:

Again when you use frameworks, much of the work is done for you. As a result, you don’t understand how libraries are being called all that happens behind the scenes. As they say, frameworks call your code when they need to and not the other way round. As a result, you don’t really get to see the true architecture of the framework and what its functionalities are based on. When you code in vanilla, you write your own code and call libraries whenever you need to. This is what a framework would have done for you. But now since you do it yourself, you get an appreciation of how it is done and you can even twerk how the library call works if you want it

Frameworks change everytime

Finally, we all know how javascript frameworks change their versions almost every year. When I was at my previous workplace, we were building a new feature for the application I was working on. We started building it in angular 5 and by the time we finished, angular 6 was already out. Now we had to think of refactoring the application again. This is something that you won’t worry about when you code in vanilla. When you code in vanilla, you are writing your application in pure plain javascript and you can bet that there won’t be a total rebuild of the language in the near future. As a result, not only do you build a stable application, you also save yourself the cost of having to refactor your code every time facebook or google decides to change the versions of their frameworks.

With all good reason, most (new) developers are learning web and mobile development frameworks. While I am a big fan of these frameworks and all the benefits associated with them, from a developer standpoint, I believe that it is to a developer’s interest to have a sound understanding of the building blocks of whatever frameworks they choose to use. Developers need to understand the basics of the javascript language. And what a better way to do this than learning and understanding Vanilla Javascript.

--

--