sobrenome Posted February 22, 2021 Posted February 22, 2021 We need faster communities to better ranking in google. Do we still need to load JQuery? Or the community could be updated to use only vanilla JavaScript and drop one more file that slow down the loading? 😁 https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/
Management Matt Posted February 22, 2021 Management Posted February 22, 2021 I feel like anyone who lived through 1999-2006 feels the answer to "Do we need jQuery" is a strong yes. Of course, we could remove jQuery. What jQuery does is make life simpler for developers (as well as resolve a lot of cross browser quirks so developers don't have to think too hard about that). What that blog effectively advocates is the reversal of the number one rule of programming "be lazy". Functions and methods are reusable for a reason. For an app as broad and as complex as ours, replacing jQuery with vanilla javascript isn't really viable. We have tens of thousands of lines of javascript code which will multiply into millions without reusable compact methods. For a single page website, you probably could just about tolerate it, but honestly I question the effort even then; other than to feel happy as you sip a soy latte while stroking ones hipster beard before adding "Built with ❤️ in vanilla Javascript" in the footer. Jordan Miller, Meddysong, Linux-Is-Best and 1 other 2 1 1
Makoto Posted February 22, 2021 Posted February 22, 2021 As JS continues to modernize and become more usable as a core scripting language, I feel like we'll see jQuery at the very least become superseded by something lighter and more powerful. But there's never likely a time where we'll move to just raw JS for complex applications. Some type of library will always be needed for the reasons Matt said. Those libraries will likely become lighter and faster, but they'll still exist. Linux-Is-Best, ptprog, Jordan Miller and 3 others 3 3
Management Matt Posted February 22, 2021 Management Posted February 22, 2021 3 minutes ago, Makoto said: As JS continues to modernize and become more usable as a core scripting language, I feel like we'll see jQuery at the very least become superseded by something lighter and more powerful. But there's never likely a time where we'll move to just raw JS for complex applications. Some type of library will always be needed for the reasons Matt said. Those libraries will likely become lighter and faster, but they'll still exist. Yeah, I agree. We picked jQuery a good while ago. If we were starting from scratch, we might pick something lighter now. sobrenome, Makoto and Jordan Miller 3
Rikki Posted February 22, 2021 Posted February 22, 2021 jQuery is obviously not needed in 2021 - I'd love to do away with it. In reality, we have many thousands of lines of JS and the cost/benefit of rewriting everything for that reason alone isn't really there. Plus, we'd likely end up with a lot of helper methods that are essentially reimplementing some of jQuery's helper methods. We use some of the more advanced jQuery features too, so it wouldn't be as simple as updating .find to .querySelectorAll. So, the answer is: yes, I agree, but it isn't as simple as saying "let's do that". Also, in reality, if we were going to take the opportunity to redo our entire frontend codebase, we'd likely move to a reactive framework to build a better frontend, rather than simply rewriting what we have now but without jQuery. This will happen in time - we can't stay with the same code forever - but again it's about finding the right balance. Jordan Miller, bfarber, Jim M and 4 others 5 2
sobrenome Posted February 23, 2021 Author Posted February 23, 2021 On 2/22/2021 at 11:23 AM, Rikki said: Also, in reality, if we were going to take the opportunity to redo our entire frontend codebase, we'd likely move to a reactive framework to build a better frontend It would be amazing to use IPS with Next.js. I did all that I could to meet google core web vitals standards, but my community is still ranked as poor. With the current IPS software design I suppose that is impossible to be ranked as fast by google. And for those that need Adsense, absolutely impossible. SUBRTX 1
Recommended Posts