JavaScript or jQuery?

Share:

Whenever I search for an example of how someone has produced an effect or animation in JavaScript the majority of the time I end up finding jQuery examples instead of native JavaScript.

JavaScript or jQuery

I know jQuery is very powerful and has a lot of useful methods, as well as a very large following with developers, but I worry about new developers missing out on learning JavaScript and going straight into jQuery.

You may ask what is the issue with this as they do the same thing don’t they? Well, I have been told that jquery is a library that just translates your code into JavaScript, but makes it easier to write. That’s fine for developers, but what about users?

Issues with jQuery

When a user visits your site they have to download your webpage and your scripts,but also another library, before they can use your page as you want them to. You could try and improve page loading time through the jQuery CDN, but I recently read an article that gave examples of where sites failed to render at all due to jQuery CDN being blocked. This is a rare example, but it can happen.

Therefore, I think more needs to be done by the web development community to promote JavaScript learning. You can start by learning more of it yourself and every time you write a tutorial, consider giving a JavaScript example alongside the jQuery examples.

The other thing to consider is the rise of server side JavaScript such as Node.js. If you learn jQuery then these skills are not as easily transferable to Node.js if you ever wanted to use it in future. A lot of new technology has decide to utilise JavaScript as its programming language due to its flexibility and lightweight nature, such as the Internet of Things.

Is JavaScript is the answer then?

I’m not the best person to be giving this advice, mainly because I am lazy. This site uses foundation 5 as its front end which utilises jQuery. So what am I going to do about it? Probably nothing, but one day I might surprise you and write everything from scratch.

It sounds liberating coding everything yourself and not relying on libraries, but then you are missing out on support from the community. JQuery is regularly updated and implements new browser technologies. If you want a new feature then you can update jQuery and migrate your code.

So what should you do?

Well, I don’t think there is a definitive answer that applies to all projects. I think you need to consider what you use at the design phase of a project.

I’m as guilty as most at rushing into coding once the look and feel design has been confirmed, without considering what technology is best for that project.

The other consideration is skills in the team. Will it take too long to skill up your team in a new technology to meet the deadline? But if you don’t do it for the current project, will you ever make time to learn it?

Tagged with development

Recent Posts

Published: Sep 8, 2017

It has been a long time since I last updated the design of my site and as a Frontend Developer it didn’t seem right to wait any longer. I have used a variety of different frontend frameworks in the past, from Foundation, to Bootstrap, but this time I wanted something different, so with a cup of coffee in hand I started looking for something new.

Published: May 20, 2017

I’ve been looking into different JavaScript frameworks for a while and there seems to be a big following for Vue.js throughout the Laravel community. Therefore, I thought I had better give it a look and see what its all about.

Published: Apr 1, 2017

My job title is frontend web developer, and I am confused. I am in a situation where there are now so many different options for me to start learning that I don’t know where to start. I always find a good place to start is the beginning, so here goes a little history lesson.

Published: Aug 10, 2016

Its easy to start writing code without thinking about the organisation, but take some time to plan and it will reward you later. Sometimes a new project is so exciting you just want to start coding and making things work, thinking that you will sort out the structure at a later date. After all, who cares as long as it works, right?

Published: Jul 11, 2016

There is a great tool available called Page Speed insights. It gives you an easy to use tool that you can use to measure the speed of your site out of 100. It gives you hints and tips about how you can improve the score of your site, through compressing JavaScript, reducing server response time and eliminating render blocking JavaScript and CSS. The idea being it gives visitors to your website the best experience.

Shirt