Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OK serious question about NOT using jquery.

I am an author of a jquery plugin (1KLOC) which I need to rewrite in plain js.

There is going to be a handful of things that when converted will need to become helper methods because its not a line to line conversion.

So now Ill be writing a small dom manipulation lib within my lib. This seems wrong to me, since every other thing converted from jquery to native will also need write their own little helper lib.

Now you import all these great native js libs into your project, and because native js code is usually a little bigger than jquery code, you end up with a bigger vendor bundle than if you had just used jquery and all your libs used it too.

what is the advantage of that?



Modular vs monolith. Many people would rather require 100 libraries that each do one thing perfectly than one library that does 10,000 things poorly. It also makes everything you do easier to test and run 10+ times faster.


It doesn't sound like there's an advantage to that. Is this because of the trend of backlash against js frameworks?


Your project will stay relevant longer? JQuery will slowly disappear over the next 5-10 years.

I agree with a sibling comment, I would look for a small DOM manipulation library.


Could you not rely on a tiny dom manipulation lib?


yes, I think that is a solution. ill probably end up writing my own though, with just stuff I need. Otherwise its just like jquery all over again




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: