DEV Community

Discussion on: What are the latest trends in front-end JavaScript?

Collapse
 
etresoft profile image
John Daniel

Which would be better? To receive a nickel for every time someone says jQuery is trending down or passé? Or to receive a nickel for every time someone uses jQuery to solve a problem?

Regardless of any nickel distribution rates, those two actions are consistently two of the top trends in front-end Javascript.

Collapse
 
stefandorresteijn profile image
Stefan Dorresteijn

I've worked with people who used jQuery to solve ReactJS problems. I don't think jQuery is every fully going to disappear.

Collapse
 
ethanarrowood profile image
Ethan Arrowood

I wonder what problems they are solving. I've found using the native DOM api much more efficient and easier to maintain than using jQuery. Also I think React has exposed a new document model api so I can't imagine there is any use for jQuery in React.

Thread Thread
 
stefandorresteijn profile image
Stefan Dorresteijn • Edited

There really isn't any use for it but people stick to what they know. In this case it was about Bootstrap functionality being called from React components using jQuery instead of the React Bootstrap packages.

Thread Thread
 
vitalcog profile image
Chad Windham

"There really isn't any use for it but people stick to what they know"

This, and only this is the explanation of people using Jquery now days. (okay there are also some occasional "it makes it easier for me to support IE" situations, but still...)

Collapse
 
vitalcog profile image
Chad Windham

"I don't think jQuery is every fully going to disappear"

Well, there are still COBAL jobs around. And Jquery was literally used in 90+% of EVERYTHING on the web for a long time. So it will stick around for a very, very long time. (Combined with the fact that some developers will keep using it because "$() is so much less work than document.querySelector()" )

I've personally been in the dev world for a very short amount of time. And I've already met several developers who, ultimately, are pretty darn good devs, but still can't make a web page without Jquery. They just haven't been able to adapt. I never want to be that person...

(Those same devs also tend to suck at modern CSS, like display: flex/grid for layout stuff, and HAVE to use bootstrap...)

Thread Thread
 
jenc profile image
Jen Chan • Edited
And Jquery was literally used in 90+% of EVERYTHING on the web for a long time.

I missed that boat...

Thread Thread
 
stefandorresteijn profile image
Stefan Dorresteijn

Be glad, it was not a great time for frontend development

Thread Thread
 
jenc profile image
Jen Chan

What is wrong with Jquery? An extra 200kb never killed any page no?

Thread Thread
 
vitalcog profile image
Chad Windham

Nothing is "wrong" with Jquery. But I literally write vanilla JS faster than Jquery (because I don't use Jquery, so I always have to refer to the docs more often.) Modern JS isn't hard. If somebody has to use Jquery because they can't write vanilla JS they are holding themselves back. So for me, an extra 200kb of dead weight I don't use, would bother me.

Collapse
 
vitalcog profile image
Chad Windham

"a nickel for every time someone uses jQuery to solve a problem"

That isn't a trend. That is people being stuck using an older method they are more comfortable with versus using a newer (arguably better) method that they are uncomfortable with.

Collapse
 
etresoft profile image
John Daniel

You are probably right. It is quite common to see people using whatever the latest Shiny New Thing is being blogged about and then having to deal with buggy behaviour, crashes, untested edge cases, and security flaws. I guess I'm "stuck" with my successful and profitable app that I don't have to completely re-test with every update or rebuild from scratch just to impress someone on the internet.

Thread Thread
 
vitalcog profile image
Chad Windham

Yeah sure. I'm actually an advocate of just using the base tech though. The "better" method I was referring was writing javascript without Jquery. If you can't do that then what are you doing? Javascript isn't a "shiny new thing" btw... Didn't mean to offend you.

Thread Thread
 
etresoft profile image
John Daniel

I thought you were talking about angular, vue, react, or any one of a dozen trending frameworks. I have had situations where either I didn't want to include jQuery or I couldn't due to certain technical restrictions. In those cases, writing raw Javascript is the only option. While I can do that if I need to, it is not a good idea to eschew low-cost and low-risk assistance without good reason. Sometimes, that is a hard decision to make, but not with jQuery vs. nothing.

Thread Thread
 
vitalcog profile image
Chad Windham

I have to use frameworks everyday. So that I can get paid. I don't like them very much, but knowing how to use them pays well at the moment. I don't even like CSS preprocessors because they seem useless to me. (Just to be clear, I can and do use them, because work, I just don't like them.)

I've commented in other posts on Dev.to that

Business requirements ≠ trendy frameworks

Most (even at an enterprise level) web app requirements would not be too hard to meet with HTML, CSS and vanilla JS. I think frameworks (while amazing works of software engineering) are VERY overused right now.

"it is not a good idea to eschew low-cost and low-risk assistance without good reason"

Can you give me an example of how using Jquery vs writing modern JS without Jquery is compromising low-cost/low-risk assistance? I have yet to run into a situation that I needed Jquery for (other than business requirement where I had to put in a bootstrap datepicker that required Jquery). But even sanitizing forms/inputs with vanilla JS regex expressions seems pretty quick and easy to me. Jquery is literally nothing special, deep down it is just JS so what is it needed for?

Thread Thread
 
etresoft profile image
John Daniel

I agree with you about the CSS preprocessors. I tried one once and was not impressed.

I think the difference is that I don't get paid. I have my own business. My revenue is direct from my end users. That is an anomaly these days. More importantly, it is a completely different mindset. I don't need to impress anyone with my resume. I don't need to impress clueless managers with buzzwords that they recognize, but don't understand. I don't have a development budget where I can pick and choose tools based on their cost rather than their value. What drives modern technology is almost entirely social. People want to impress with their buzzwords and the size of their budgets. The ideal, sweet spot is a set of frameworks that helps developers advance their careers with Shiny New Things and helps managers maintain a bloated budget to pay for it all. If you are one of the Big Boys, its all just free money after all.

But for me, I pick tools and technologies based entirely on value. It isn't that I'm "comfortable" with old tools or "uncomfortable" with new ones. If I can knock something out with Perl, XSL, XML, or Objective-C with a minimum of time and effort, why would I do something else? That is literally taking food off the table. If jQuery does it and I can hack it up in 5 minutes, why spend the time to roll my own? When I need to do Javascript, jQuery is one of those rare tools that makes problems go away.

Thread Thread
 
vitalcog profile image
Chad Windham

It sounds like we have very similar mindsets. I personally make it a point to not use jquery because I want to be able to code whatever it does just as quickly with modern vanilla JS. But I'm also very intentionally pursuing being really, really good at JS. But that is very specific to what I do and suites my career as a "UI" developer well at the moment. Sounds like you are much more well rounded in your skill set than I am so makes sense to not invest extra time in learning bare bones es6 as a focus.

Collapse
 
6temes profile image
Daniel

At my day job, I work in a Rails + React/Redux app and it is really fun to work with.

On the other hand, I just started a side project and the amount of hours I can spend on it is limited Because of that, I chose to "go back" to the regular Rails with some sprinkles of jQuery for some animations and I must say that, not only it makes my life really easier, but it also allows me to develop really faster.