JavaScript Overview
JavaScript (JS) is a lightweight, interpreted, programming language with first-class functions. While it is most well-known as the scripting language for Web pages.
JavaScript is a prototype-based, multi-paradigm, dynamic scripting language, supporting object-oriented, imperative, declarative and functional programming styles.
JavaScript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event. JavaScript is an easy to learn and also powerful scripting language, widely used for controlling web page behaviour.
What is JavaScript?
JavaScript is a scripting language, created for making html-pages live. It turns the web into something more powerful than just interlinked html pages.
There is no direct or indirect relation between the Java and JavaScript language. It just coincidence that name is matching with each other. JavaScript has the language specification called ECMAScript.
Programs in JavaScript are called scripts. They need no compilation, you just write a script, append it to HTML-page and it works.
What JavaScript can do?
- JavaScript is able to change the content of the HTML page or manipulate the HTML page like add or remove the HTML tag from the page or change the styles of the HTML page.
- JavaScript can register the event on the any tag and fire or execute the code when the event is occurred like mouse click, mouse over or text change.
- JavaScript is able to send the request to the server and loads new data on the page. This technology also called the AJAX.
- JavaScript also can set and get the cookies, take inputs from the user
- and many more things.
What JavaScript can’t do?
JavaScript is a generic language, fast and powerful.
But execution in browser context implies certain security limitations.
Below is some task that JavaScript can not able perform:
- JavaScript can’t read/write to hard disk, copy files and call other programs. It doesn’t have direct access to the OS. Newer browsers provide such abilities, but in a very limited and secure way.
- JavaScript in one tab can’t affect other tabs/windows. There are exceptions, namely when two windows come from same domain.
- A page with JavaScript can do network requests on it’s own domain without limitations. A request to another domain is also possible, but security measures apply.
What’s so cool in JavaScript?
- Full integration with HTML/CSS
- Simple things can be done simply
- Supported by all browsers and enabled by default
Trends in JavaScript. HTML5.
- Reading/writing files on visitor’s disk (with proper security to keep it safe).
- A database embedded into the browser, which allows to store data on client side.
- Multithreading (can use multiple CPUs).
- Video playback.
- Drawing 2d and 3d, with hardware acceleration, just like in modern games.
- JavaScript is enhancing its abilities. It is becoming more and more powerful, trying to reach desktop apps.
- JavaScript is becoming faster and more stable.
- things are going to be compatible. Of course as far as we don’t use browser-specific features or early-adopted draft sections of a standard.
Alternative technologies
- Java Applet
- Adobe Flash
- ActiveX, browser plugins/extensions
- Silverlight, XUL, VBscript
But nowadays, JavaScript is much more popular any used widely. JavaScript has the great future, because the development in JavaScript is still alive. And now JavaScript’s official developer announced that now every year JavaScript will come up with some new features.