August 18, 2017

JavaScript – “Frame” of Mind

Utilizing JavaScript is a fundamental part of web design and development. From aesthetic to functional, JavaScript is your tool of choice. Where JavaScript may be a Phillips screwdriver in one browser, it becomes a flathead in another, and a hammer in yet another. The pain of cross-browser compliance coupled with the advanced animation and AJAX functionality that JavaScript allows has birthed a slew of powerful JavaScript frameworks. Learning these frameworks is often like learning a new language – they have a hint of their mother’s features, yet still are a totally unique creation. Forums are flooded by fledgling web professionals with the following question: “What JavaScript framework should I learn/use?” What if the answer you gave, and they accepted, was “None.”

Wait! Give me a second to put on my protective equipment before all you avid jQuery, MooTools, Prototype, etc. fanboys begin your verbal assault on me for defaming your JavaScript framework. You don’t have to convince me that these frameworks have a mile long list of advantages over pure JavaScript coding. I thought about illustrating the difference with an example of code written in pure JavaScript compared to a few select frameworks, but realized this would be a waste of space. Why then do I argue against encouraging would-be web professionals from learning a JavaScript framework? The answer is that I’m not.

Although many forums and blogs across the net would tend to suggest otherwise, there isn’t a clear JavaScript framework that sits above the rest. If one framework has a desirable feature, it’s only a matter of time before the other frameworks catch up. This cyclical process continues to advance all the existing and even new frameworks. Yet, despite these similar features and functions, each has their own flavor of JavaScript syntax that makes it less than easy to jump from one to the other. Yet when you move from one open-source tool to another, you often run into a different a JavaScript framework in each. The diversity among major open source tools also supports that there is no clear favorite in this comparison, and this same diversity is the primary reason why I would never suggest a framework to a virgin JavaScript developer. What benefit would it be for Jimmy to learn jQuery and then get his first real professional project on an existing Joomla! Platform? Not much, considering Joomla!’s choice of JavaScript framework is MooTools. We can switch the framework and open source tools around to form an infinite amount of negative situations when we restrict our young web professional.

Thus, my answer the the million dollar question above is this: don’t learn any JavaScript framework just to learn it. Instead, wait for that first project where a JavaScript framework is already in place, or, if one is not, take the opportunity to learn one that best fits that situation. What you can learn now, which will make learning that first framework that much easier, is how momma JavaScript works. The greatest resource I have ever found on this is Douglas Crockford’s lectures on Javascript. Understanding the fundamentals and advanced features of JavaScript will create an easy transition into whatever framework life chooses for you. Why become a master of a framework that you may never have a professional need for? Instead, let the JavaScript framework choose you.

Michael Marr
About Michael Marr 1 Article
Michael Marr is a staff writer for WebProNews