Hacker News new | past | comments | ask | show | jobs | submit login

It's better if libraries don't just assume jQuery is everywhere, because I suspect those days are ending. Apps built on newer front-end frameworks like Angular and React might not need it, for example.

As a library author it's becoming more important to think case-by-case -- use raw JS if you just have some simple selections or XHRs, or use Zepto/etc if that covers you, and only depend on jQuery if you really need its richness in your lib.

So in that spirit, I appreciated the article.




> Apps built on newer front-end frameworks like Angular and React might not need it, for example.

Well, Angular has jQuery (lite) built in.


It has a jQuery-mostly-compatible node wrapper built-in, which is why it doesn't need jQuery.


Which is both good and bad in that it also modifies jQuery's internals if it's present. (I last looked at the 1.0.x branch)


If it's just a general library to use anywhere, then sure build it with no dependencies.

But if it's a library intended for Angular then the library would be built with Angular as a dependency, much like it would be with jQuery.

I don't see a negative with a library being built that has dependencies if it is intended to be used in conjunction with the thing it is depending upon, since in most likelihood a like-minded developer is already using it.


If you like spirit, you'll love this: https://gist.github.com/rwaldron/8720084#file-reasons-md




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

Search: