Frontend Development

Why you shouldn't use jQuery and moving away from it

Submitted by null0r, , Thread ID: 122150

Thread Closed

RE: Why you shouldn't use jQuery and moving away from it

#4
Hi! it's an interesting topic. I would say you can use jQuery (or any other library) if it make development easier for you. 30kb is not a problem today, so if you are creating a web site or an application for you or for one of your clients, and jQuery helps you to save some development time... then feel free to take it.

In the other hand, if you are creating a library, which will be used by other developers (an npm package for example) to solve an specific problem and it has nothing to do with jQuery capabilities, then you should take a few minutes and think if you really need to add a dependency to your library, when you could just create a few utility functions and avoid jQuery. Adding dependencies to a library (which is designed to be a dependency for other projects) creates a chain of future probable unsolvable malfunctions. As an example, right now I'm working on a project. My application depends on an npm package called "send", which additionally depends on another package called "mime". Now, mime was recently found to have a high severity security vulnerability. That means my application has a security vulnerability too, and I didn't even know I was having mime as a dependency. Now, the people developing the package "send" can't do nothing and we have to wait until mime's new release date, to be "free" of their vulnerability.
So, as I said, if you are creating a library, try to remember that any package you use is a possible future bug you will not be able to fix.

Users browsing this thread: 6 Guest(s)