HENRY'S BLOG

What's cool about Javascript?

Why is Javascript so popular?

í
Javascript (JS) is one of the most simple, versatile and effective languages used to extend functionality in websites. Uses range from calculating data on web pages to on screen visual effects as well as complex functionality extension of websites. However, it doesn’t only have advantages. In the following I will list the pros and cons.

Pros

ì í
Javascript is executed on the client side
This means that JS saves bandwidth and strains the server less. As the code is executed on the user's computer, it also means that the results and processing is completed almost instantly depending on the task as it does not need to be processed in the site's web server and sent back to the user.

Javascript is EASY
The Javascript language is close to English and can thus be learned relatively fast. Because it makes use of the DOM model that provides a lot of prewritten functionality to the various objects on pages, it’s perfect for solving web development problems.

Extended functionality to web pages
Third party add-ons enable Javascript developers to write snippets. These snippets can then be executed on a desired webpage to extend its functionality. There are several ways for testing a snippet. A very popular plugin is Greasemonkey.

Cons

ì í
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 certain restrictions are set by modern web standards on browsers, malicious code can still be executed.

Javascript rendering varies
Just like for HTML, different layout engines (inside of browsers) may render Javascript differently. This can result in inconsistency in terms of functionality and usability. While the latest versions of javascript and rendering have been geared towards a universal standard, certain variations still exist.

Outlook

ì í
Nowadays, especially Node.js is gaining momentum, and it seems that it will overtake PHP and other software platforms that were means of choice for developing dynamic web apps. For further reading on that I can recommend this blog post.