JS

JavaScript: Advantages And Disadvantages

JavaScript is one of the most simple, versatile and effective languages used to extend functionality in websites. Uses range from on screen visual effects to processing and calculating data on web pages with ease as well as extended functionality to websites using third party scripts among several other handy features, however it also possesses some negative effects that might make you want to think twice before implementing JavaScript on your website. Let's look at some of its pros and cons.

Advantages

  • JavaScript is executed on the client side
    This means that the code is executed on the user's processor instead of the web server thus saving bandwidth and strain on the web server.
  • JavaScript is a relatively easy language
    The JavaScript language is relatively easy to learn and comprises of syntax that is close to English. It uses the DOM model that provides plenty of pre-written functionality to the various objects on pages making it a breeze to develop a script to solve a custom purpose.
  • JavaScript is relatively fast to the end user
    As the code is executed on the user's computer, results and processing is completed almost instantly depending on the task (tasks in JavaScript on web pages are usually simple so as to prevent being a memory hog) as it does not need to be processed in the site's web server and sent back to the user consuming local as well as server bandwidth.
  • Extended functionality to web pages
    Third party add-ons like Greasemonkey enable JavaScript developers to write snippets of JavaScript which can execute on desired web pages to extend its functionality. If you use a website and require a certain feature to be included, you can write it yourself and use an add-on like Greasemonkey to implement it on the web page.

Disadvantages

  • Security Issues
    JavaScript snippets, once appended onto web pages execute on client servers immediately and therefore can also be used to exploit the user's system. While a certain restriction is set by modern web standards on browsers, malicious code can still be executed complying with the restrictions set.
  • JavaScript rendering varies
    Different layout engines may render JavaScript differently resulting in inconsistency in terms of functionality and interface. While the latest versions of JavaScript and rendering have been geared towards a universal standard, certain variations still exist. Website Usability Consultants all over the world make a living on these differences, but it enrages thousands of developers on a daily basis.



Subscribe us on Youtube

Share This Page on


Ask Question