JavaScript | Introduction to JavaScript | Part-1
Introduction to JavaScript - Today in this blog we will discuss about another programming language which has been very useful over the period of time i.e. JavaScript. So to begin with we will discuss about the basics of JavaScript, where we can use JavaScript and the advantages and disadvantages that JavaScript possess.
So let us begin by discussing what is javascript?
JavaScript is a programming language that was designed initially to interact with the elements of web pages. A web browser , javascript consists of mainly three parts which are defined below:
- ECMAScript that provides the core functionality.
- The document object model (DOM) which provides the interfaces for interacting with elements on web pages.
- The browser object model (BOM) provides the browser API for interacting with the web browser.
Javascript is mainly used with HTML & CSS to enhance the web page functionality such as to validate the form, create interactive maps and to show animated charts. When the web page is loaded, i.e. when HTML & CSS are downloaded, javascript engine in the browser executes the javascript code. The javascript code modifies the HTML & CSS to update the user interface dynamically. Traditional javascript engines were implemented as interpreters whereas modern javascript engines are compiled as just-in-time compilers that converts javascript code to bytecode for enhanced performance.
Javascript was created by Netscape developer named as Brendan Eich in 1995. Initially javascript was named as Moch then it was renamed to Livescript. It was Netscape who decided to change the name from Livescript to javascript to make use of java's fame which was popular at that point of time.
JavaScript had no standards that defines it syntax and features up until 1997. Finally in 1997 Javascript 1.1 that was released by Netscape in Netscape navigator 3 was submitted to the European Computer Manufacturers Association (ECMA) as a proposal. A Technical committee was assigned to standardize the language to make it as a general purpose, cross-platform and vendor-neutral scripting language. Technical committee came up with ECMA-262, a standard defining a new scripting language ECMAScript.
Now we will discuss the uses of javascript i.e. where can we use javascript. So the various uses of javascript are as follows:-
- Add interactive behavior to web pages i.e. to display or hide information with the click of a button, playing audio and video in a web page, display animations and zoom in and zoom out of an image.
- Creating web and mobile apps - With the help of javascript framework developers can build web and mobile applications. Javascript frameworks are collections of javascript code libraries that has pre-built code that we can use for our routine programming features and tasks.
- Build web servers & developing server applications - Along with web and mobile applications with javascript developers can also use javascript to build web servers.
- Game development - We can create browser games using javascript.
Next we will discuss the advantages and disadvantages of using javascript. Let us first discuss the advantages of Javascript.
Advantages of javascript
- Speed - Client side javascript is fast as it can run immediately within the client-side browser.
- Simplicity - Javascript is simple to learn and implement.
- Popularity - We can use javascript everywhere on the web.
- Interoperability - Javascript comes up nicely with other languages and can be used with variety of applications.
- Server Load - Being a client side it reduces the demand on the website server.
- It provides the ability to create rich interfaces.
Disadvantages of javascript
- Client-Side Security - The code is executed on the user's machine, that is why it can be exploited for malicious purposes. This is the reason many people choose to disable javascript.
- Browser support - Javascript in most cases is interpreted differently by different browsers. That is why it makes javascript difficult to write cross-browser code.
So with that we have come to the end of our blog where we discussed the introduction to javascript what are the advantages and disadvantages of using javascript and last but not the least where javascript can be used.
I request everyone of you to please go through the whole blog and provide your valuable feedback as feedback provided really matters the most to me.
Comments
Post a Comment