You Don't Need JQuery
131–140 of 201 posts
Re: You Don't Need JQuery
#132I'm just saying, you don't need them.
Re: You Don't Need JQuery
#133I disagree, jQuery is awesome, even for seasoned web developers. Of course you don't need it, but it makes life a lot easier when working with XHR, events, selectors, etc. If you're worried about dependencies, you could just compile your released library with the Google Closure compile, and strip out everything you don't use. You could even set up a pipeline to produce two releases: one that has bits of jQuery embedd…
Re: You Don't Need JQuery
#134Re: You Don't Need JQuery
#135This guy's argument is strikingly similar to that of the one made by those people who are anti-Apple, despite the fact that working with Apple products is a commonly pleasant experience, simply for the fact that they're Apple. Just because a lot of people use something that they're not being forced to use doesn't necessarily mean that they've been "tricked" into doing so.
Using Apple products is a pleasant experience. Using jQuery is to avoid learning how to code while purporting that it makes things easier cross browser. Of course, if that were the real reason, we would also have cQuery and c++Query and so on but, instead, we just learn how to code.
Re: You Don't Need JQuery
#136I am not a fan of a lot of the code that I've seen written with jQuery but jQuery itself is not evil anymore than PHP is evil because people do stupid stuff with it. If you use jQuery correctly it is an invaluable tool that makes your like 100x easier.
Event handling alone, I want to puke when I see the default way to do this, way too much typing, way too verbose. If I had to write that multiple times a day then I would probably create a helper function to abstract it away and I'd be on my way to building my own jQuery. No thank you, I'll take the one that's battle-tested and maintained.
I'm getting sick of seeing this argument, if you work in a bubble then sure, be my guest (I'll be laughing at all the extra typing you will be doing) but if you plan on deploying your code to the real world? Just use jQuery and save yourself a headache.
Re: You Don't Need JQuery
#137Earlier quoted context omitted.
Yes, why use a tried and tested tool that can be incorporated into your site and served efficiently with just a single extra line, when instead you could make building your site more complicated than compiling an entire Linux distribution from source, spend days choosing between a bunch of almost identical micro-libraries for every little thing you need to do, and lock yourself into a proprietary framework that will…
make building your site more complicated than compiling an entire Linux distribution from source http://browserify.org/ Browserify is not at all complicated. spend days choosing between a bunch of almost identical micro-libraries for every little thing you need to do Just search npm and pick the one that is being used the most. lock yourself into a proprietary framework that will be considered legacy code as soon as…
Right. But last week it was RequireJS, not Browserify. Today, as well as NPM, we have Bower and gem and pip and however many other package managers. Last week it was Angular, this week it’s React, and next week maybe it will be Web Components. Last week it was Grunt, this week it’s Gulp, and next week who knows?
The list goes on, but it always seems to be the same basic argument: for some reason, we are told, we suddenly need 73 different tools and templates and scaffolds and packages and boilerplates just to start a simple project. It’s long past time we stopped accepting that kind of rhetoric as if it’s some unquestionable truth. Ultimately web pages are still primarily made of the HTML, CSS and JavaScript that you serve to browsers. Everything else should have to pay its way, and there are always costs in complexity and maintainability when you introduce any external dependency into your project.
Now just to be clear, I am absolutely not saying don’t use good tools. If you are working on a large, complicated project, of course you should be systematic about it and control your dependencies and automate your processes. Even if you’re only working on a small project, low cost tools like jQuery or SASS might more than pull their weight. But it’s important to choose tools that fit the problem and offer a good cost/benefit ratio. Most web projects aren’t large and complicated, and many don’t need elaborate build processes and package management schemes at all. There is no good reason that such projects should give up on a simple, effective tool like jQuery just because you can also solve the same problems now with heavyweight tools like React and Browserify and some combination of NPM-managed packages.
Re: You Don't Need JQuery
#138Earlier quoted context omitted.
Yeah, the problem with jQuery is all that other stuff that nobody uses and backwards compatibility with browsers nobody supports. A "lite" jQuery with the same familiar API but a stripped-down featureset for higher performance and smaller size would be nice.
Just use the CDN copy of jquery and it will be cached in the users browser already since so many websites already use it.
So ..using jQuery via a CDN, depending on which you use you have a 1 in 119, or 1 in 833 chance of the user having a cached copy. http://www.i-technology.net/2013/11/the-myth-of-cdn.html
more data: http://www.stevesouders.com/blog/2013/03/18/http-archive-jqu...
There are valid reasons to use a CDN (get the scripts closer to the end user, offload the data transfer costs to the CDN provider, etc) but it isn't due to the potential for a cache hit.
Re: You Don't Need JQuery
#139Imperative DOM manipulation is a pain one way or another. React does a great job of alleviating this pain by allowing for declarative DOM manipulation, but it would be great to be able to do this without needing the rest of React.
https://github.com/Raynos/mercury
See also Raynos's "NPM-style Frontend" presentation: