Introduction to JavaScript



Introduction to JavaScript
Introduction to JavaScript




JavaScript Introduction
JavaScript was developed by Brendan Eich in 1995, and became an ECMA standard in 1997. ECMA-262 is the official name of the standard. ECMAScript is the official name of the language.
JavaScript and Java completely different from each  other both in design  and concepts.
Today HTML,CSS and JavaScript are very much crucial scripting languages for web developers. Let us understand their role in web development
HTML-is used to define the content of a web page.
CSS-is used to specifies layout of a web page.
JavaScript- programs the behavior of a web page.
JavaScript is a lightweight, interpreted scripting programming language. It is designed for creating network-centric applications. JavaScript is extremely easy to implement because  it's integrated with HTML. It is open and cross-platform.
JavaScript can be used in developing great front-end also as back-end softwares using different Javascript based frameworks like jQuery, Node.JS etc.

Javascript comes installed on every modern browser then to find out Javascript you actually don't need any special environment setup. For example Chrome, Mozilla Firefox , Safari and each browser you recognize as of today, supports Javascript.

Javascript helps you create really beautiful and crazy fast websites. You can develop your website with a console like look and feel and provides your users the simplest Graphical User Experience.

JavaScript usage has now extended to mobile app development, desktop app development, and game development. Due to its vast applicability, there's plenty of job options in the market with good payout.
Great thing about Javascript is that you simply will find plenty of frameworks and Libraries already developed which may be used directly in your software development which reduced the development time to great extent.
JavaScript code should always be written within <script>..</script> tags. You can place the <script> tags, containing your JavaScript, anywhere within your web page, but it is normally recommended that you should keep it within the > tags.The complete syntax of script tag is as under:
<script language = "javascript" type = "text/javascript">     </script>    
The script tag takes two important attributes −
·        Language − This attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.
·        Type − This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript".

Nowadays we can simply write script tag ignoring its language and type attributes.


JavaScript Framework and Libraries
JavaScript framework is an application framework written in JavaScript. It differs from a JavaScript library in its control flow: A library offers functions to be called by its parent code, whereas a framework defines the entire application design.
There are  so many useful JavaScript frameworks and libraries available:
·        Angular.js
·        React.js
·        jQuery
·        Vue.js
·        Ext.js
·        Ember.js
·        Meteor
·        Mithril
·        Node.js
·        Polymer
·        Aurelia
·        Backbone.js
Applications of JavaScript
 JavaScript is one of the most widely used programming languages (Front-end as well as Back-end). It has presence in almost every area of software development.
·        Client side validation - Sometimes, it is important to verify any user input before submitting it to the server and JavaScript plays an important role in validating those inputs at front-end itself.
·        Manipulating HTML Pages - JavaScript helps in manipulating HTML page on the fly. This helps in adding and deleting any HTML tag very easily using JavaScript and modify your HTML to change its look and feel based on different devices and requirements.
·        User Notifications - JavaScript is used to raise dynamic pop-ups on the web pages to give different types of notifications to your website visitors.
·        Back-end Data Loading - JavaScript provides Ajax library which helps in loading back-end data while you are doing some other processing.
·        Presentations - JavaScript also provides the facility of creating presentations which gives website look and feel. JavaScript provides RevealJS and BespokeJS libraries to build a web-based slide presentations.
·        Server Applications - Node JS is built on Chrome's JavaScript runtime for building fast and scalable network applications. This is an event based library which helps in developing very sophisticated server applications including Web Servers.
Advantages of JavaScript
The main advantanges of using JavaScript are −
·        Less server interaction − You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
·        Immediate feedback to the visitors − They don't have to wait for a page reload to see if they have forgotten to enter something.
·        Increased interactivity − You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.
·        Richer interfaces − You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.
Limitations of JavaScript
We cannot treat JavaScript as a full-fledged programming language. It lacks the following important features −
·        Client-side JavaScript does not allow the reading or writing of files. This has been kept for security reason.
·        JavaScript cannot be used for networking applications because there is no such support available.
·        JavaScript doesn't have any multi-threading or multiprocessor capabilities.
Hence, JavaScript is a lightweight, interpreted scripting programming language that allows you to build interactivity into otherwise static HTML pages.
JavaScript Development Tools
One of major strengths of JavaScript is that it does not require expensive development tools. You can start with a simple text editor such as Notepad. Since it is an interpreted language inside the context of a web browser, you don't even need to buy a compiler.
To make our life simpler, various vendors have come up with very nice JavaScript editing tools. Some of them are listed here −
·        Microsoft FrontPage − Microsoft has developed a popular HTML editor called FrontPage. FrontPage also provides web developers with a number of JavaScript tools to assist in the creation of interactive websites.
·        Macromedia Dreamweaver MX − Macromedia Dreamweaver MX is a very popular HTML and JavaScript editor in the professional web development crowd. It provides several handy prebuilt JavaScript components, integrates well with databases, and conforms to new standards such as XHTML and XML.
·        Macromedia HomeSite 5 − HomeSite 5 is a well-liked HTML and JavaScript editor from Macromedia that can be used to manage personal websites effectively.
·        Notepad++ - Notepad++ is a text and source code editor for use with Microsoft Windows. It supports tabbed editing, which allows working with multiple open files in a single window.

Comments

Most Popular Posts

Functions in Excel

Learn How to Create Company in Tally.ERP9

Mixed Supply and Composite Supply under GST