5 ms·
Is it just me, or using jQuery for a complex web app in 2015 looks like, mmm, a bit strange choice? The author has, of course, done a great job, for we see a w
by nine_k 11y ago
Is it just me, or using jQuery for a complex web app in 2015 looks like, mmm, a bit strange choice?
The author has, of course, done a great job, for we see a working app; this trumps almost any objections. Kudos to the author.
But if you developed a spreadsheet of a similar functionality, would you choose plain jQuery and writing state machines by hand? Or would you be forced to use jQuery because you'd have to use key components based on it?
- sandGorgon 11y agohttps://github.com/Spreadsheets/jQuery.sheet/issues/91#issuecomment-179567944 https://github.com/Spreadsheets/jQuery.sheet/issues/91#issue... >There has been a big push to move to native Dom rather than jquery, in pretty Much every way. The default wrapper is still jquery, but the internals are 99% dom only. The speed gained from that move are substantial.
- nine_k 11y agoSounds good!
- dthakur 11y agoI'm not the author but I imagine it would be hard for the author to decide which way to go. He/she could choose a library/framework (say react or angular) but then you'll exclude people not using these libraries. jQuery is the common denominator which would allow the broadest support. EDIT: of course eliminating jQuery entirely would be even better
- blhack 11y agoSo far nobody has been able to give me a real reason why not to use jquery other than "because it can get really slow if you use it for the wrong thing." This uses jquery, and isn't really slow. Why is it the wrong thing for this project?
- nine_k 11y agojQuery can of course be used, it just makes a complex app more complex than it could be were it using a higher-level toolkit. It's the same reason you use Python or C# for their higher-level abstractions instead of plain C.
- JustSomeNobody 11y agoBecause w/out <insert popular framework> it is just not REAL programming. /s
- tomcam 11y agoBecause it's well tested for cross browser support on many, many variations of browsers and operating systems.
- jorgecurio 11y ago> Is it just me, or using jQuery for a complex web app in 2015 looks like, mmm, a bit strange choice? This statement is everything that is wrong with the Javascript craze. It's not even 2015, it's 2016 and the argument for not using jQuery is that it's not trendy. Since when are we so obsessed with looking trendy and keeping up with fashion? I still see people using php + jQuery to build apps that otherwise would've taken twice the time and twice the amount of bugs that take twice the number of developers. Tech stack should be chosen based on merit that can only be built through the test of time. This is why I'm against using Node.js to write CRUD apps and why I'm against writing everything from scratch because it's the 'right' way. Guess what, 'right' or 'wrong' wont matter if the tech stack you chose slows you down or hurts other important requirements. Why novelty is rewarded over reliability in SV, I'd never fucking get.
- nothrabannosir 11y agoI'm there with you, except that jQuery in 2015(/2016) is not just about fashion; it's about technical merit. The biggest selling point for jQuery was unifying the mess of browser APIs under one, consistent API. Back in 2006 browser support for ecmascript was so haphazard that writing vanilla JS was an absolute ache. Or so I hear. As years progress, browsers become steadily more conformant. In tandem, jQuery's value drops. Meanwhile, cost (speed, size) remains constant. This argument can be made without considering fashion; even if nobody had ever written a single library after John Resig did, jQuery in 2015 could still be considered an strange choice just for that.
- FooBarWidget 11y agojQuery is still a whole lot easier to use than native DOM APIs.
- tlrobinson 11y agojQuery is a thin wrapper on the DOM APIs. React and similar tools are entirely different (better, IMHO) abstractions.
- luchadorvader 11y agoIf I was developing a spreadsheet in the browser I would use the lowest level abstraction possible for performance (which is what they're doing since the jQuery is just a wrapper). When you're potentially managing tens of thousands of rows of cells no matter what you use its going to start to chug and solutions using abstraction on top of abstraction on top of abstraction will start to chug a whole lot quicker than vanilla JS.
- tlrobinson 11y agoDisagree. With the right abstractions (like a "virtualized" table such as react-virtualized https://bvaughn.github.io/react-virtualized/ https://bvaughn.github.io/react-virtualized/) you won't ever need to render tens of thousands of cells simultaneously. But feel free to implement your own virtualized table if you really don't want "abstraction on top of abstraction on top of abstraction"
- true_religion 11y agoI went back and forth with this idea; but in the end I took a read over the Jquery code. It's very helpful since they mark down what browser bug is being worked around in every instance. After reading through it fully, I found that if I wanted real IE 8/9 support then jQuery was the only answer for complex dom interactions because all the other systems not built on jQuery have either dropped IE8 support (like React), or are for business domains where IE8 support isn't an issue. Anyways; there's no reason you can't use jQuery + React.