• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

Do you really know Javascript or just a Javascript framework?

General · November 28, 2012

Every web developer you will mostly encounter (a good portion of them anyway) is a liar. They’re lying to themselves, they’re lying to their colleagues and family, they’re lying to their employers. The biggest lie is being told since, “No honey, your butt doesn’t look big in those tight jeans”

What am I talking about? Javascript. Most developers if asked would tell you that they know Javascript quite well, but don’t know it as well as they should and actually really only know the frameworks they’re using, usually jQuery. This leads me to these questions: do many people actually know Javascript and have frameworks created a generation of developers who don’t know the underlying language they’re using? You’ve learned the framework, but do you understand the language?

The framework in question here is jQuery. Don’t get me wrong it’s the best thing to happen to web development, but just how many developers out there think $(selector) is something you can do in plain vanilla Javascript? How many developers out there opt for jQuery’s .each method instead of a good ol’ fashioned for loop just because it’s easier? While some of jQuery’s shortcut methods do save time, they are sometimes slower due to support for multiple browsers and having to do things a little differently to work within the constraints of the framework.

This JS Fiddle compares the performance of jQuery’s .each function with a for loop, provided you write a decently optimised for loop with caching it can be considerably much faster to the point where it does make a difference especially if you are iterating over large datasets.

There are tonnes of things that jQuery does people don’t realise would else-wise take a considerable amount of time to write, it saves time but usually at the cost of a slightly and sometimes a large performance hit. To be honest I feel like I don’t understand Javascript as well as I should, jQuery has made me lazy to the point where I’ve been more than guilty of writing less than ideal code just because I knew how to do it in jQuery but not how to do it in vanilla Javascript.

Browsers are at a point now where you can get away with writing bad Javascript, because Javascript engines of web browsers (especially Chrome) are so fast and efficient you don’t notice the 500ms performance hit you’re taking because you wrote a bad selector or loop.

For the sake of the language, think outside of the box every now and then like I’ve started doing. Take the time to find out how that particular jQuery method works and if there is a more efficient way of doing it and in the process making yourself a better developer who isn’t restricted to doing things one way and relying on a framework which is a position you should never find yourself in irrespective of whether or not you’re using Javascript or Ruby.

Dwayne

Leave a Reply Cancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular

  • I Joined Truth Social Using a VPN and Editing Some HTML to Bypass the Phone Verification
  • Testing Event Listeners In Jest (Without Using A Library)
  • Thoughts on the Flipper Zero
  • How To Get The Hash of A File In Node.js
  • Waiting for an Element to Exist With JavaScript
  • How To Paginate An Array In Javascript
  • Handling Errors with the Fetch API
  • How To Get Last 4 Digits of A Credit Card Number in Javascript
  • Wild Natural Deodorant Review
  • How To Install Eufy Security Cameras Without Drilling or Using Screws

Recent Comments

  • CJ on Microsoft Modern Wireless Headset Review
  • Dwayne on Microsoft Modern Wireless Headset Review
  • CJ on Microsoft Modern Wireless Headset Review
  • john on Microsoft Modern Wireless Headset Review
  • Dwayne on Why You Should Be Using globalThis Instead of Window In Your Javascript Code

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz