More articles

JavaScript Doesn't Get Enough Credit

Written by
Filed under
Published on
Modified on

I've worked as a programmer for many many years and in my corporate travels I've noticed that usually there's this idea, this stigma if you will, in the programming world that JavaScript is solely a front-end tool and not meant for back-end developers and that it's as easy as pi. It's something that I hear all the time and it's time to talk a bit about that because nowadays JavaScript is so much more important to web development, both front-end and back, than many other technologies out there. Particularly nowadays, that websites are going 2.0 / 3.0 and usability is king.

"Just get that code written, and give the JavaScript to the designer"

Oh how I wish I could do that Mr. project manager. In the past couple of years JavaScript has quickly grown to become of my favorite programming languages for many reasons. Some being that it's very powerful and that all it requires is notepad and almost any browser. But because of that, it also gets the reputation of being an easy to use and easy to understand language. And I'll say this, if you think that JavaScript is easy to use and understand, then you're probably doing it wrong. And if all you've used is jQuery and fade in's and toggles, then you're also probably doing it wrong also.

JS has its place in many facets of web development. You can use JavaScript solely as a front-end tool. For example, you can use it to make a button disappear when a user clicks on it or to create some fancy animations and transitions. A web designer could definitely spend some time running through a webpage and adding effects here and there and improving the UX. This definitely does not equate though to creating dynamic pages that incorporate web services and 3rd party libraries. Or creating real time communication applications or HTML5 animations. Both two completely different things, and both require a completely different skill set. And more important, both of those things are handled by JavaScript.

I was recently tasked with recreating a companies search page using a 3rd party API. That API relied heavily on, you guessed it, JavaScript. It was a modern Ajax API, which for the most part was pretty straightforward and well documented. What wasn't straightforward was what the client had in mind for a user interface, which involved the most complex use of data since humans learned to analyze other star systems. Algorithms had to be designed and created and performance had to be optimized as this particular web page involved some hefty data sets. About halfway through the project I was told to hand off the rest of the JavaScript to the web designer so that I could focus on the "code". Little did people realize that this is the code. And since I'm not about to waste some poor designers time and take years off of his life, I argued that he would have no idea how to complete this project. He had no knowledge of the database schema, the MVC framework, or the 500 lines of somewhat cryptic formulas scattered throughout the js file.

JQuery vs JavaScript

jQuery is for sure a front-end developer tool. It makes certain visual tasks 10 times easier to implement, such as making areas on a page disappear or making them magically appear. It's also the best choice for making websites more browser compatible. It's also not "better" than JavaScript. I've heard countless people mention that jQuery is "better" than JavaScript and how they're going to be making the big switch. And I feel bad for those people, because obvious reasons. jQuery is just a tool. And like any tool, it has its time and it has its place. It's not there to replace JavaScript by any means.

Also, jQuery is difficult. And I don't mean using jQuery is difficult. I mean jQuery itself is a complex beast. I wish I was John Resig sometimes. But that's a post for another time. Understanding jQuery is very important in web development as it can help in debugging and optimizations. Before jQuery, fading out an element required a timer running at a certain speed to give the desired effect of fading out and reducing the width/height of an element per tick. Nowdays you call fadeOut('fast') and you're a JavaScript hero. However, you still have the option to do it yourself, and you might just need to depending on the situation.

JavaScript Today

I sometimes need to use JavaScript to hide a div, but for the most part most of my JavaScript programming revolves around more complex tasks, usually involving multiple web services, multimedia, animations, timing events and of course compatibility with all known browsers. For the most part I can't split off the JavaScript code to hand to someone else. It's usually tied heavily to the database layer and to some extent to the back-end layer. And that's the current state of JavaScript. It's much much more than just a front-end tool and much more than a back-end tool.

More recently we've gotten a swarm of new JavaScript libraries popping up, such as Angular.js, Knockout.js, React.js, Node.js, and that list goes on and on. JavaScript has gotten alot of attention during the past couple of years and that has resulted in many many developers getting their hands dirty to see what they can do with it. JavaScript is no longer just a designer tool as it once was. It's a complex beast that can do some pretty amazing things to websites. It can bring real time communication to anyone with a browser, and it can make full high res video games come to life. Web sockets, multithreading, OOP, and countless new uses that are currently being developed.

Walter Guevara is a Computer Scientist, software engineer, startup founder and currently mentors for a coding bootcamp. He has been creating software for the past 15 years.
Buy me a coffeeBuy me a coffee
Land your next big coding job. Search through 1000's of job listings.

Discussion / Comments / Questions

No messages posted yet

Add a comment

Send me your weekly newsletter filled with awesome ideas
Post comment