Why I jumped at JavaScript/NodeJS hype train and then bounce back
I spend three years learning and using javascript as my main programming language. I’ve tried many NodeJs frameworks from backend, frontend, desktop, and sockets. It’s one long journey for me to decide to stop my dependency on NodeJs and use more old-school programming languages like Python and PHP.
We all knew what javascript could do. I remembered my 2nd year at uni and all my peers started talking about these frameworks named ExpressJs. We just finished three semesters learning C as the base of our programming language, it’s cool to see how simply another programming language that doesn’t need to manage the memory allocation by hand but still could make such a powerful product. There are so many useful libs on npm that made everything so much easier. But, is it everything that we needed? Yes, but actually no.
Let’s see why.
Learning curve
Learning the basics of JavaScript itself, was pretty much easier compared to C (maybe because I already have the basics of C). But to imagine being free from pointers is kind of breathing fresh air. The use of var, const, and let to declare a variable is not difficult either.
It’s all fun and rainbows until I reach the need to understand asynchronous programming (Promises, Callbacks, Async/Await). I spend a lot of time reading articles and watching tutorials on youtube just to fully understand these new topics for me. But eventually, everything just comes together naturally.
Making Projects
Seeing so many tutorials to create interesting projects with ease making me want to jump on making something cool. Here we go! I made a simple RESTful API with Express, it’s not so hard just need to understand HTTP request and done, my first app using NodeJs. Using React for the frontend is so much fun, with ease I can manipulate the state of an element.
With this knowledge, I tried to brace myself and take a freelance job. They need me to make a web service to upload images to simple storage like AWS s3 and syncing with their database. With google by my side I finished the job in 8 days (should’ve been faster but at that time I spend long hours just googling stuff). After that, I took on other projects with different difficulties.
My Problem with NodeJS
I realized that my code is so messy. The amount of library that I need is plenty. And each project usually needs a different library that I need to know. The time I spend learning one library is a lot.
Although most of my projects could be finished. But I grew tired of this cycle and the feeling of powerless not knowing all javascript’s library/framework.
My Other Options
I tried using a full-stack framework like Django or Laravel. Even though not so cool and hype like NodeJs, it’s soothing for me to feel that all I need was already available and ready to use. I don’t need to scrap the npm website just to find one library that I need the most.
I sometimes still use NodeJs for the frontend like React/Next though. but when I don’t need them, I used vanilla javascript and/or jquery.
Conclusion
Will I ever using NodeJs in the future? Of course! Although it’s not my main option anymore. If needed, I will use it gladly. But it is not everything that I need.
Learning NodeJs is of course helped me a lot to understand the core concept of development. Everything that I’ve made from scratch with NodeJs is making me easier to masters advanced topics that can be implemented in another programming language.