Wednesday, June 5, 2019

Advantages And Disadvantages To Javascript Computer Science Essay

Advantages And Disadvantages To Javascript Computer Science EssayThe ability to make set inspection data and real-time response, it should use the technology called AJAX Asynchronous JavaScript and XML. AJAX is a name for a group of technologies, including JavaScript, CSS and XML. It can run in Web browsers, deepen interactivity, ease of use and speed.JavaScript may be a client- post scripting language developed by Netscape development. JavaScript is make since 1996. At the time, it supports Netscape Navigator 2.0 and Internet Explorer 3.0.XML (Extensible Markup Language) is designed to advance the data description, storage and exchange. It is published by the W3C in 1998. Its conceptual design and hierarchy node to provide good support for data storage.CSS (Cascading Style Sheets) is a style sheet language. It is used to damp the data layer and display layer in HTML. In other words CSS can provide a solution to be defined and looked at the entanglement scalawag format.The mo st important is the use of AJAX, use XHR (XMLHttpRequest) for playing Web boniface. XHR object created when a drug user will establish a connection to the Web master of ceremonies. XHR object occurs between the Web browser and Web server. XHR object will listen to the web server up controls the Web page production sectionalization of the update. XHR then be adopted by the update to the web browser to update the Web page is part of it. This mechanism successfully reduced bandwidth usage and data processing. Widespread use of AJAX interactive Web pages, such as Google Maps, Google front suggested that the stock price quote.In our system, we will use JavaScript for validation, because JavaScript is a scripting language. JavaScript is the ability to use the function to verify the clients data gossip improper data and we want. For example, if you enter the correct date, month and year. In addition, JavaScript can prevent users from stirting data, if the data does non meet the s ystem asks.In order for the site have the ability to validate data and respond in real time, it was a technology called AJAX (Asynchronous JavaScript and XML) to use. AJAX is a name of a group of technologies, including JavaScript, CSS and XML. It could run on a web browser and increase interactivity, user comity and speed.JavaScript could be a client-side scripting language developed by Netscape. JavaScript has been published since 1996. At that time, she supported Netscape Navigator 2.0 and Internet Explorer 3.0.XML (Extensible Markup Language) has been design, improve data description, storage and exchange. It published in 1998 by W3C. His concept nodes and the hierarchical structure also provide support for data storage.CSS (Cascading Style Sheets) is a style sheet language. It is used to separate the data layer and layer display in HTML. to provide other word to define a CSS could be fixed method and format to search the site.The most important use of AJAX is playing with XHR (XMLHttpRequest) to deal with web server. A XHR is made, user must connect to the Web server. The XHR object is passed between web browsers and web servers. The XHR object is heard on the Web Server Update Web site update a part. Then XHR will be going in the update to the web browser on the part of the web site to renew. This mechanism successfully, the bandwidth decreases with and data processing. AJAX has been cited widely by using interactive Web page, such as Google Map, Googles proposal and the share price.In our system, we will use JavaScript to do the validation, because JavaScript is a scripting language. JavaScript is able to function, but want that data, client input with real data confirm we are not. For example, it is input the correct day, month and year. In addition, JavaScript could prevent users from sending data when the data was not met, the system inquires.Pic 2.2 Create the inconsistentAt the beginning, the script would built a lot of variables that we will use (Pic 2.2).Pic 2.3 The validation functionThen, we shall use the procedure to do the validation (Pic 2.3). On pipeline 19, the code was used to begin checking by if loop with the conditions. The code on line 22 alert user Please select date for meter reading, if user have not enter the day. From line 25 to 41, the function was setup to notice user whether they are input the incorrect year, day, month, also the meter reading.Pic 2.4 The validation to the meter readingFrom line 52, the JavaScript will check the meter reading input. It will alert if user input the meter reading is less then previous or it is not a number.Pic 2.5 These code will disable the submit buttonFrom line 120 to 136, JavaScript will have the result from the script we have mention above. If user input incorrect data, the submit button will gray by to prevent user to press it. If the information is correct, the function will change the button to normal status and user can click it.Pic 2.6 The submit buttonThe sc ript of the line 147 to 160 on the send button. The Send button is with JavaScript (line 152), are playing to validate information. Since in that respect is, if the browser do not play with JavaScript, allow line 155-158 users submit button without JavaScript.With JavaScript, there are some advantages and disadvantages.On the negative side, there are security and reliability problem. Because JavaScript runs on the client computer, they will be used in a position for malicious purposes such as Dead code insertion code conversion, autobiography re-allocation Some people stop running JavaScript, it will affect the system running.In addition, the results of its portable, it is fully operational and rely completely on the client side web browser. That is, when client browser does not support JavaScript, or not enough new version of some script failed in the current.Although JavaScript has some weaknesses, there are many positive feature to help developers become the first choice.First , JavaScript is not on the server side to load the current resources and increase server capacity to save. In other words, client JavaScript functions can immediately instead of waiting to respond Server.Second, JavaScript is relatively easy to learn and implement. It is an open source superior language is, it is easy to implement, compared to other programming languages such as Python, Perl, C Finally, a well-tolerated JavaScript language. It may be written in other web page in another language, like PHP and Perl. It may interact with other language for a variety of applications to play well.Finally, AJAX (JavaScript and XML in particular) offer the ability to validate our system, greatly reduce the occurrence of bad data, do. And cost reduced compatibility with PHP much development time. Finally, because it can run on the client side, saving them directly to server work out resources. It indirectly reduce administrative costs, hardware investment costs and save development cost s.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.