DEV Community

Discussion on: The Layers of Javascript

Collapse
 
theelectricdave profile image
David S. • Edited

It doesn't have to be this way, but it seems like the trend of web developers making their lives harder by stacking as many abstractions and dependencies as possible on top of each other will continue until this comes to a head.

I have seen so many projects destroyed by relying too heavily on other people's code, when the square cannot be jammed into the circle..

The JS ecosystem seems a lot more insane than the PHP ecosystem i work with.. i cannot imagine learning a new framework every year.

Collapse
 
desolosubhumus profile image
Desolo Sub Humus 🌎🌍

This is why I use VanillaJS for everything, personally. It can be frustrating at times, but not as frustrating as dealing with my own JS AND other people's frameworks and libraries, especially when the commenting in them may be confusing or non-existent.

I genuinely feel bad for anyone forced to use dependencies because of their boss's preferences.

Collapse
 
laurieontech profile image
Laurie

There are a lot of good reasons for dependencies. Oftentimes rolling your own isn't the right solution. There are plenty of merits in frameworks as well. It's all about picking the right tools for the job.

Thread Thread
 
desolosubhumus profile image
Desolo Sub Humus 🌎🌍

Perhaps, but all too often I'll see some nonsense on Stack Overflow or Medium where someone asks 'how do I do x in JS?', a simple two line VanillaJS answer that would work gets posted by someone else, and a hoard of others come in to bash the VanillaJS answer because they feel 'you should have used jQuery to make it one line and it should do y'.

I'm referring more to the obsession with forcing employees to do everything with the bosses' favorite libraries and frameworks purely because the bosses feel VanillaJS solutions are icky and only for stupid people who write their own code.

On top of that, if a framework or library is updated and part of your code breaks because your dependencies work differently now, it's frustrating to have to go back and figure out what the change is, why, how the new way works, how to fix your own code, and hope it doesn't break again. It's much less frustrating over time to write valid, working code that relies on nothing but your own work.

So, absolutely, the right tools for the right job. Sadly, it's more often the trendy tools for every job, because it's trendy.

Thread Thread
 
laurieontech profile image
Laurie

Definitely, all about tradeoffs.