Pages - Menu

Tuesday, December 27, 2016

JavaScript Introduction

What is JavaScript?
JavaScript is a dynamic computer programming language with object-oriented capabilities. While, generally speaking, CSS is for presentation, HTML is for content and JavaScript is for interactivity.
JavaScript is lightweight and most commonly used in Web Applications to develop web pages. It allows client side script to interact with user and provide dynamic pages.

Initially, JavaScript designed for adding small amounts of interactivity to a page like hovers and animations and many more. Now, we can use use JavaScript for almost anything up to large applications and games, and can even be used in servers.

Advantages of JavaScript:

1. JavaScript is executed on the client side
This means the code is executed on the User's Processor instead of the Web Server. This saves server traffic, means less load on web server.

2. Immediate Feedback to the end users
Since Code is executed on the User's Computer, results and processing is completed almost instantly depending on the task.
They don't have to wait for a page reload to see if they have forgotten to enter something, as it doesn't need to processed in the web server and sent back response to user.

3. Increased Interactivity
You can develop the interfaces which react when the user hovers over them with a mouse or activates then using keyboard.

4. Extended functionality to web pages
You can create rich interfaces using JavaScript which include items as drag-and-drop components,sliders etc.
You can use third party add-ons like Greasemonkey or can write it by yourself to enable certain features in your web pages.

Disadvantages of JavaScript:

1. Security Issues
JavaScript Codes once appended into the webpages executes on client servers immediately, so it can also be used to exploit the user's system. While certain restrictions is set by modern web standards on web browsers, but still malicious code be executed complying with the restriction set.

2. JavaScript Rendering Varies
Different browser 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 standards, but certain variations still exists.

No comments:

Post a Comment