4 ms·
I don't think JQuery ever got bad. It just got unnecessary, like you said. But it took a lot of work to convince people that it was unnecessary. A charitable e
by danShumway 8y ago
I don't think JQuery ever got bad. It just got unnecessary, like you said. But it took a lot of work to convince people that it was unnecessary.
A charitable explanation of Sara's tweet might be that, like with jQuery, it is becoming difficult to convince new developers that React may not be necessary for their next project.
The other comparative downside of JQuery was that components started to rely on it as a shared library, which meant developers suddenly needed to do dependency management. That is (usually) a bad idea. React absolutely does have that problem as well - probably to an even worse degree than jQuery widgets ever did.
This is kind of the same concern I have with Vue to be honest. I use Vue for prototyping and will probably use it in some final apps as well. But I'm probably not ever going to use a component that someone else has written if it relies on Vue.
IMO Lodash went the right direction with this. A component or library can depend on Lodash, pull in just the functions that they use for a final build, and then nobody else in the entire dev toolchain needs to know or care. No risk of conflicting dependencies, build size stays low, etc...
I kind of wonder if the problems Vue solves for me could be solved better by a smaller, lodash-style library instead of a framework.
- jimmaswell 8y agoBeing used to jQuery, I really see no reason not to use it in new projects. I could learn all the new native equivalents, and even then still ending up doing more work than if I'd been using jQuery, just to save a little bit of page load time and filesize, but it would almost certainly not be worth it.
- 3131s 8y agoIt irks me that Javascript didn't just adopt the best parts of JQuery.
- vinceguidry 8y agoThere are still things you can only do with jQuery, I can't think of a better Swiss Army knife for small tasks.
- mxschumacher 8y agoit irks me to use common functions such as selectors and Ajax in jQuery that are much, much slower than their native counterparts
- tracker1 8y agoTake a look at zepto (or another jquery-like library), add some feature detection for IE polyfills, and switch to using fetch for ajax calls. Unless you're using a lot of jQuery dependencies, you'll cut your download size by more than half for most browsers/users. I'd never say don't use jQuery, and it does support some options for a minimal footprint, still there's smaller options that probably have all you need.
- isostatic 8y agoIndeed. I occasionally write a webbased tool to deal with a specific task (say formatting some form of codec data, or a simple dashboard for a specific event, or a small config generator, or whatever), userbase is in the <10 users (not concurrent) range, I don't give a stuff about scaling. I care that the code is in a repo (git, svn, whatever), is versioned (deb, rpm, whatever), and deploys cleanly. I could learn and use $latest_thing, and maybe it would be great. That will triple the time taken to develop, but whatever. However in a couple of years time when I come to need to write something else, $latest_thing will be old hat, and replaced by $shiny_and_new. Rather than having 10 years of nice simple code based on jquery, I get some based on Angular, some on React, some on Vue, some on Meteor, or whatever. I'm not a programmer, I'm not a wireman, and I'm not a carpenter. I program in the same way I'll run a network cable or get a screwdriver out, it's a tool I can use to solve a specific task. I like tools that are the same, year in, year out. That's not to say the latest frameworks aren't all great, if you're building something for a million users and want to take advantage of shiny new features that's great, but for those that aren't, there's still a place for boring old things in a large part of the computer industry.
- ape4 8y agoFor example, fetch() is built into browsers now but it doesn't have all the features of $.ajax()
- superfrank 8y ago> A charitable explanation of Sara's tweet might be that, like with jQuery, it is becoming difficult to convince new developers that React may not be necessary for their next project. That's fair. > The other comparative downside of JQuery was that components started to rely on it as a shared library, which meant developers suddenly needed to do dependency management. That is (usually) a bad idea. React absolutely does have that problem as well - probably to an even worse degree than jQuery widgets ever did. I totally agree with that, but I don't think you can use that as a knock against jQuery, react, or vue. I think developers, especially js developers with our love of pulling in external packages, have yet to find a great solution for dependency management. > IMO Lodash went the right direction with this. A component or library can depend on Lodash, pull in just the functions that they use for a final build, and then nobody else in the entire dev toolchain needs to know or care. No risk of conflicting dependencies, build size stays low, etc... I think lodash can work that way because most of its functions are small and self-contained. It's easy to just bundle in a few select functions when they functions are 100 lines max and don't need the rest of the library, but I don't think React or Vue could use a similar approach. Who is going to want to use a dropdown component that has the entire React 15.3 lib bundled into it?
- williamxd3 8y ago> Who is going to want to use a dropdown component that has the entire React 15.3 lib bundled into it? And who would want a dropdown component that has its own little rendering framework inside when you are using React for that?
- tracker1 8y agoMaybe not for a dropdown component, but I built a calendar component that stood alone using preact and redux, and the final size was still smaller than most calendar components of similar complexity.
- williamxd3 8y agoYeah, Preact is great for standalone widgets
- scotty79 8y ago> But it took a lot of work to convince people that it [JQuery] was unnecessary. First it took about a decade of browser and ECMA very intensive development to actually make it unnecessary. > it is becoming difficult to convince new developers that React may not be necessary for their next project. Give it a decade for the web "components" to actually become composable and for inventive and useful native language built-in solutions to state management to happen before you start advocating people out of React. Until then telling people they might not need React is not a step forward but backward. Imagine people saying "you might not need jQuery" in times where IE reigned and browsers were wildly incompatible.
- Waterluvian 8y agoYes that's really a great way of seeing it. Jquery kind of graduated to obsolescence as many of its useful features made it into core JS. When querySelector and ES6 came about, I found myself not needing jquery by default.