Page 123 - CITS - Computer Software Application -TT
P. 123

COMPUTER SOFTWARE APPLICATION - CITS



           •  JavaScript was created in the first place for DOM manipulation. Earlier websites were mostly static, after JS
              was created dynamic Web sites were made.
           •  Functions in JS are objects. They may have properties and methods just like other objects. They can be
              passed as arguments in other functions.

           •  Can handle date and time.
           •  Performs Form Validation although the forms are created using HTML.
           •  No compiler is needed.
           Applications of JavaScript

           •  Web Development: Adding interactivity and behavior to static sites JavaScript was invented to do this in
              1995. By using AngularJS that can be achieved so easily.
           •  Web Applications: With technology, browsers have improved to the extent that a language was required
              to create robust web applications. When we explore a map in Google Maps then we only need to click and
              drag the mouse. All detailed view is just a click away, and this is possible only because of JavaScript. It uses
              Application Programming Interfaces(APIs) that provide extra power to the code. The Electron and React are
              helpful in this department.
           •  Server Applications: With the help of Node.js, JavaScript made its way from client to server and Node.js is
              the most powerful on the server side.
           •  Games: Not only in websites, but JavaScript also helps in creating games for leisure. The combination of
              JavaScript and HTML 5 makes JavaScript popular in game development as well. It provides the EaseJS library
              which provides solutions for working with rich graphics.
           •  Smartwatches: JavaScript is being used in all possible devices and applications. It provides a library PebbleJS
              which is used in smartwatch applications. This framework works for applications that require the Internet for
              their functioning.

           •  Art: Artists and designers can create whatever they want using JavaScript to draw on HTML 5 canvas, and
              make the sound more effective also can be used p5.js library.
           •  Machine Learning: This JavaScript ml5.js library can be used in web development by using machine learning.
           •  Mobile Applications: JavaScript can also be used to build an application for non-web contexts. The features
              and uses  of  JavaScript make it  a powerful tool for  creating mobile applications. This is a Framework for
              building web and mobile apps using JavaScript. Using React Native, we can build mobile applications for
              different operating systems. We do not require to write code for different systems. Write once use it anywhere!
           Limitations of JavaScript
           •   Security risks: JavaScript can be used to fetch data using AJAX or by manipulating tags that load data such
              as <img>, <object>, <script>. These attacks are called cross-site script attacks. They inject JS that is not part
              of the site into the visitor’s browser thus fetching the details.

           •  Performance: JavaScript does not provide the same level of performance as offered by many traditional
              languages as a complex program written in JavaScript would be comparatively slow. But as JavaScript is used
              to perform simple tasks in a browser, so performance is not considered a big restriction in its use.

           •  Complexity:  To  master  a  scripting language, programmers must  have  a  thorough knowledge  of  all the
              programming concepts, core language objects, and client and server-side objects otherwise it would be difficult
              for them to write advanced scripts using JavaScript.
           •  Weak error handling and type checking facilities: It is a weakly typed language as there is no need to
              specify the data type of the variable. So wrong type checking is not performed by compile.
           Why JavaScript is known as a lightweight programming language ?
           JavaScript is considered lightweight due to the fact that it has low CPU usage, is easy to implement, and has a
           minimalist syntax. Minimalist syntax as in, has no data types. Everything is treated here as an object. It is very
           easy to learn because of its syntax similar to C++ and Java.
           A lightweight language does not consume much of your CPU’s resources. It doesn’t put excess strain on your
           CPU or RAM. JavaScript runs in the browser even though it has complex paradigms and logic which means it


                                                           110

                             CITS : IT&ITES - Computer  Software Application - Lesson 37 - 46
   118   119   120   121   122   123   124   125   126   127   128