Stop being JavaScript monkey in the jungle of frameworks!

Stop being JavaScript monkey in the jungle of frameworks!

ยท

4 min read

We are really into frameworks, aren't we? Especially beginners! By the time I finish writing this, a new JavaScript library or framework will be published. With each having pros over another, we directly jump in before looking at the cons. I have interviewed many developers who have fallen into the trap, thinking they are at the top of their game. I would share how I choose a framework and the base you might miss being part of this jungle.

It starts with JavaScript!

There are no shortcuts in the world of programming. If you want to master your tech game, you have to get your fundamentals right. I have interviewed people who know how to write a React app but don't know events work in JavaScript. See, this is the problem. You have to learn JavaScript first before working with frameworks. You should be able to create a to-do list problem in JavaScript before starting that in React, Angular, Vue, Solid etc.

Before you select a framework of your choice, please make sure that you have a good command of the following:

  • Execution Context

  • Event loop

  • Scope and Scope Chaining

  • Closure

  • Promise

  • Prototype and Prototype Chain

  • Inheritance

  • Event delegation, Event Capturing, Event Bubbling

  • Networking basics like XHR, CORS and preflight requests etc.

Not that you have to master each of the above. But having some idea would be better to start. If you want to dive deeper and master this language, please ensure you have an intermediate level of understanding. There is more to the list, but I am confident you will see the path forward once you have done these.

Try to create small applications with JavaScript. Nothing fancy, just basics like a to-do list, a budget tracker, a carousel, drag-and-drop, a blogging platform etc. You will cover most of it. If you have more basic project ideas, please add them to the comments so others can learn.

You don't need that new flashy framework

I remember people talking to me about every new fancy framework they got to know about from Twitter or some other social media app. Most of the time, they tell what that framework is doing better than their last. There is silence in the room when I ask them if there are any cons to using that new framework. That is the missing piece in most of the documentation. Who wants to brag about cons, after all?

If you have started with JavaScript, you are ready for any framework. Choosing a framework would depend on the problem you are solving. I started using JavaScript when people were fond of jQuery and knockout.js was entering the market. A lot has changed since then; this is how I do it with my current projects.

I primarily work on large-scale enterprise projects. I prefer using something more opinionated and where develops follow a standard framework guideline. I have chosen Angular, which has been working fine for me till now. There were issues with the initial versions, but now, it's a perfect tool for my day-to-day work. I prefer any other framework or library like React for some idea validations where I want to test things quickly. These are my tools, and you are free to choose the one you like. Just make sure that you know why you are choosing one over another.

Cloning Amazon, Spotify, and Netflix with new frameworks won't make you a better dev

If you are starting, take one step at a time. You will need more than hours-long code-along-with-me videos about cloning large-scale web with HTML, CSS and any JS framework. You will create something cool for sure, but let's be honest, you don't do that on a real job.

I am not saying those videos are not helpful. The creators are excellent, and they put a lot of hard work into that. But starting your journey with them is like directly jumping into the ocean with just a few swimming lessons. Watch them when you know the basics of the language/framework and can create small components but need help fitting everything together. This will give you an idea about framing things and how you use everything to make a significant project.

The Art of Debugging

You can't escape from errors and bugs. If you have been wandering in the jungle without a path and can relate to the above, you must have struggled at some points where things were working in videos but not working for you with the same code. After some tries, there are changes that you would give up in this kind of situation.

When we have our basics strong, some core errors start to make sense, and we can better chalk out the path to the solution. For example, if this is pointing to something else than expected, how would you solve it without knowing about this keyword and its behaviour in JavaScript?

The more you solve at the primary level, the better you become at debugging. This skill will take you places and make you a better dev in the longer run. Master this art and enjoy solving bugs without headaches.


If you have found this useful, share it with others. Please feel free to share your thoughts. Comment here or reach out to me on Twitter. Happy Coding ๐Ÿง‘โ€๐Ÿ’ป

ย